VHDL BCD-to-Binary Encoder Question

Discussion in 'General Electronics Chat' started by royalt213, Jan 18, 2016.

Who is right, me or the other guy?

  1. Me

    0 vote(s)
    0.0%
  2. The Other Guy

    0 vote(s)
    0.0%
  1. royalt213

    Thread Starter New Member

    Feb 27, 2009
    3
    0
    I was asked the following question:

    Write the VHDL assignment operator for the Y2 output (most significant bit) of a BCD-to-binary encoder. Use Boolean operators, D0-D9 as the data inputs lines, and Y0-Y2 for the outputs. Inputs and outputs are active-HIGH. Please note that ONLY one VHDL statement is needed, don't write a whole program.
    I am having several problems with this question:

    • First, wouldn't this need a Y3 to be able to represent all decimal digits?
    • Second, in that case, Y3 would be the most significant bit, right?
    When I brought up these questions, I got the response:

    If we have 10 input lines, which is 2^3 = 8 < 10 < 2^4 = 16. That means, we can use either 3 or 4 output lines. We have chosen 3 output lines in this case.
    But this doesn't make sense to me either. You can only "choose" 3 output lines if you don't want to represent 8, 9 and 10, right?

    Can somebody clarify this for me? Thanks in advance!
     
  2. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Using 10 bits, you can represent 399 (decimal) in BCD. No, the question doesn't make sense.
     
Loading...