- #1
sickkid
- 1
- 0
Homework Statement
HIThis 4 bit ALU requires 8 functions in a bit slice, and satisfies following criteria
Also, it can only be constructed via basic logic gate..and,or,not,xor...
No filp-flop...etc.
S1 S2 S3 OUTPUT
0 0 0 Shift A Through (X = A)
0 0 1 Shift input A Left (X = A Shifted right by 1 bit)
0 1 0 Shift Input A Right (X = A Shifted left by 1 bit)
0 1 1 Logical AND (X = A AND B)
1 0 0 Logical XOR (X = A XOR B)
1 0 1 Logical NOR (X = A NOR B)
1 1 0 Full adder (X = A + B)
1 1 1 Subtraction (using the Full Adder) (X = A - B)
Homework Equations
Designing a 4 bit ALU
https://www.physicsforums.com/showthread.php?t=265676
The Attempt at a Solution
I've complete the other six tasks(but subtractors doesn't work properly?!)However,shifting right&left really beat me up...this is what i got in one bit ALU...and then got stuck
http://tinyurl.com/ybhqex2unable to build a shifter to fill in the blank
0 0 1 Shift input A Left (X = A Shifted right by 1 bit) =D1
0 1 0 Shift Input A Right (X = A Shifted left by 1 bit) =D2 somehow i hav rough ideas to build a shifter but seems can't satisfy the requirement or not this case
2 bit shifter
http://tinyurl.com/yjvdx344 bit shifter
http://tinyurl.com/ye9enhd