Professional Documents
Culture Documents
Understand and apply the basic machine-code operations of: • load • add • subtract • store • branching (conditional and unconditional) •
compare • logical bitwise operators (AND, OR, NOT, XOR) • logical • shift right • shift left • halt.
Use the basic machine-code operations above when machine-code instructions are expressed in mnemonic form- assembly language, using
immediate and direct addressing
Typical mnemonics for data transfer, arithmetic, branch and compare instructions:
Mnemonic Instruction
Mnemonic Instruction
AND Rd, Rn, <operand> Perform a bitwise logical AND operation between the value in register n and
the value specified by <operand>, store the result in register d
ORR Rd, Rn, <operand> Perform a bitwise logical OR operation between the value in register n and the
value specified by <operand>, store the result in register d
EOR Rd, Rn <operand> Perform a bitwise logical XOR operation between the value in register n and
the value specified by <operand>, store the result in register d
MVN Rd <operand> Perform a bitwise logical NOT operation on the value specified by <operand>,
store the result in register d
LSL Rd, Rn <operand> Logically shift left the value stored in register n by the number of bits specified
by <operand>, store the result in d
LSR Rd, Rn <operand> Logically shift right the value stored in register n by the number of bits
specified by <operand>, store the result in d
HALT End program (Halt)
<operand> can be interpreted in two different ways, depending on whether the first symbol is a # or
an R:
# - use the decimal value specified after the #, e.g. #38 means use the decimal number 38
Rn - use the value stored in register n e.g R7 means use the value stored in register 7