Why are there two different truth tables for BCD to Gray?

  • Thread starter Thread starter Differentiate1
  • Start date Start date
  • Tags Tags
    Code Converter
Click For Summary

Discussion Overview

The discussion revolves around the conversion of Binary-Coded Decimal (BCD) to Gray Code, specifically addressing the existence of multiple truth tables for this conversion. Participants explore different BCD codes and their corresponding Gray Code representations, examining the implications for implementing a BCD to Gray Code converter.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant notes a specific method for converting BCD to Gray Code, detailing the relationships between the bits of BCD and Gray Code.
  • Another participant suggests that confusion may arise from the existence of multiple BCD codes, implying that different codes could lead to different truth tables.
  • A participant expresses skepticism about their solution to a problem involving a BCD to Gray Code converter, questioning whether their approach aligns with the requirements of the problem.
  • There is a challenge regarding the correctness of a specific Gray Code expression derived from a BCD code, with participants attempting to clarify and correct each other's expressions.
  • One participant revises a Gray Code expression after re-evaluating their Karnaugh map, indicating ongoing adjustments to their reasoning.
  • Another participant seeks clarification on which BCD and Gray codes are being used, highlighting the potential for differing interpretations of the codes involved.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correct BCD to Gray Code conversion method, as multiple competing views and interpretations of the codes are presented throughout the discussion.

Contextual Notes

Participants reference specific BCD codes, such as the 8421 code, and express uncertainty about the implications of using different codes for the conversion process. There are unresolved mathematical expressions and differing interpretations of the truth tables.

Differentiate1
Messages
34
Reaction score
0
Having a bit of trouble understanding why there are two different truth tables for BCD to Gray.

Using ABCD as the BCD and WXYZ as the Gray,
The way I learned it is:
1) MSB of BCD (A) = MSB of Gray (W)
2) A ⊕ B = X
3) B ⊕ C = Y
4) C ⊕ D = Z
5) Since BCD only ranges from 0 - 9, 10 - 15 become "don't cares"

Following the rules, chart prints:
http://i.imgur.com/IPsPoAS.png

However, while browsing through examples of converting BCD to Gray, I found these:
Example Problem
Example Problem 2

The rules I posted don't work in the Example Problems.

Are there some sort of exceptions that may alter the Gray Code?
 
Last edited:
Engineering news on Phys.org
There are at least 3 different BCD-codes:

BCD-Codes.jpg


Maybe that's the cause to confusion?

But why not choose the one you like, practise some Karnough mapping and make your own truth table ?

Observe: BCD4221(5) is wrong: It must be 1001 or 0111
 
Last edited:
Thanks for the reply,

The problem I'm facing requires me to,
"implement a BCD to Gray Code converter using a 4x16x4 PAL where each output collects 4 different product terms."

I completed the problem using the 8421 BCD code to Gray, but the solutions solved it the way shown here: Example Problem
Would using the 8421 BCD to Gray functions where
W = A
X = A'B
Y = A'BC' + B'C
Z = A'BC'D + B'C'D + AD + BCD + B'CD'

be considered correct in this problem still? I'm skeptical regarding my answer since the question requested "output collects 4 different product terms." I'm assuming that part just means the OR gates in the PAL needs to collect 4 connections from the AND gates.
 
Last edited:
The rules here:
Differentiate1 said:
1) MSB of BCD (A) = MSB of Gray (W)
2) A ⊕ B = X
3) B ⊕ C = Y
4) C ⊕ D = Z

matches the BCD and gray-codes here:

IPsPoAS.png


In your examples in #1, there are other gray-codes, and of course your rules will not match these.

For example, how have you found: Z = A'BC'D + B'C'D + AD + BCD + B'CD' in #3 ? That's not right.
 
Yeah that's not right.
Re-did the K-Map and found Z = A'C'D + B'C'D + A'CD'

But how would you solve the problem in the example using their BCD-Gray Code instead of the 8421 choice?
Certainly the rules will not work in that.
 
Differentiate1 said:
Re-did the K-Map and found Z = A'C'D + B'C'D + A'CD'

I cannot find out what you are doing. Which BCD-code and which gray-code ar you using?

As for the BCD- and gray-codes shown in #4, the result is:

Z = C ⊕ D = ( C * !D ) + ( !C * D )

( ! means "not" )
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 28 ·
Replies
28
Views
4K
Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
52K
  • · Replies 13 ·
Replies
13
Views
2K