I'm sorry for asking this specific question here but can some one please tell me what's wrong with this solution.

Question: design a circuit to convert 4bit Gray numbers to BCD enter image description here

I have to say I wrote numbers in Gray form in the left hand side of the truth table.

Let's consider a number such 1000 in Gray

My solution:

It's binary equivalent is 1111 and we cannot show that in BCD so output have to be don't care

Here is what my professor says:

Binary equivalent: 1111

Decimal equivalent: 15

BCD equivalent:00010101

I'm completely confused :|


As some users noted I wrote grey codes in non sequential order.

But the answer of karnaugh map will remain same. To see this you can compare the link @Jack Creasey added as comment and my karnaugh maps.(also note I just designed this circuit with decoder)

enter image description here

enter image description here

  • \$\begingroup\$ He's saying that you should have understood that you'd need more than one BCD digit to represent the result. 0001 0101 (BCD) = 1 5 (decimal). \$\endgroup\$
    – Dave Tweed
    Commented Dec 16, 2018 at 12:38
  • \$\begingroup\$ But how is that possible when there is no clue In question. \$\endgroup\$
    – Me.
    Commented Dec 16, 2018 at 12:40
  • \$\begingroup\$ I think my solution is also true am I right? \$\endgroup\$
    – Me.
    Commented Dec 16, 2018 at 12:41
  • \$\begingroup\$ Between 3 and 4 you have changed 2 bits. As I understand it, that makes it an illegal gray code. \$\endgroup\$
    – Andy aka
    Commented Dec 16, 2018 at 13:00
  • 1
    \$\begingroup\$ The answer needs more than 1 BCD digit since BCD only describes 0-9. You need a full BCD digit and an overflow (single bit) to describe 4 bit Gray in BCD. In simplistic form you would only have 0-9 BCD in a single digit. In full form you need to have the extra bit for the second BCD digit. There are a bunch of 'don't cares' For the simple conversion see this: wwwcourses.sens.buffalo.edu/mae576/ASSIGNMENTS/… \$\endgroup\$ Commented Dec 16, 2018 at 15:08

2 Answers 2


You made some mistakes at gray code. For example line 4 to line 5, you changed two digits.

Solution is something like the following

enter image description here

After that you have to create the Karnaugh map in order to find the function that will transform the input binary to the bcd feed and finally create the circuit, with logic gates.

If the question was just "design a circuit to convert 4bit Gray numbers to BCD", I would say that it's a little incomplete, since it does not define the # of output bits. Anyway...


By bad. I thought that there will be a bcd driver, but obviously you have to design that driver. Driver has to be like this

Source: https://www.electronics-tutorials.ws/combination/comb_6.html

I think the following is somewhat clarifying

enter image description here

  • \$\begingroup\$ you are right, obviously i simplified them with karnaugh map but i didn't upload them cause the problem was with the truth table \$\endgroup\$
    – Me.
    Commented Dec 16, 2018 at 15:26
  • \$\begingroup\$ Please check my edit \$\endgroup\$
    – Me.
    Commented Dec 16, 2018 at 17:24
  • \$\begingroup\$ Could you clarify the task? What is exactly the thing you have to do? As I understand it, the system takes as input 4 bits - one word, it matches it to the gray code corresponding word and finally produces the BCD word - based on the gray code word. If this is true, then your Karnaugh map is wrong, since you need 5 digits and there are no "don't care" bits. \$\endgroup\$
    – thece
    Commented Dec 16, 2018 at 18:22
  • \$\begingroup\$ System will get a 4-bit Gray code and will show its BCD equivalent \$\endgroup\$
    – Me.
    Commented Dec 17, 2018 at 7:15
  • \$\begingroup\$ Ok, so you will need 5 output bits, not 4. Let them be { y4, y3, y2, y1, y0 }. If you agree with my analysis above, then there are no "don't care" bits and it's pretty simple to construct the Karnaugh maps for 5 digits and then design your circuit. If you disagree, tell me in which point \$\endgroup\$
    – thece
    Commented Dec 17, 2018 at 10:59

enter image description here

The Answer requires;

  • Binary to Gray ( correct your errors)
  • 4 bit Gray to 5 bit BCD or {B8=0,B7=0,B6=0,B5}{B4,B3,B2,B1}
  • 5 bit BCD in 5 Karnaugh Maps then reduce each
  • 5 Maps to 5 logic symbol circuits to complete design, 1 for each 5 bit gray,

Perhaps 10/20 is generous.

  • \$\begingroup\$ sorry i didn't mention karnaugh map since problem was truth table. i'll edit question to mention that \$\endgroup\$
    – Me.
    Commented Dec 16, 2018 at 15:31
  • \$\begingroup\$ Please check my edit \$\endgroup\$
    – Me.
    Commented Dec 16, 2018 at 17:25
  • \$\begingroup\$ The question has flaws since it is ambiguous without limits of the gray code. Is it all combinations of 4 bits Gray or only all decimal numbers that can fit into 4 bits. But Gray>binary>BCD could be Gray>Octal>decimal>binary>BCD Then the result is the same Gray->Decimal or "GCD" as it were, You got a result but not the simplest using Karnaugh method using minimum gates \$\endgroup\$ Commented Dec 16, 2018 at 17:29
  • \$\begingroup\$ How many gates does it take to make 9 input OR gates and Johnson counter?? YOu can make it work, but it may not be the simplest or fastest. \$\endgroup\$ Commented Dec 16, 2018 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.