











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












1
2
4 EE204-L
ten
ten
ten
two
two
8 EE204-L
two
two
ten
ten?
ten
ten?
0 1 A B Operation Result 2-to-1 Mux If Operation = 0, Result = A • B If Operation = 1, Result = A Ú B Start out by supporting AND and OR operations Two operands, two results. We need only one result... The Operation input comes from logic that looks at the opcode
a b cin s cout 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
CarryIn CarryOut ALU A B Cout Cin Result Cin Cout Op (2 bits) Operation Function 00 A • B 01 A Ú B 10 A + B Operation Function 00 A • B 01 A Ú B 10 A + B
(Op is now 2 bits) Add an Adder Connect CarryIn (from previous bit) and CarryOut (to next bit) Expand Mux to 3-to-1 (Op is now 2 bits) 0 1 Operation Result A B 2 0 1
out
in
a input b input Cin input output A 0 0 A 0 B 0 B A 0 1 A+ A 0 0 A – 1* A B 1 A+B+ A B* 1 A – B A B 0 A + B A B* 0 A – B -