Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Machine code
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Instruction set== {{main |Instruction set}} Every processor or processor family has its own [[instruction set]]. Machine instructions are patterns of [[bit]]s<ref group=nb>On early [[Decimal computer|decimal machines]], patterns of characters, digits and digit sign</ref> that specify some particular action.<ref name="sco-p251">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/251 251]}}</ref> An instruction set is described by its [[UNIVAC_1100/2200_series#Instruction_format|instruction format]]. Some ways in which instruction formats may differ:<ref name="sco-p251"/> * all instructions may have the same length or instructions may have different lengths; * the number of instructions may be small or large; * instructions may or may not align with the architecture's [[Word (computer architecture)|word length]]. A processor's instruction set needs to execute the circuits of a computer's [[Logic level|digital logic level]]. At the digital level, the program needs to control the computer's registers, bus, memory, ALU, and other hardware components.<ref name="sco-p162">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/162 162]}}</ref> To control a computer's [[Computer architecture|architectural]] features, machine instructions are created. Examples of features that are controlled using machine instructions: * [[memory segmentation|segment registers]]<ref name="sco-p231">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/231 231]}}</ref> * [[protected mode|protected address mode]]<ref name="sco-p237">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/237 237]}}</ref> * [[binary-coded decimal]] (BCD) arithmetic<ref name="sco-p236">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/236 236]}}</ref> The criteria for instruction formats include: * Instructions most commonly used should be shorter than instructions rarely used.<ref name="sco-p251"/> * The [[High Bandwidth Memory|memory transfer rate]] of the underlying hardware determines the flexibility of the memory fetch instructions. * The number of bits in the [[Random-access_memory#Addressing|address field]] requires special consideration.<ref name="sco-p253">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/253 253]}}</ref> Determining the size of the address field is a choice between space and speed.<ref name="sco-p253"/> On some computers, the number of bits in the address field may be too small to access all of the physical memory. Also, [[virtual address space]] needs to be considered. Another constraint may be a limitation on the size of registers used to construct the address. Whereas a shorter address field allows the instructions to execute more quickly, other physical properties need to be considered when designing the instruction format. Instructions can be separated into two types: general-purpose and special-purpose. Special-purpose instructions exploit architectural features that are unique to a computer. General-purpose instructions control architectural features common to all computers.<ref name="sco-p283">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/283 283]}}</ref> General-purpose instructions control: * Data movement from one place to another * Monadic operations that have one [[operand]] to produce a result * Dyadic operations that have two operands to produce a result * Comparisons and conditional jumps * Procedure calls * Loop control * Input/output
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)