Content deleted Content added
"3/8" --> "about 1/6" -- it is not 1-10/16, but rather 1-(log 10)/(log 16). |
mNo edit summary |
||
Line 13:
Since most computers store data in eight-bit [[byte]]s, 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, 11110010, 11110111) in EBCDIC; or as (00000001, 00100111) in packed BCD (with a leading zero added).
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 [[Integral data type|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,
|