Binary Code: Coding Systems
Binary Code: Coding Systems
Binary Code: Coding Systems
Coding systems[edit]
ASCII code[edit]
The American Standard Code for Information Interchange (ASCII), uses
a 7-bit binary code to represent text and other characters within
computers, communications equipment, and other devices. Each letter
or symbol is assigned a number from 0 to 127. For example, lowercase
"a" is represented by 1100001 as a bit string (which is 97 in decimal).
Binary-coded decimal[edit]
Binary-coded decimal, or BCD, is a binary encoded representation of
integer values that uses a 4-bit nibble to encode decimal digits. Four
binary bits can encode up to 16 distinct values; but, in BCD-encoded
numbers, only the first ten values in each nibble are legal, and encode
the decimal digits zero, through nine. The remaining six values are
illegal, and may cause either a machine exception or unspecified
behavior, depending on the computer implementation of BCD arithmetic.
BCD arithmetic is sometimes preferred to floating-point numeric formats
in commercial and financial applications where the complex rounding
behaviors of floating-point numbers is inappropriate. [16]