You are on page 1of 5

CHRIST

Deemed to be University
CRC: Example 2
● Original Data: 100100, Divisor: 1101
○ Quotient:111101, Remainder: 001
○ Transmitted Data = Data +CRC .i.e.100100+001=100100001
● Received Data: 100100001, Divisor: 1101
○ Quotient: 111101, Remainder: 000

Excellence and Service 1


CHRIST
Deemed to be University
CRC…(Example 3)

Example calculation of the CRC


Excellence and Service 2
CHRIST
Deemed to be University
Hamming Codes
● Capable of detecting up to 2 Simultaneous bit errors & correcting Single-bit errors
● Source inserts redundant bits within the message.
● Redundant bits are extra bits that are generated and…
● Redundant bits are inserted at specific positions in the message itself

● Number of parity bits calculated: 2R ≥ R+m+1, (HERE, m is message bits, R is redundant bits,
1 is extra bits to indicate no error)
○ Eg. If message m=4 then… m1,m2,m3,m4
■ 2R ≥ R+4+1

■ 2R ≥ R+5

■ 23 ≥ 3+5

■ 23 ≥ 8

■ 8=8 ( Equal: So, the Condition is TRUE)

● Actual message m=4, redundant R=3 are added, now total message m is 4+3=7 i.e. m=7)
○ Step 1 − Calculation of the number of redundant bits.
○ Step 2 − Positioning the redundant bits.
○ Step 3 − Calculating the values of each redundant bit.
Excellence and Service 3
CHRIST
Deemed to be University
Hamming Codes…(2)
● Number of parity bits calculated: 2R ≥ R+m+1,
● Step 1 − Calculation of the number of redundant bits.
○ m is message bits
○ R is parity bits which are added, so RM can at least indicate R+m+1
● Step 2 − Positioning the redundant bits.
○ R redundant bits should be placed at bit positions of powers of 2

Total M=7 1 2 3 4 5 6 7
R=3 20 21 22
R=3 R1 R2 R3
R=3,
R1 R2 M1 R3 M2 M3 M4
Actual M=4
R1, R2, R3 are 3 redundant bits placed in between the messages M1, M2, M3,M4

● Step 3 − Calculating the values of each redundant bit.


○ Redundant bits should be parity bits makes the number of 1s either even or odd.
Excellence and Service 4
CHRIST
Deemed to be University
Question: Construct (7,4) hamming code for the message 1000?
● Condition: Consider Even Parity
1 2 3 4 5 6 7
R3 R2 R1
21 21 22 4 2 1
R1 R2 R3 0 0 0 0
R1 R2 M1 R3 M2 M3 M4 0 0 1 1
R1 R2 1 R3 0 0 0 0 1 0 2
● R1=> 1 3 5 7 for even parity => (R1)100 => R1=1 0 1 1 3
● R2=>2 3 6 7 for even parity => (R2)100 => R2=1 1 0 0 4
● R3=>4 5 6 7 for even parity =>(R3)000 =>R3=0 1 0 1 5
1 2 3 4 5 6 7 1 1 0 6
21 21 22 1 1 1 7
R1 R2 R3
R1 R2 M1 R3 M2 M3 M4
R1 R2 1 R3 0 0 0
1 1 1 0 0 0 0
● Hamming Code for message 1000 is 1110000
Excellence and Service 5

You might also like