topcn
topcn
topcn
These redundant bits are generated and inserted at certain positions in the
message. They are mostly used for error detection and correction process.
Redundant Bits
So let's get into detail about the implementation of Hamming Code.
Implementation of Hamming code uses redundant bits. Firstly what is a
redundant bit? Redundant bits are the extra bits that are added by the sender and
removed(decoded) by the receiver.
They are generated by following the below algorithm. These extra redundant bit
help not only in error detection but also in error correction by indicating at which
bit the error occurred.
2�≥�+�+12R≥M+R+1
For instance, if data bits are 4 then the number of redundant bits can be
calculated as 23>=4+3+123>=4+3+1 where 3 is the required number of
redundant data bits so that no data is lost during the transmission.
Parity Bits
Parity bits are nothing but redundant bits that are added to oversee that no data is
being lost during transmission. These extra bits are basically used for error
detection at the receiver point. There are two types of parity bits, which are:
Odd Parity bit:
• To find the value of a parity bit we need to check the number of ones in the
data.
• So, the number of ones is counted, if the count is even then the odd parity
bit's value is set to 1 and vice-versa if the count is odd, i.e parity bit's value
is set to 0.
Parity bits are placed at the bit position which is the power of 2 i.e, ( 2^0^ , 2^1^,
2^2^, 2^3^, 2^4^ ,.... so on) which are (1,2,4,8,... so on ). So for example, in the
7-bit data transfer we will be having 4 parity bits which are (1,2,4,8).
2�≥�+�+12R≥M+R+1
23>=4+3+123>=4+3+1
Therefore the number of redundant bits for lossless of data during transmission
is 3 Therefore the total number of bits obtained are(redundant bits + data bits)
3+4=73+4=7
The redundant bits are placed at positions corresponding to the power of 2 i.e (1,
2, 4, 8, 16...etc)
Where D represents data bit and R represents parity bit. Let's suppose the data to
be transmitted is 1110 the bit will be placed as follows:
1. To find the value of R1: Follow this- check 1 bit, then skip 1 bit, check 1
bit and then skip 1 bit, and so on. R1 bits: 1, 3, 5, 7, 9, 11.. so on, Since the
total number of bits is 7. So, R1 bits are: 1, 3, 5, 7. This is clearly explained
using the image:
This image is just an example but the value in the bits should be like in the next
image attached here(same for all below cases)
Mathematically: R1 = even parity(1, 3, 5, 7) = 0 For the value of redundant bit
R1, we check for even parity. Since the total number of 1’s in all the bit positions
corresponding to R1 is an even number the value of R1 (parity bit’s value) = 0
2. To find the value of R2: Follow this- check 2 bits, then skip 2 bits, check 2
bits and then skip 2 bits, and so on. R2: bits 2, 3, 6, 7
3. To find the value of R4: Follow this check 4 bits, then skip 4 bits,
check 4 bits and then skip 4 bits, and so on. R4: bits 4, 5, 6, 7
Mathematically: R4 = even parity(4, 5, 6, 7) = 1 For the value of redundant bit
R4, we check for even parity. Since the total number of 1’s in all the bit positions
corresponding to R4 is odd number the value of R1 (parity bit’s value) = 1