# How To Convert Binary Code To Bcd And Vise Versa?

Discussion in 'Homework Help' started by transgalactic, May 8, 2008.

1. ### transgalactic Thread Starter Active Member

Apr 29, 2008
74
0
??????????????????????

Feb 4, 2008
4,846
63

3. ### techroomt Senior Member

May 19, 2004
198
1
you need to first understand "binary" and "binary coded decimal". when you do it is easy. read up on both.

4. ### transgalactic Thread Starter Active Member

Apr 29, 2008
74
0
i know that BCD is a sub group of binary numbers from 0-9

so i dont know how to convert 1111 to BCD code (its impossible)
or 0011 to BCD (it stays the same)

??????????????

5. ### mrmount Active Member

Dec 5, 2007
59
7
I suppose you have to convert binary to decimal and then convert it to BCD. So 1111 would become 0001 0101.

6. ### Caveman Active Member

Apr 15, 2008
471
0
BCD is just a method of using 4-bit values to represent a digit of a decimal number. The 4-digit codes, 1010,1011,1100,1101, and 1111 are invalid because they would translate to 10-15, which are not decimal numbers.

You can see that BCD is more inefficient that binary, but easier to directly read.

1111 is invalid as a BCD number directly, but as binary it is equal to decimal 15, which will require two BCD digits 0001 and 0101.

Apr 20, 2004
15,815
283