1. Assume that you have an ALU where the functionality is controlled by a 2 to 4
ID: 3711400 • Letter: 1
Question
1. Assume that you have an ALU where the functionality is controlled by a 2 to 4 multiplexer with inputs s0 s1. Assume that the inputs 10 cause the ALU to add two inputs, and the inputs 01 cause it to subtract. ALU control is determined by the icode and ifun of an instruction. The instructions rmmovq, mrmovq and add all result in the ALU performing an add. The instruction sub results in the ALU performing a subtraction. Fill the truth table, write the equations and draw the combinatorial logic circuit that will translate from the icode & ifun to the multiplexor inputs. Assume all the other pts) values in the truth table are don't cares. (Use Table 1 for icode &ifun; values of the instructions) (30 Instruction icode rmmovq4 mrmovq 5 add sub ifun 0 0 0 1 6 Table 1: icode and ifun for instructions. Truth Table Operation icode ifun Mux iO f1 fo rmmovoq mrmovq add subExplanation / Answer
S0 = A0 B0 C0 + A0 B0 'C0' + A0'B0CI
' + A0 'B0'C0 = odd (A0 ,B0, Ci)
C1 = A0 B0 + A0C0 + B0C0 = majority (A0 ,B0, C0)
S1 = odd (A1, B1, C1) = odd (A1, B1, majority (A0 ,B0, C0))
= A1 B1 majority (A0 ,B0, C0) + A1 B1' majority (A0 ,B0, C0)'
+ A1' B1 majority (A0 ,B0, C0)' + A1' B1'majority (A0 ,B0, C0)
= (A1 B1 + A1' B1') majority (A0 ,B0, C0) + (A1 B1'+ A1' B1) majority(A0' ,B0',C0')
= (A1 B1 + A1' B1') (A0 B0 + A0C0+ B0 C0) + (A1' B1 + A1B1') (A0'B0' + A0'C0' + B0' C0')
= A1B1 A0 B0 + A1 B1 A0C0 + A1 B1 B0C0 + A1' B1' A0 B0 + A1' B1'A0C0 + A1'B1'B0C0
+ A1'B1A0'B0'+ A1'B1A0'C0'+ A1'B1B0'C0'+ A1B1'A0'B0'+ A1B1'A0'C0'+ A1B1'B0'C0'
C2 = majority (A1, B1, C1) = majority (A1, B1, majority (A0, B0, C0))
= A1B1 + A1majority (A0, B0, C0) + B1majority (A0, B0, C0)
= A1B1 + A1(A0B0 + A0C0 + B0B0) + B1(A0B0 + A0C0 + B0B0)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.