Binary Coding
Binary Coding
In the coding, when numbers, letters or words are represented by a specific group of symbols,
it is said that the number, letter or word is being encoded. The group of symbols is called as a
code. The digital data is represented, stored and transmitted as group of binary bits. This
group is also called as binary code. The binary code is represented by the number as well as
alphanumeric letter.
Excess-3 Code: Excess-3 (or XS-3) , is a non-weighted BCD code. The code derives its
name from the fact that each binary code word is the corresponding 8241 code word plus
00112 (310).
Gray Code: Gray code is a non-weighted code and is not suitable for arithmetic operation. It
is not a BCD code. It is a cyclic code because successive code words in this code differ in one
bit position only, i.e. it is a unit distance code.
Suppose W1' W2' W3 and W4 are the weights of binary digits and Xl' X2, X3 and X4 are the
corresponding digit values then decimal digit. N = W1 Xl + W2 X2 + W3 X3 + W4 X4 is
represented by binary sequence X4 X3 X2 X4.
The codes 8421BCD, 2421BCD, 5211BCD are all weighted codes.
• Non-weighted codes: The non-weighted codes are not positionally weighted. In other
words, each digit position within the number is not assigned a fixed value ( or weight ).
Excess-3 and gray code are non-weighted codes.
• Reflective codes: A code is reflective when the code is self complementing. In other words,
when the code for 9 is the complement the code for 0, 8 for 1, 7 for 2, 6 for 3 and 5 for 4.
2421BCD, 5421BCD and Excess-3 code are reflective codes.
• Sequential codes: In sequential codes, each succeeding 'code is one binary number greater
than its preceding code. This property helps in manipulation of data.
8421 BCD and Excess-3 are sequential codes.
• Alphanumeric codes: Codes used to represent numbers, alphabetic characters, symbols and
various instructions necessary for conveying intelligible information.
ASCII, EBCDIC, UNICODE are the most-commonly used alphanumeric codes.
• Error detecting and correcting codes: Codes which allow error detection and correction
are called error detecting and correcting codes. Hamming code is the mostly commonly used
error detecting and correcting code.