1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Shift LR in 4 bit ALU?

  1. Apr 2, 2010 #1
    1. The problem statement, all variables and given/known data


    HI

    This 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)


    2. Relevant equations

    Designing a 4 bit ALU

    https://www.physicsforums.com/showthread.php?t=265676

    3. 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/ybhqex2


    unable 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 cant satisfy the requirement or not this case

    2 bit shifter
    http://tinyurl.com/yjvdx34


    4 bit shifter
    http://tinyurl.com/ye9enhd
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?