Definition 

Double coded decimal (BCD) is an arrangement of composing numerals that appoints a four-digit parallel code to every digit 0 through 9 of every a decimal (base-10) numeral. The four-piece BCD code for a specific single base-10 digit is its portrayal in double documentation, as takes after: 0 = 0000.

Explanation

 In registering and electronic frameworks, twofold coded decimal (BCD) is an encoding for decimal numbers in which every digit is spoken to by its own particular double grouping. Its fundamental prudence is that it enables simple transformation to decimal digits for printing or show and speedier decimal computations. Its disadvantages are the expanded many-sided quality of circuits expected to execute numerical activities and a moderately wasteful encoding – it involves more space than an unadulterated double portrayal. Despite the fact that the significance of BCD has reduced, it is still broadly utilized as a part of money related, business, and modern applications. In BCD, a digit is typically spoken to by four bits which, as a rule, speak to the qualities/digits/characters 0-9. Other piece mixes are now and again utilized for sign or different signs.

To BCD-encode a decimal number utilizing the basic encoding, every decimal digit is put away in a four-piece snack.
Decimal:    0         1       2      3       4       5       6        7       8      9
BCD:      0000 0001 0010 0011 0100 0101 0110 0111 1000 1001

Thus, the BCD encoding for the number 127 would be: 0001 0010 0111

Since most PCs store information in eight-piece bytes, there are two regular methods for putting away four-piece BCD digits in those bytes:

  1. every digit is put away in one byte, and the other four bits are then set to each of the zeros, each of the ones (as in the EBCDIC code), or to 0011 (as in the ASCII code) 

  2. two digits are put away in every byte.

Next lecture                                                                                                                   Previous Lecture