Basic Arithmetic Logic Unit (ALU) Circuitry
By Stephen Bucaro
One of the primary functions performed by a computer is mathematics. Even functions
like graphics and sorting data are mathematics - because everything on a computer
is represented by digital data. This article describes the digital logic circuits used
to perform binary addition and subtraction.
The circuit shown above and its accompanying logic diagram
performs the function of adding two one-bit binary numbers.
The output of the circuit provides the sum along with a possible carry.
When adding higher-bit binary numbers however, provisions for
a carry-in from a previous stage must be provided. For this
reason, this circuit is called a "half-adder".
In the circuit shown above, a second stage has been added
to accept a carry-in from a previous stage. The carry-out of this
circuit is created by ORing the carry bits of both stages. This
circuit is called a "full-adder".
Logic diagram of the full adder.
To simplify circuit diagrams we could indicate a full adder using a simple
box labeled with the circuit's function and with its inputs and outputs labeled.
By connecting eight full-adder circuits together, each circuit's carry-out
output to the carry-in input of the next circuit, we can construct an eight-bit