Binary Coded Decimal

Thread Starter

PG1995

Joined Apr 15, 2011
813
Hi

I'm learning about BCD (Binary Coded Decimal). I'm learning BCD 8421 code. I'm mentioning this because this might useful to someone like me to knoe that there are many ways to represent a decimal into a binary forms but the BCD most commonly refers to 8421 code.

Q1: I was trying to see how the conversion from Decimal to Binary takes place 'rationally'.

14 = 0001 0100
14 = (1 x 10^1) + (4 x 10^0)
14 = 1 x (2 x 5) + (2^2 x 2^0)
14 = 1 x (2 x (4+1) + 2^2
14 = 2(2^2 + 2^0) + 2^2
14 = 2^3 + 2^1 + 2^2
14 = 2^3 + 2^2 + 2^1 + 0
14 = 1110

Now how do I change the number "1110" into a BCD one without directly using cookbook approach of adding '6' (0110) to the result? My question #2 is also related to this.

Q2: Please have a look on the attachment. You can find my query there. Thanks.

Thank you very much for the help and your time.

Regards
PG
 

Attachments

Wendy

Joined Mar 24, 2008
21,840
You have to understand BCD is for circuits, a practical application that is not really math. So, in general, it never comes up. You start with BCD, you end with BCD, and binary never enters into it.

You refer to cook book approaches, there is another name for something like that, technology. Technology is the combination of the words Technique and Knowledge, so if there is a technique that works, it is OK, not something to be looked down on.

BCD exists because humans have ten fingers. It itself is a kludge so that we can show number in a format we can make sense of while using a machine type math.
 
Top