Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design an ALU that can perform the following operations. ?B means the bitwise-co

ID: 1806548 • Letter: D

Question

Design an ALU that can perform the following operations. ?B means the bitwise-complement of B ? e.g., if B = 1011, then ?B = 0100. A, B, and F are 4-bit 2?s complement numbers. No need to consider overflow logic

Answer: Key idea is that all operations are additions, and therefore we can just use MUXES to select inputs to an adder; Cin = 1 just has a +1 effect; e.g., for opcode = 10, F = -B is just F R + 1 when Cin = 1. This solution can he succsive1y simplified as follows: 9) ALU Design (10 pts) Design an ALU that can perform the following operations. B means the hitwise-complement of B - e.g., if B = 1011, then B = 0100. A, B, and F are 4-hit 2's complement numbers. No need to consider overflow logic. In the diagram below, the logic block for each kj is identical, except with its own respective inputs A1, B, C1, and outputs Ci+1 and Fi. The inputs S1 and So are common to all logic blocks. Design this logic block for a full-adder for F1. In the drawing of your design, you can use a box ?IFA? to indicate the logic (FA) slice.

Explanation / Answer

The ALU is drawn using MUX es. MUX er perform the if-else operation .for example consider only lest 3 MUXes
if S0 ==0 then
allow Ai and 0 to pass
if S1==0 allow Ai
else allow 0 to the input to full adder
if however S0=1 then
pass Ai only
for any value of S1,pass Ai to Full Adder
This means ,if S0=0,S1=0 we have input to full adder Ai and Bi
if S0=0,S1=1 inputs are 0 and B(bar).. depending upon the C input we may have -B(C=1) in 2's complement form or B bar as it is( C=0).

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote