Binary Code

Example 1: Hamming code & parity bit

Eg. So let’s form hamming code using 4-bit message bits 1101 with parity bits as even parity bit and check how it is able to detect and correct error. As we have already decided parity bit positions and their corresponding message bits for a 4-bit message For the moment we have hamming code as P1    P2    1 P3 1 […]

Binary Code

Parity bit relation with message bits

E.g.  Consider the parity bit P1 and we have to find the position of message bits which we’ll cover with this parity bit. Firstly write the binary equivalents of positions of message bit Bit1        bit2       bit3        bit4        bit5        bit6        bit7 Parity    parity                    parity P1                  P2             M1                P3           M2               M3          M4  001          010         011 […]

Binary Code

Hamming code

This code is used for single error correction i.e. using this code we can detect only single error. In parity bit method we used only single extra bit but in this method number of extra bits (which also are parity bits) vary with the number of bits of the message. Suppose we have the number […]

Binary Code

Parity Bit questions

Q1. Find out the parity bit (odd) for message 1100 As 1100 has 2 i.e. even number of 1’s so we take parity bit (odd) as 1 to make odd number of 1’s out of 5 bits So message we send is 11001 (5th is the parity bit) Q2. Find out the parity bit (even) for […]

Binary Code

Parity bit

A parity bit is an extra bit that is attached to the information that is being sent from one position to the other. This bit is attached just to detect the error if any in the information during the transmission.  This bit is used to make number of 1’s in the message or information either […]

Binary Code

Gray Code

This is also called unit distance code or reflected code. This coding system has a property that there is only one bit change between consecutive gray codes. The following table would show gray codes of decimal values. Binary to gray conversion: Starting from right to left If it is MSB then place it as it is […]

Binary Code

Excess-3 Code

It is also known as XS-3. We add 310 or 1102 to the each 4-bit combination of BCD codes to get excess-3 codes. We can see the corresponding Excess-3 codes of each BCD number:  Decimal Binary                   BCD                                        Excess-3 0          0000                       0000                                       0011         0001                       0001                                       0100         0010                       0010                                       0101         0011                       0011                                       0110         0100                       0100                                       0111         0101                       […]