ALU Instructions 



These instructions perform the arithmetic and logic operations on data (such as addition, subtraction, multiplications, division, AND, OR, NOT …etc.)

More complex operations (such as multiplication, division, floating point arithmetic) shorter machine programs but also more complex ALU design.


Operand access modes are very detrimental to how fast ALU instructions can be executed and the complexity of the CPU design:

Allowing operands and/or results to reside in memory offers great programming flexibility at the expense of higher design complexity
Restricting operands and/or results to register values, simplifies the design significantly, however, operands and results would have to be fetched/stored in memory using data movement instructions.


The table below shows examples of ALU instructions from different machines illustrating the different operand/result access modes discussed above.


Examples of ALU instructions from several machines

InstructionDescriptionMachine
MULF A,B,CMultiply the 32-bit floating point values at memory locations A and B, and store the result in location CVAX11
nabs r3,r1Store the negative absolute value of r1 in r3PPC601
ori $2,$1,255Store the logical OR of register $1 with constant 255 into register $2MIPS R3000
DEC R2Decrement the 16-bit integer in register R4DEC PDP11
SHL AX,4Shift the 16-bit value in register AX left by 4 bitsIntel 8086