Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

NAME: RATING:

TIME / SECTION: INSTRUCTOR:

EXPERIMENT NO. 3

THE ARITHMETIC LOGIC UNIT (ALU)

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.

II. MATERIALS NEEDED

1 – 74175 quad D flip-flop or equivalent


1 – 74181 ALU
1 – 7400 2-input NAND
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.
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 = _________________

What is the correct MODE logic?

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.

What is the correct carry input logic?

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

What is the logic level of the Cn+4 and A + B outputs?

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 = ____________________ ______________

What is the result in A after one clock transition?

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

SELECTION M = LOW (ARITHMETIC OPERATION)


S3 S2 S1 S0 Cn = L (w/ NO CARRY) A F
L L L L F=A+1
L L L H F = (A+B) + 1
L L H L F = (A+B') + 1
L L H H F = ZERO
L H L L F = A+ AB'+ 1
L H L H F = (A+B) + AB'+ 1
L H H L F=A-B
L H H H F = AB'
H L L L F = A + AB + 1
H L L H F=A+B+1
H L H L F = (A+B') + AB + 1
H L H H F = AB
H H L L F=A+A+1
H H L H F = (A+B) + A + 1
H H H L F = (A+B') + A + 1
H H H H F=A
SELECTION M = LOW (ARITHMETIC OPERATION)
S3 S2 S1 S0 Cn = H (w/ CARRY) 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 = MINUS 1 (2's Complement)
L H L L F = A+AB'
L H L H F = (A+B) + AB'
L H H L F=A-B-1
L H H H F = AB'- 1
H L L L F = A + AB
H L L H F = A+B
H L H L F = (A+B') + AB
H L H H F = AB - 1
H H L L F = A+A
H H L H F = (A+B) + A
H H H L F = (A+B') + AB
H H H H F = A-1

You might also like