English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

what is meant by BCD number and Binary no. How to convert from BCD format to binary and vice-versa. Please explain

2007-02-22 01:13:17 · 3 answers · asked by Raj 1 in Science & Mathematics Engineering

3 answers

BCD is Binary Coded Decimal, the same as binary up to the value of ten. Four bits can be used to describe sixteen possible values from 0 to 15, or 0 to E. BCD uses only the first ten, 0 to 9.

BCD is used for values important to humans, since we generally count in decimal. This means that when we count, we carry when we reach ten - from 9 to 10, from 99 to 100, and so forth.

When counting from 0 to 16, or from 0 to E, you carry at E to 10, and from EE to 100, and so forth. This is called hexidecimal. So if you see the hex value A9, it is the same as 169 in decimal. Hexidecimal characters are used in computers to represent all the possible values that four bits can have, since it uses all possibilities. BCD wastes the four bit values that are possible, above those used for just counting from one to ten. But this is sometimes necessary to convert from one to the other for human reasons. If a computer holds a four bit value in its memory, and then it is told to start increasing the value, it will pass through all the hexidecimal values, too.

An example is the date, which is a decimal number up to 31. The computer wants to go to A when it gets to 9, but there is no such date. The "Bth" of January? Or, the "Eth" of February? So, the computer is allowed to count from 0 to 1F, but we know this is 0 to 31 in human decimal form.

There is no way to tell if a hexidecimal character is BCD or not, just by looking at it. Since hexidecimal includes BCD, only if there were a lot of values, but no letters, could you surmise these are BCD. To convert from BCD to hexidecimal, just divide the number by multiples of sixteen until it is broken down. If it can be divided by 256, but not 4096, then there is a character in the third field, such as 3xx, but not the fourth. To convert from hexidecimal to BCD, this requires taking the value in each field and multiplying it by the value of that field, then adding up all the amounts. If the hexidecimal value if A9, then you will take ten times sixteen because "A" has a value of ten and it is in the field having a value of sixteen, then add it to nine times one, since the "9" has a value of nine and it is in the field having a value of one.

It may help to think of what we're doing when we count in decimal. A number such as 87 is eight times ten plus seven times one. A number such as 387 is three times one hundred plus eight times ten plus seven times one. In hexidecimal, a number such as 2AB is two times two hundred fifty six plus ten times sixteen plus eleven times one. In decimal, each field is ten times as much as you carry to the left. In hexidecimal, each field is sixteen times as much when you carry to the left.

Experiment using the Windows Desktop calculator to convert from decimal to hexidecimal and back again.

2007-02-22 02:24:21 · answer #1 · answered by stevesarakas@sbcglobal.net 1 · 0 0

Both numbers are binary representations of numbers.

A "Binary" number each digit represents a power of two - it can be any number of digits long (although in most computer systems we normally consider only 8 bits (byte), 16 bits, 32 bits or 64 bits - as these are the normal configurations for memory bus communications around a computer (note that they are all powers of 2 or 1000, 10000, 100000 or 1000000 in Binary!)

BCD is a four digit binary number and normally only counts from 0 to 10 (4 binary digits is the minimum number that you can count to 10 and therefore the minimum number of wires). Although it may be used elsewhere, I think it was developed primarily to drive Pixie tubes (the predecessor to LCD and LED) displays because humans think in decimal digits. If you look at the time on your digital clock, somewhere a chip is sending 4 BCD coded numbers to the 7 segment displays that translate it into what segments to light up. In most cases you can actually send BCD code up to 15 and the same display will show A,B,C,D,C for 10,11,12,13,14 - although this is "hexadecimal" and not particularly interesting unless you are an old-school computer guy who thinks in it.

2007-02-22 10:16:45 · answer #2 · answered by goozen 2 · 0 0

BCD is Binary-coded decimal.
Binary is based on 2.

In Binary 10 is 1010
Whereas in BCD 10 is 0001 0000 (1 is 0001 and 0 is 0000) and so forth. The digits are manipulated as 4 digits of binary numbers.


Please refer to this presentation for further information.

www.sci.unich.it/~bista/didattica/sistemi-elaborazione/slides/ch04.ppt

2007-02-22 01:20:49 · answer #3 · answered by Tiger Tracks 6 · 0 0

fedest.com, questions and answers