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

In summary, there are two different truth tables for BCD to Gray conversion, with one set of rules using 8421 BCD and another set using BCD4221. The 8421 BCD to Gray conversion follows the rules of: 1) MSB of BCD (A) = MSB of Gray (W), 2) A ⊕ B = X, 3) B ⊕ C = Y, 4) C ⊕ D = Z. However, the BCD4221 code follows different rules and results in a different truth table. There are also other BCD and gray codes that do not follow these rules. Therefore, it is important to specify which BCD and gray codes are being
  • #1
Differentiate1
34
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
  • #2
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:
  • #3
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:
  • #4
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.
 
  • #5
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.
 
  • #6
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" )
 

1. What is a BCD to Gray Code Converter?

A BCD to Gray Code Converter is a digital circuit that converts Binary Coded Decimal (BCD) inputs into Gray Code outputs. It is commonly used in digital systems to reduce complexity and improve efficiency in data transmission.

2. How does a BCD to Gray Code Converter work?

A BCD to Gray Code Converter works by using a combination of logic gates to convert the BCD input into its corresponding Gray Code output. It follows a specific algorithm that maps the BCD inputs to the Gray Code outputs.

3. What are the advantages of using a BCD to Gray Code Converter?

Using a BCD to Gray Code Converter offers several advantages, including reduced complexity, improved efficiency, and reduced error rates in data transmission. It also allows for easier binary-to-decimal conversion and can be easily integrated into digital systems.

4. How accurate is a BCD to Gray Code Converter?

A BCD to Gray Code Converter is highly accurate and reliable, as it follows a specific algorithm and uses digital logic gates to convert the data. However, like any digital circuit, it may be prone to errors if there are issues with the components or design.

5. In what applications are BCD to Gray Code Converters commonly used?

BCD to Gray Code Converters are commonly used in digital systems, such as computers, calculators, and communication devices. They are also used in industrial and scientific applications, such as data encoding and transmission in sensors and control systems.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Replies
7
Views
848
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
275
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
5K
Replies
13
Views
1K
Replies
16
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
12
Views
2K
Back
Top