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
Instruction set architecture
(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 types=== Examples of operations common to many instruction sets include: ====Data handling and memory operations==== *''Set'' a [[processor register|register]] to a fixed constant value. *''Copy'' data from a memory location or a register to a memory location or a register (a machine instruction is often called ''move''; however, the term is misleading). They are used to store the contents of a register, the contents of another memory location or the result of a computation, or to retrieve stored data to perform a computation on it later. They are often called [[load–store unit|''load'' or ''store'']] operations. *''Read'' or ''write'' data from hardware devices. ====Arithmetic and logic operations==== *''Add'', ''subtract'', ''multiply'', or ''divide'' the values of two registers, placing the result in a register, possibly setting one or more [[flag (programming)|condition codes]] in a [[status register]].{{Sfn|Hennessy|Patterson|2003|p=108}} **''{{vanchor|increment}}'', ''{{vanchor|decrement}}'' in some ISAs, saving operand fetch in trivial cases. *Perform [[bitwise operation]]s, e.g., taking the ''[[logical conjunction|conjunction]]'' and ''[[logical disjunction|disjunction]]'' of corresponding bits in a pair of registers, taking the ''[[logical negation|negation]]'' of each bit in a register. *''Compare'' two values in registers (for example, to see if one is less, or if they are equal). *''{{vanchor|Floating-point instruction}}s'' for arithmetic on floating-point numbers.{{Sfn|Hennessy|Patterson|2003|p=108}} ====Control flow operations==== *''[[Branch (computer science)|Branch]]'' to another location in the program and execute instructions there. *''[[Conditional branch|Conditionally branch]]'' to another location if a certain condition holds. *''[[Indirect branch|Indirectly branch]]'' to another location. *''Skip'' one of more instructions, depending on conditions *''Trap'' Explicitly cause an [[interrupt]], either conditionally or unconditionally. *''[[Subroutine|Call]]'' another block of code, while saving, e.g., the location of the next instruction, as a point to return to. ====Coprocessor instructions==== *Load/store data to and from a coprocessor or exchanging with CPU registers. *Perform coprocessor operations.
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)