Experiment 3 ALU - 2024
Experiment 3 ALU - 2024
Experiment 3 ALU - 2024
EXPERIMENT NO. 3
I. OBJECTIVES:
1. To build a circuit containing an ALU using IC 74181 and program it to perform various
arithmetic and logic operations.
2. To predict the results from the ALU if given specific input conditions and operations.
3. To use an ALU to design and build a 4-bit adder with an overflow indicator.
III. PROCEDURE:
1. Connect the circuit shown in Figure 4. Clear the accumulator by sorting the CLR input to
the ground.
2. Add the value in the B register (0011) to the value in the accumulator (0000) with no carry
input. To do so, find the SELECT code and the correct MODE setting (on the ALU pin
specification). Note that the add function is shown with the “+” sign.
What is the correct SELECT logic for S0, S1, S2, and S3?
S0 = ____________________ S2 = _________________
S1 = ____________________ S3 = _________________
M = ____________________
The Cn input is interpreted as the Cn for an Active High data. This is equivalent to Carry
(C1). Connect Cn to a HIGH to indicate no CARRY input.
Cn = ____________________
When you have set up the SELECT, MODE, AND Cn logic connect the clock and observe
the result in the A register for one clock transition. List the output.
A result = ________________
F = A + B _________________
Cn+4
Note that the Cn+4 outputs are interested as Cn+4 for active high data. Also, as shown on the
data sheet, the A + B output is not valise unless the ALU is in the subtract mode. Observe
the output after two or more clock transitions, and verify that the result in the accumulator
is 1001
Cn+4 = __________________
A + B = _________________
3. Select the SELECT switches for performing an XOR of the data in A (1001) with the data
in B (0011). Show the logic level necessary to perform this operation.
S0 = ____________________ M = ______________
S1 = ____________________ Cn = ______________
S2 = ____________________ ______________
S3 = ____________________ ______________
A = ____________________
4. Without changing the SELECT and MODE switches, what happens after another clock
transition?
A = ____________________
5. Leave the result from step 4 in the A register. Set SELECT and MODE switches as shown
below and predict what output will appear.
S0 = H M=H
S1 = L
S2 = L
S3 = H
Predicted result:
A = __________
F = __________
Set the logic given above and provide one clock transition and check if your predicted
result is in the same as the output?
IV. QUESTIONS:
1. For each of the active HIIGH logic functions listed in the 74181 function table, predict the
result assuming that A = 1001 and B = _____. Make another table showing your
predictions.
2. Repeat for ACTIVE LOW functions. Make another table.
V. OBSERVATION:
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
VI. CONCLUSION:
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
SELECTION M = HIGH (LOGICAL FUNCTIONS)
S3 S2 S1 S0 LOGICAL FUNCTIONS A F
L L L L F = A'
L L L H F = (A+B)'
L L H L F = A'B
L L H H F=0
L H L L F = (AB)'
L H L H F = B'
L H H L F=A⊕B
L H H H F = AB'
H L L L F = A'+B
H L L H F = (A⊕B)'
H L H L F=B
H L H H F = AB
H H L L F=1
H H L H F = A+B'
H H H L F = A+B
H H H H F=A