Binary-coded decimal: Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit
m formatting fix
Line 6:
[[File:Binary clock.svg|250px|thumbnail|right|A [[binary clock]] might use [[Light-emitting diode|LED]]s to express binary values. In this clock, each column of LEDs shows a binary-coded decimal numeral of the traditional [[sexagesimal]] time.]]
 
In [[computing]] and [[electronics|electronic]] systems, '''binary-coded decimal''' ('''BCD''') is a class of [[Binary numeral systemnumber|binary]] encodings of [[decimal]] numbers where each [[numerical digit|digit]] is represented by a fixed number of [[bit]]s, usually four or eight. Sometimes, special bit patterns are used for a [[Sign (mathematics)|sign]] or other indications (e.g. error or overflow).
 
In [[byte]]-oriented systems (i.e. most modern computers), the term ''unpacked'' BCD<ref name="Intel_IA32"/> usually implies a full byte for each digit (often including a sign), whereas ''packed'' BCD typically encodes two digits within a single byte by taking advantage of the fact that four bits are enough to represent the range 0 to 9. The precise four-bit encoding, however, may vary for technical reasons (e.g. [[Excess-3]]).