Connect with us

simple multiplexing

Discussion in 'General Electronics Discussion' started by DCJ, Mar 27, 2012.

Scroll to continue with content
  1. DCJ


    Mar 27, 2012
    What I need to do is to use 6 digital outputs from my controller to indicate any number between 0-50. So I will be using the 6 outputs in various combinations to achieve this.

    What is the correct terminology for what i'm trying to do? Is "multiplexing" correct?

    I want to find more information so I can arrange my combinations of outputs in an industry "standard" method.

    Any help is appreciated.
  2. GreenGiant


    Feb 9, 2012
    This is going to be difficult to achieve, using a multiplexer/decoder (you used the correct terminology) will only get one output at a time, unless you daisy chain a few different logic gates.

    Is timing a significant factor?

    Are you able to supply 5 volts to a few ICs?
  3. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    Allow me to differ: it's not difficult.
    What you do is called binary coding and is the basis of 99.99999... % of all computers.

    I assume every digital output can have one of two states: it is either logic 0 (low level) or logic 1 (high level). So you can represent 6 bits. With a 6 bit binary number you can code 64 different numbers from 000000 (=decimal 0) to 111111 (=decimal 63) (

  4. GreenGiant


    Feb 9, 2012
    I totally overthought that whole thing, you are totally correct there Harald
  5. DCJ


    Mar 27, 2012

    Thanks, and you are correct each output is either hi or low. Using your tips I found a conversion chart for an 8-bit binary code. Its states that the binary code for decimal "0" is "00000000" and the binary code for decimal "50" is "00110010".

    SInce my outputs need to represent only 50 states, would the correct thing to do be to simply eliminate the first two zeros in the binary code?

    For example: "0"=000000 and "50"=110010

    Or is there another more accepted way to do this?

  6. jackorocko


    Apr 4, 2010
    Harald already pointed out you only need 6 bits for a value of 50 decimal. You can just as easily get rid of the last two bits and use the first 6 bits. It all depends on what you consider the most significant bit. (MSB)

    Not in all cases, but in most, the MSB is the left most bit in a multi-bit binary number
  7. DCJ


    Mar 27, 2012

    My whole question is: How do I represent 50 different states using only 6 outputs? As Harald pointed out, binary code is the answer. But I can only find information regarding 8-bit binary codes.
    If I eliminate the last two bits as you suggest, then decimals 0-3 would all be "000000" (see below) ....or am I missunderstanding something?

    decimal 0=00000000
    decimal 1=00000001
    decimal 2=00000010
    decimal 3=00000011
    removing the last two bits would make these all 000000
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    Remove the bits on the left, not the right.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day