What is the ALU?


Simple processes are performed by the Arithmetic Logic Unit (ALU for short). The ALU is made up of devices called gates that receive one or more inputs and, based upon what function they are designed to perform, output a result. The ALU in our example performs one of seven functions: NOT, Left Shift, Right Shift, Add, Subtract, AND, and OR.


The ALU takes two inputs, loaded from registers on the chip. For the commands Not through Right Shift, only the first input is used. The second is completely ignored. The ALU can also let its first input pass through unchanged. The function executed is determined by three additional input bits, specifying the number of the function. Depending on the result of the function, the ALU outputs two bits, called N and Z. N is a one when the result is negative (i.e. the left-moat bit is a one), and Z is a one when the result is zero. These bits are helpful for determining what the computer should do next. Then the answer is routed back to a register to be stored for future use.


[Next topic: What are registers?|| Return to questions list|| See the Applet|| Home|| Index and Glossary]
For comments or suggestions, write to us.