4008 | 4-bit binary full adder |
Technology: CMOS | Power supply: 3-15 V |
16-pin DIL |
Pin connections | Basic operation |
Introducing adder circuits | LINKS . . . |
Back to Contents Back to Beastie Zone
The 4008 is a 4-bit binary full adder with two The outputs give the sum of the two 4-bit |
Adder circuits are essential inside microprocessors as part of the ALU, or arithmetic logic unit, where the processing and manipulation of binary numbers takes place.
How does binary addition work? The simplest addition you can do is to add together two 1-bit binary numbers. Suppose the numbers are called A and B. Each of these numbers can take the values 0 or 1. There are four possible additions:
As you can see, in binary addition, 0+0=0, 0+1=1, 1+0=1 and 1+1=10. For each of these additions, you can identify a SUM digit and a CARRY digit. The truth table below shows these additions in a different form:
input B | input A | CARRY |
SUM digit |
0 | 0 | 0 | 0 |
0 | 1 | 0 | 1 |
1 | 0 | 0 | 1 |
1 | 1 | 1 | 0 |
What do you notice about the values in the CARRY digit and the SUM digit columns? The CARRY digit follows the truth table for an AND gate, while the SUM digit follows the truth table for an EXOR gate.
In other words, 1-bit binary addition can be carried out by a circuit which looks like this:
Click the button for a Crocodile Technology © simulation of this circuit.
This circuit is called a half adder because, although it can generate a CARRY OUT, it cannot accept a CARRY IN. To see why a CARRY IN is needed, think about what happens when 2-bit, 3-bit or longer binary numbers are added:
Use the diagram to follow the stages involved in the addition of the binary numbers A=011 and B=110. In the LSB, or least significant bit, column, there is no CARRY IN. However, the second and subsequent columns must accept a CARRY IN and generate a CARRY OUT. The final CARRY OUT provides the MSB, or most significant bit, of the answer to the addition operation. (All of this is almost identical to the addition of decimal numbers.)
In each column to the left of the LSB, there are eight possible input combinations depending on the numbers being added:
The equivalent truth table is:
CARRY IN |
input B | input A | CARRY |
SUM digit |
0 | 0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 | 1 |
0 | 1 | 0 | 0 | 1 |
0 | 1 | 1 | 1 | 0 |
1 | 0 | 0 | 0 | 1 |
1 | 0 | 1 | 1 | 0 |
1 | 1 | 0 | 1 | 0 |
1 | 1 | 1 | 1 | 1 |
A circuit which obeys this truth table is called a full adder. You can make a full adder by linking together two half adder circuits:
Click the button for a Crocodile Technology © simulation of this circuit.
A simpler representation of a full adder is as follows:
The 4008 contains four full adders which are linked to allow the addition of two 4-bit binary numbers:
The addition of the high speed parallel carry subsystem speeds up the overall operation of the circuit.
To investigate the 4008, you need to provide binary inputs which are easily changed. In the prototype circuit shown below the A0-A3 and B0-B3 values are set by a special variety of switches, called DIL switches. DIL stands for dual-in-line. The pins of the switch are arranged in two rows on a 0.1 in matrix and fit conveniently across the central gap of the prototype board. The switches are operated with the aid of a small screwdriver. Moving the slider to the right, into the ON position, closes the switch and connects the corresponding input to a HIGH voltage. In the OFF position, the switch is open and the input becomes LOW. This is the effect of the 10 kW pull down resistor.
As you can see, the S0-S3 SUM outputs and the CARRY OUT pins are connected to the indicators on the lower prototype board.
What outputs would you expect when A=0 1 1 0 and B=1 1 0 0?
4008 adders can be cascaded to allow the addition of 8-bit, or longer, binary numbers.
Cross references in the Beastie Zone:
AND GATE
EXOR GATE
Back to Contents Back to Beastie Zone