~ Office Supplies ~~ Buy Posters ~~ A-Z Products ~~ Website Advertising


Binary-coded decimal - Wikipedia

<<Up     Contents

Binary-coded decimal

Redirected from BCD

Binary coded decimal (BCD) is a numeral system used in computer memory. In BCD, numbers are represented as decimal digits, and each digit is represented by four bits:

 Digit Bits      Digit Bits
   0   0000        5   0101
   1   0001        6   0110
   2   0010        7   0111
   3   0011        8   1000
   4   0100        9   1001
To encode a number such as 127, then, one simply encodes each of the decimal digits as above, giving (0001, 0010, 0111).

Since most computers store data in eight-bit bytes, there are two common ways of storing four-bit BCD digits in those bytes: either one can simply ignore the extra four bits of each byte, usually filling them with zero bits or one bits (as in EBCDIC); or one can store two digits per byte, called "packed" BCD. Thus the number 127 would be represented as (11110001, While BCD is wasteful (about 1/6 of the available memory is wasted, even in packed BCD), it has a direct correspondence to the ASCII character set if the BCD number is prepended or OR'd with 00110000 (decimal 48), and large numbers can easily be displayed on 7-element displays by splitting up the nybbles and sending each to a different character (the individual characters often have the wiring to display the correct figures). The BIOS in PCs usually keeps the date and time in BCD format, probably for historical reasons.

wikipedia.org dumped 2003-03-17 with terodump




 
 
30 gram picture MOONSTONE feldspar orthoclase gem Cab cabochon raw rough jewelry gemstone 154 carat
 30 gram picture MOONSTONE feldspar orthoclase Cab cabochon raw jewelry 154 carat 
 
100 carats Green PERIDOTS gem stones included rough tumbled polished jewelry gemstones lot 20 grams
 100 carats Green PERIDOTS included tumbled polished jewelry lot 20 grams 
 
25 carat PURPLE Russian CHAROITE gemstone Loose hand polished jewelry gem stone piece 5 gram PRETTY
 25 carat PURPLE Russian CHAROITE Loose hand polished jewelry piece 5 gram PRETTY 
 
14 carat blue gray sapphire MOONSTONE feldspar orthoclase gem Cab cabochon jewelry gemstone 15x13 mm
 14 carat blue gray sapphire MOONSTONE feldspar orthoclase Cab cabochon jewelry 15x13 mm 
 
17 gr Arizona pink red yellow PETRIFIED WOOD gem Cab lapidary rough tumble polished cabbing gemstone
 17 gr Arizona pink red yellow PETRIFIED WOOD Cab lapidary tumble polished cabbing