# Binary Encoded Decimal Numbers / Binary Coded Decimal (BCD)

 Sayı Sistemleri Serisi İkili Sayı Sistemi/Binary Numbers İşaretli İkili Sayılar/Signed Binary Numbers İkili Kesirler/Binary Fractions İkili Ondalık Dönüşüm İkili Kodlanmış Onluk Sayılar/BCD On Altılı Sayı Sistemi Sekizil Sayı Sistemi

Binary encoded dex numbers, or BCD, are another process for converting dex numbers to binary equivalents.

Table of contents

As we see in this binary numbers section of the tutorials, there are many different binary codes used in digital and electronic circuits, each with its own unique use.

Since we naturally live in a dex (base-10) world, we need a way to convert these delusions into a binary (base-2) environment that computers and digital electronic devices can understand, and binary dex code allows us to do this.

We have previously seen that an n-bit binary code is a group of "n" bits that assume up to 2 ndifferent combinations of 1s and 0s.The advantage of the Binary Coded Decimal system is that each decimal digit is represented by 4 binary digits or bit groups in the same way as Hexadecimal.So we need a 4-bit binary code for 10 decimal places (0 to 9).

However, don't be confused, the binary dex coded dex is not the same as the sixteen number.A 4-bit hexadecimal number is valid until F 16, which represents binary11112(decimal 15), while binary decimal numbers stop at 9 binary 10012.Although this can be represented by using four binary digits of 16 numbers (2 4), six combinations of binary codes in the BCD enumeration system: 1010 (decimal 10), 1011 (decimal 11), 11 1100 (decimal 12), 1101 (decimal 13), 1110 (decimal 14) and 1111 (decimal 15) are classified as prohibited numbers and cannot be used.

The main advantage of a binary encoded dex dex is that it allows easy conversion between dex (base-10) and binary (base-2) form.However, the disadvantage is that the BCD code is wasted because the states between 1010 (dex 10) and 1111 (dex 15) are not used.However, the binary dexge has many important applications, especially using digital indicators.

In the BCD enumeration system, a decimal number is divided into four bits for each decimal place within the number.Each decimal place is represented by its weighted binary value, which performs a direct translation of the number.

For example, 357 as a dex is presented asa binary-encoded dex dex, such as:

35710 = 0011 0101 0111 (BCD)

Then we can see that BCD uses weighted coding, since the binary bit of each 4-bit group represents a certain weight of the final value.In other words, BCD is a weighted code, and the weights used in binary dex code are 8 , 4 , 2 , 1 and are commonly referred to as code 8421 because it constitutes a 4-bit binary representation of the corresponding dex.

To the left, the dex tenth weight of each dexerated digit increases by 10 times. In the BCD number system, the binary weight of each digit increases by 2 times, as shown.Then the first household weighs 1 ( 2 0 ), the second household 2 ( 2 1 ), the third household 4 ( 2 2 ), the fourth household 8 ( 2 3 ) weight.

The relationship between decimal numbers and weighted binary decimal places is given below.

Then we can see that the code 8421 BCD is nothing more than the weight of each binary digit, in which each dexer number is expressed as the pure binary equivalent of four bits .

## BCD Conversion from Binary

As we see above, converting a decimal number to a binary decimal number is very similar to converting a hexadecimal number to a binary number.First, divide the decimal number into weighted digits, and then type equivalent 4-bit 8421 BCD code, which represents each decimal place, as shown.

### Binary Encoded De tener numbers Question Example 1

Using the table above, convert the following decathlete numbers to 85 10 , 572 10, and 8579 10 8421 BCD equivalents.

85 10 = 1000 0101 (BCD)

572 10 = 0101 0111 0010 (BCD)

8579 10 = 1000 0101 0111 1001 (bcd)

Note that the binary number obtained after conversion will be a real binary translation of the decimal places.This is because binary code translates as a real binary number.

## Deity Conversion from BCD

The conversion from binary encoded dex deger to dex deger is the opposite of the above.Divide the binary number into four-digit groups, starting with the least meaningful digits, and then type the decimal point represented by each 4-bit group.Add additional zeros at the end if necessary to create a complete 4-bit grouping.That is, for example, 110.101 2 is as follows: 0011 0101 2 or 35 10.

### Binary Encoded De tener numbers Question Example 2

Convert the following binary numbers to their tennies equivalents: 1001 2 , 1010 2 , 1000111 2, and 10100111000.101 2

1001 2 = 1001 BCD = 9 10

1010 2 = this will generate an error because the deger number is 10 10 and there is no valid BCD number.

1000111 2 = 0100 0111 , BCD = 47 10

10100111000.101 2 = 0101 0011 0001.1010 bcd = 538.625 10

Converting BCD to decimal number or decimal number to BCD is a relatively simple task, but we need to remember that BCD numbers are decimal numbers, not binary numbers, even if they are represented using bits.It is important to understand the BCD representation of the decimal number, since the microprocessor-based systems used by most people must be in the decimal system.

However, while BCD is easy to encode and decode, it is not an effective way to store numbers.In standard 8421 BCD encoding of deprecation numbers, the number of individual data bits required to represent a specific deprecation number will always be greater than the number of bits required for equivalent binary encoding.

For example, a three-digit decimal number from 0 to 999 requires only 10 bits (1111100111 2) in the binary system, while a binary decimal system requires a minimum of 12 bits (0011 1110 0111 BCD).

Also, performing arithmetic tasks using binary decimal numbers can be a little strange as not each digit can exceed 9.

If the binary is equal to or less than 9 (1001) with the inserted transport bit, the corresponding BCD digit is correct.However, when the binary total is greater than 9, the result is an invalid BCD digit.Therefore, it is better to convert BCD numbers to binary only, make the necessary addition, and then recycle the BCD before viewing the results.

However, the use of a BCD encoding system in both micro-electronic and computer systems is especially useful in cases where the binary dexge number is intended to be displayed on one or more 7-segment LEDs or LCD screens, and there are many popular integrated circuits available. is configured to output or output a BCD.

A common integration is the 74LS90 asynchronous counter/divider, which includes independent 2-by-2 split and 5-by-5 split counters that can be used together to produce a 10-by-10 split counter with BCD output.Another is the 74LS390, a dual version of the basic 74LS90, which can also be configured to produce a BCD output.

However, the most commonly used BCD-coded integrateds are the 74LS47 and 74LS48 BCD to 7-segment decoder/drive; A 4-bit BCD code of a counter. converts it to the image code required to drive individual segments, e.g. 7 segment LED display.Although both integrated are functionally identical, the 74LS47 has active-low outputs for driving common anode displays, while the 74LS48 has active-high outputs for driving common cathode displays.

## Summarize

We found that a binary encoded decimal or BCD is a 4-bit binary code representation of a decimal digit in which each decimal digit is replaced with the binary equivalent in integers and fractional parts.The BCD Code uses four bits to represent the 10 de deprecation digits 0 through 9.

For example, if we want to display decimal numbers in the range from 0 to 9 (one digit), you need 4 data bits (one rodent), decimal numbers (two digits) from 0 to 99, 8-bits (one byte), decimal numbers (three digits), 12 bits, and so on in the range 0-999.Using a single byte (8-bit) to store or display two BCD digits allows a byte to hold a BCD number in the range 00 – 99, known as a packaged BCD.

Standard binary dex code is commonly known as weighted 8421 BCD code; 8, 4, 2, and 1 represent the weights of different bits that start from the most meaningful bit (MSB) and move towards the least meaningful bit (LSB).The weights of the individual positions of bits of a BCD code are: 2 3 = 8 , 2 2 = 4 , 2 1 = 2 , 2 0 = 1 .

The main advantage of the Binary Encoded Decimal system is that it is a fast and efficient system compared to the pure binary system to convert decimal numbers to binary numbers.However, bcd code is unnecessary because most 4-bit states (10 to 16) are not used, but de de-de-deserialations are important applications.

 Sayı Sistemleri Serisi İkili Sayı Sistemi/Binary Numbers İşaretli İkili Sayılar/Signed Binary Numbers İkili Kesirler/Binary Fractions İkili Ondalık Dönüşüm İkili Kodlanmış Onluk Sayılar/BCD On Altılı Sayı Sistemi Sekizil Sayı Sistemi