Binary-coded decimal

Binary-coded decimal (BCD) is a family of methods to encode decimal numbers in binary data formats. It is not particularly common, though it used to be more common than it is now.

It is inefficient compared to purely base-2 number formats, but it can be useful when accurate decimal calculations are needed.

Format
Each decimal digit is encoded in four bits:

Two digits are usually packed into a single byte, though there can be just be one digit per byte, among other possible encodings.

Links

 * Wikipedia article