I was asked the following question:
Can somebody clarify this for me? Thanks in advance!
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?
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!