
Hamming Codes
Hamming Code (8:4)
The Hamming code used in teletext is used to reduce the possibility of
errors for the sending address and control information.
It is possible to correct a single error in the received byte and detect multiple errors,
when there are 2, 4 or 6 error bits. When there are 3, 5, 7 or 8 errors in a byte, this
results in a false message being decoded.
The hamming code used in teletext is a (8,4) (n,k)
Code Rate Efficiency = k/n = 4/8 = 50%
Where D_{4} D_{3} D_{2} D_{1} are the data bits and C_{3}
C_{2} C_{1} and C_{4} is the parity bit.
8 
7 
6 
5 
4 
3 
2 
1 
D_{4} 
C_{4} 
D_{3} 
C_{3} 
D_{2} 
C_{2} 
D_{1} 
C_{1} 
C_{1} = D_{1} D_{2 } D_{4}
C_{2} = D_{1 } D_{3 } D_{4}
C_{3} = D_{2 } D_{3 } D_{4}
Where represents an ExclusiveOR
operation (addition without carry)
b8 
b7 
b6 
b5 
b4 
b3 
b2 
b1 
0 
0 
0 
1 
0 
1 
0 
1 
0 
0 
0 
0 
0 
0 
1 
0 
0 
1 
0 
0 
1 
0 
0 
1 
0 
1 
0 
1 
1 
1 
1 
0 
0 
1 
1 
0 
0 
1 
0 
0 
0 
1 
1 
1 
0 
0 
1 
1 
0 
0 
1 
1 
1 
0 
0 
0 
0 
0 
1 
0 
1 
1 
1 
1 
1 
1 
0 
1 
0 
0 
0 
0 
1 
1 
0 
0 
0 
1 
1 
1 
1 
0 
0 
0 
1 
1 
0 
0 
1 
0 
0 
1 
1 
0 
1 
1 
1 
0 
1 
0 
0 
0 
0 
1 
1 
0 
1 
1 
0 
1 
1 
0 
1 
1 
1 
1 
1 
1 
0 
1 
1 
1 
1 
0 
1 
0 
1 
0 









Message Bits 

Hamming Code Protection Bits 

b8 
b7 
b6 
b5 
b4 
b3 
b2 
b1 
A 
o 

o 



o 
o 
B 
o 



o 
o 
o 

C 


o 
o 
o 

o 

D 
o 
o 
o 
o 
o 
o 
o 
o 
Results
of 
Parity
Tests 
Inference 
Action 
A,B,C 
D 


All Correct 
Correct 
no errors 
accept message bits 
All Correct 
Not Correct 
error in b7 
accept message bits 
Not all Correct 
Correct 
multiple errors 
reject message bits 
Not all Correct 
Not Correct 
single errors 
refer to table above to identify error.
Correct error if in message bit 




Hamming Code (24:18)
Byte 1
Byte 2
Byte 3
D8 
D9 
D10 
D11 
D12 
D13 
D14 
C10 
