Exp3 Final Report Grp6
Exp3 Final Report Grp6
GROUP 6
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.
10 – LED indicators
10 – 1k ohms resistor, ½ watt
III. PROCEDURE:
1. Connect the circuit shown in Figure 4. Clear the accumulator by sorting the CLR input
to the ground.
1.
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?
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.
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.
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
2. 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 = LOW M = HIGH
S3 = LOW
A = 1010
3. Without changing the SELECT and MODE switches, what happens after another clock
transition?
A =1001
4. 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 = 0101 F = 1001
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 HIGH logic functions listed in the 74181 function table, predict
the result assuming that A = 1001 and B = 0011_. Make another table showing your
predictions.
V. OBSERVATION:
During our experiment with the ALU (Arithmetic Logic Unit), we observed that it
operates using two main 4-bit binary inputs, labeled A and B. These inputs are processed
based on control signals (S0, S1, S2, S3) that determine which arithmetic operation to
perform. As we ran the experiment, we noticed that all the calculations shown on the
display were a result of operations carried out by the ALU. We used the given values in
the circuit diagram to cycle through different values, which were then sent to the
selection inputs of the ALU. This allowed the ALU to perform calculations in real time.
We discovered that the ALU is not only capable of performing various operations, but it
can also retain previous results. However, one key limitation is that it can only handle 4-
bit inputs and outputs, meaning the calculations are confined to 4-bit values.
VI. CONCLUSION:
Through this experiment, we gained a clearer understanding of how the ALU works. We saw
that the ALU can perform basic arithmetic operations like addition, subtraction,
multiplication, and division, as well as logic operations like AND, OR, XOR, and NOT. By using
4-bit inputs for A and B, we observed how the ALU processes binary data. We also verified
the ALU's functions by building a truth table and running simulations. LEDs connected to the
outputs helped us visualize the data flow, making the behavior of the circuit easier to follow.
While the setup is fast and reliable, its limited flexibility and 4-bit processing capacity restrict
the range of operations it can handle.
VII. FIGURE 4
TABLE 1:
S3 S2 S1 S0 LOGICAL FUNCTIONS A F
H L H H F = AB 0011 0011
S3 S2 S1 S0 Cn = L (w/ NO CARRY) A F
H L L L F = A + AB + 1 0000 0001
H L H H F = AB 1111 0011
S3 S2 S1 S0 Cn = H (w/ CARRY) A F
H L L L F = A + AB 1011 1110
H L H H F = AB - 1 0010 0001
https://drive.google.com/file/d/15R-X1lJH1vU3Zgnln8sgxO56gIkyksLR/view?usp=drivesdk