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!

Multiplexer in ABEL

  1. Oct 17, 2005 #1
    I have this ABEL file but can't figure out where 0, 1, 2, 3 come from in "when-then" statements...

    "The following ABEL code demonstrates how to implement a combinatorial multiplexer.
    " 4 to 1 multiplexer design

    SEL0..SEL1 pin;
    A,B,C,D pin;
    MUX_OUT pin istype 'com';
    SEL = [SEL1,SEL0];


    when SEL==0 then MUX_OUT = A;
    else when SEL==1 then MUX_OUT = B;
    else when SEL==2 then MUX_OUT = C;
    else when SEL==3 then MUX_OUT = D;

    thanks beforehand.
  2. jcsd
  3. Oct 17, 2005 #2


    User Avatar

    Staff: Mentor

    SEL = SEL[1:0] are the two selector pins. The 2-bit code on those pins goes from 0 to 3, and that MUXes one of the four inputs A-D to the single output pin. When SEL[1:0] = 0b01 = 0x1, for example, input B is routed to the output. Make sense?
  4. Oct 17, 2005 #3
    hmmm.... sorta... so i have to look at the select lines' binary code to get the numbers...ok, makes sense.
    But how do you know it's B? i missed that part...
  5. Oct 17, 2005 #4


    User Avatar

    Staff: Mentor

    (apologies for the spacing of the following table -- no font control...)
    SEL[1:0] Input-->Output
    ====== ===========
    00 A-->Output
    01 B-->Output
    10 C-->Output
    11 D-->Output
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Multiplexer in ABEL
  1. Decoder & multiplexer (Replies: 3)

  2. Analog Multiplexers (Replies: 1)

  3. Analog Multiplexing (Replies: 9)