Arithmetic Logic Unit


NAME:_________________________________________

Complete the following table (all values in the table MUST be represented in BINARY).

Before submitting your work, verify that the ALU answer [F(3..0)] matches the correct answer. If it does not, ASK FOR HELP and correct your answer.



  InputsOutputs
 FUNCTIONA(3..0)B(3..0)S(3..0)CNMF(3..0)Cn+4
example4+10 (addition)0100101010010011100
a)3+10 (addition)       
b)6-5 (Subtraction)
Hint: Carry adds 1
   1   
c)13-1 (decrement)       
d)NOT A when A=11       
e)NOT B when B=10       
f)A and B
A=11, B=13
       
g)A or B
A=11, B=12
       
h)A+B (addition)
A=11, B=14
       
i) 
A=1 B=13
       
j) 
A=13 B=13
       

For i-j: pick 2 more functions that HAVE NOT BEEN USED and perform those functions. Make sure you type in the function you selected into the first column (A and B are given, but you can select a function that uses only one of the values if you wish).

The ALU also is responsible for comparisons. When placed in SUBTRACT MODE (A MINUS B MINUS 1) and the Cin is low (before being inverted), the A=B output will come on when Operand A = Operand B. Try this in the simulation.

Questions:

1) What does the M input represent (ie what does the ALU do when M=0 and what does it do when M=1)? How does that relate to the Table given in the simulation?

2) If you have result of 0 and Cout is HIGH, what HEX VALUE does this represent?

3) Try generating a negative number (eg 2-5). Did you get the expected answer? If not, speculate why not? If you did, explain how the ALU obtained that value.

4) What is a half adder circuit?

5) Since there is NO multiply function in this ALU, how could a computer that uses this ALU do MULTIPLICATION? (Hint: it must do something a number of times)

6) Since there is NO divide function in this ALU, how could a computer using this ALU do DIVISION? (hint it must do something a number of times).

7) Find a data sheet for the ALU (74LS181) and paste the link and pinout diagram into this document.

8) On what pins would the following information be placed:

a) Operand A

b) The Function

c) Operand B

d) The answer out

e) The M Bit



Now save this document and submit it by clicking here. Fill in the form and browse to the file you just saved. Then hit the UPLOAD button to submit the assignment.