ALU2123113 Lab Instructions
ALU2123113 Lab Instructions
ALU2123113 Lab Instructions
Overview
You will construct and test a 2-bit binary adder circuit and verify its correct operation.
Background
You constructed logic circuits in the previous laboratory. A typical Arithmetic Logic Unit (ALU)
performs all those same functions (NOT, AND, OR and XOR). An ALU also performs arithmetic
functions such as addition and subtraction.
Arithmetic functions such as addition, can be defined using a truth table. The truth table shown
in Figure 1 is for a 2-bit adder circuit. The first 2-bit addend has bits A0 and A1 where A0 is the
least significant bit (LSB) and A1 is the most significant bit (MSB). The second addend has bits
B0 and B1. These are the inputs to the adder circuit. The smallest addend is 00 (0 in base 10).
The largest addend is 11 (3 in base 10).
There are three outputs: Sum0, Sum1, and CarryOut. Sum0 is the LSB and CarryOut is the MSB.
The largest output will be 110b (6d) which is obtained by adding 11b (3d) and 11b (3d).
Figure 1
A block diagram for the circuit that implements the 2-bit adder is shown in Figure 2. This
diagram shows the inputs at the top and the outputs at the bottom.
It uses a half-adder for the two least significant bits (A0 and B0) in column 0 because a Carry
from the previous column does not exist. The sum of those bits (Sum0), along with a Carry is
produced.
A full-adder is required for the next column (column 1) because the Carry from column 0 must
be included. It has bits A1 and B1 as inputs, in addition to the Carry from column 0. The
outputs are Sum1 and Carry. A full-adder can be constructed with two half-adders and an OR
gate.
Figure 2
Preparation
Watch the video How to Use a Breadboard (12 minutes).
Figure 5
Connect and Test the Output LEDs
1. Plug a 220 Ohm resistor into the solderless breadboard. See Figure 6.
2. Plug in a red LED with the long lead in the same column as the resistor. See Figure 6.
3. Connect the short lead of the LED to the GND bus with a male-to-male jumper wire. See
Figure 6.
Figure 6
4. Repeat steps 1, 2, and 3 to connect two more output LEDs. See Figure 7.
5. Temporarily connect three test wires between 5V and the bottom of each resistor. See
Figure 8.
Figure 7
Figure 8
6. Connect power to the solderless breadboard by pushing the white button on the power
supply module or connecting the Arduino board to your computer.
7. Make sure all three LEDs light up. If they do not, verify that the LEDs are plugged in correctly.
See steps 2 and 3 again if necessary.
8. Remove the three temporary test wires.
9. Disconnect power from the solderless bread board.
Figure 10
3. Connect pin 7 of all three ICs to GND as shown by the vertical black wires in Figure 11.
4. Connect pin 14 of all three ICs to 5V as shown by the vertical red wires in Figure 11.
Figure 11
Connect and Test the Sum0 Sub-circuit
1. Connect pin 3 of the 74LS86 to the bottom of the Sum0 resistor. See Figure 12.
2. Connect pin 1 of the 74LS86 to GND. This is the B0 input. See Figure 12.
3. Connect pin 2 of the 74LS86 to GND. This is the A0 input. See Figure 12.
Figure 12
2. Connect pin 4 of the 74LS86 to GND. This is the B1 input. See Figure 13.
3. Connect pin 5 of the 74LS86 to GND. This is the A1 input. See Figure 13.
4. Connect pin 1 of the 74LS86 to pin 1 of the 74LS08. See Figure 13.
5. Connect pin 2 of the 74LS86 to pin 2 of the 74LS08. See Figure 13.
6. Connect pin 3 of the 74LS08 to pin 9 of the 74LS86. See Figure 13.
Figure 13
7. Connect pin 6 of the 74LS86 to pin 10 of the 74LS86. See Figure 13.
9. Verify that the Sum1 LED is off when A0, B0, A1, and B1 are connected to GND.
3. Connect pin 6 of the 74LS08 to pin 2 of the 74LS32. See Figure 14.
4. Connect pin 4 of the 74LS08 to pin 4 of the 74LS86. See Figure 14.
5. Connect pin 5 of the 74LS08 to pin 5 of the 74LS86. See Figure 14.
Figure 14
6. Connect pin 9 of the 74LS08 to pin 9 of the 74LS86. See Figure 14.
7. Connect pin 10 of the 74LS08 to pin 10 of the 74LS86. See Figure 14.
2. Connect inputs A1, A0, B1, and B0 to GND. These are the pink wires shown in Figure 14. This
corresponds with an input of 00 + 00 (A1 A0 + B1 B0).
3. Observe the three LEDs (CarryOut, Sum1, and Sum2). Record their status (1 = on, 0 = off) in
the first row of the truth table (Figure 15).
4. Move input B0 from GND to +5V. This corresponds to an input of 00 + 01 (A1 A0 + B1 B0).
5. Observe the three LEDs (CarryOut, Sum1, and Sum2). Record their status (1 = on, 0 = off) in
the second row of the truth table (Figure 15).
6. Continue testing all the combinations of A1, A0, B1, and B0, and recording the LED outputs
on the corresponding rows of the truth table (Figure 15).
7. Compare the actual results you recorded in Figure 15 with the expected results in Figure 1.
If they are not the same, check your circuit connections and test the circuit again.