Binary code
From Wikipedia, the free encyclopedia
It has been suggested that this article or section be merged with Binary numeral system. (Discuss) |
The term binary code can mean several different things:
- In mathematics, a binary code can refer to a linear code over the finite field F2 = Z/2Z.
- In computing and telecommunication, it is used for any of a variety of methods of coding data, such as sequences of characters, into sequences of groups of bits, including fixed-width words or bytes, and variable-length codes such as Huffman code and arithmetic coding.
In a fixed-width binary code, each letter, digit, or other character, is represented by a sequence of bits of the same length, usually indicated in code tables by the octal, decimal or hexadecimal notation for the value of that sequence of bits interpreted as a binary number.
For representing texts in the Latin alphabet often a fixed width 8-bit code is used. The ISO 8859-1 character code uses 8 bits for each bits for each character e.g. "R" is "01010010" and "b" is "01100010"; the block of 8 bits is called a byte; it extended the earlier ASCII code, based on the version of the Latin alphabet used for English, which uses 7 bits to represent 128 characters (0–127).
The Unicode standard defines several variable-width encodings and the fixed-with 32-bit (4-byte) UTF-32 code, potentially having room for billions of characters, but using barely more than one million combinations as definable code points.