Question: 5 . ( 2 0 POINTS ) Design a 5 - bit ALU that supports the following modes of operation: - A OR B -
POINTS
Design a bit ALU that supports the following modes of operation:
A OR B
A XOR B
mathrmAmathrmBaddition
For extra credit, implement the following additional modes:
pointsmathrmAmathrmBabsolute value of the difference of A and B
points A MUL multiply A by four using shift left
Your ALU should have at least the following inputs and outputs:
Inputs:
Cin incoming carry bit
A five bits, interpreted as a s complement signed or unsigned integer
B five bits, interpreted as a s complement signed or unsigned integer
Outputs:
Cout outgoing carry bit
R five bits of the result, interpreted as a s complement signed or unsigned integer
For extra credit, implement the following additional outputs:
point Eq a single bit output which is when A is equal to mathrmB otherwise
point SgnA a single bit output which is when A is negative, otherwise
points OnesA a multibit output interpreted as an unsigned integer representing the number of s in A You need to determine the number of bits in OnesA yourself. OnesA should have the minimal number of bits necessary.
points OVFL a single bit output which is when an arithmetic operation resulted in the overflow, otherwise
You may introduce additional inputs andor outputs, as necessary.
a You are allowed to use any gates and components that we reviewed in class. It is also OK to use any components that appeared in our course textbookzyBooks
b You may define your own components and then use them.
c You must assume signed values for all arithmetic operations and comparison Eq
d The mode of operation of the ALU should be determined by the Operation control bus several wires of the form O pn O pnldots O p that together define the mode You need to use the minimal number of wires in the Operation bus. Also, you are not allowed to have any other separate control signals, like Ainvert, Binvert, etc. If you need any such control signals, they have to be produced inside your ALU from O pn O pnldots O p Make sure you provide a table legend that shows how modes correspond to Operation bits.
Draw the circuit diagram of your ALU below. Make sure that you circuit is well organized,
drawn neatly, all connections are straight lines that go either vertically, horizontally, or at a
deg angle, and that all signals and components are clearly labeled. You will lose points if
your drawing is sloppy or hard to read.
I NEED the extra credit parts! Make sure to go into as much detail as possible and explain every part.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
