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.
A  B  Sum  Carry 
0  0  0  0 
0  1  1  0 
1  0  1  0 
1  1  0  1 
The circuit shown above and its accompanying logic diagram
performs the function of adding two onebit binary numbers.
The output of the circuit provides the sum along with a possible carry.
When adding higherbit binary numbers however, provisions for
a carryin from a previous stage must be provided. For this
reason, this circuit is called a "halfadder".
In the circuit shown above, a second stage has been added
to accept a carryin from a previous stage. The carryout of this
circuit is created by ORing the carry bits of both stages. This
circuit is called a "fulladder".
A  B  C  Sum  Carry 
0  0  0  0  0 
0  1  0  1  0 
1  0  0  1  0 
1  1  0  0  1 
0  0  1  1  0 
0  1  1  0  1 
1  0  1  0  1 
1  1  1  1  1 
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 fulladder circuits together, each circuit's carryout
output to the carryin input of the next circuit, we can construct an eightbit
binary adder.
