Codes - Notations: Introduction To Computer Networks
Codes - Notations: Introduction To Computer Networks
Codes - Notations: Introduction To Computer Networks
(7,4)
K =4 redundancy
1 2
5 6
001
010
100
101
110
111
011
All other bits are data bits
3, 5, 6, 7, 9, 10….
Each parity bit covers all bits where the bitwise 1 2 3 4 5 6 7
AND of the parity position and the bit position is
non-zero. 1 2 3 4 5 6 7
example : Bit 1 = 001
bit 2 AND bit 1 = 001 & 010 =000 1 2 3 4 5 6 7
bit 3 AND bit 1 = 001 & 011 = 001
….
bit 1 = bit 3 bit 5 bit 7
7
Hamming Codes - Construction Hamming Codes - Construction
Use Generating Matrix (G) and Parity Check
Example: error in bit 5
Matrix (H).
G x =y x (1 0 1 1)
H y = s 1 1 0 1 0
s is a null vector iff y is a code word, i.e. no parity error. 1 0 1 1 1
1 1
If s is not null, it indicates which bit had an error
0 0 0 1
0
1 1 0 1 G x 0 1 1 1 0 y
0 1 0 0 0
1
1 0 1 1
0 1
1 0 1 0 1
0 0 0
0 0 0 1 1
G 0 1 1 1
0 0
1 0 0
0
0 1
0 0 1 0 0 1 0 1 0 1 0 1 1 1
0 0 0 1 H y 0 0 1 1 0 0 1 1 0 0
1 0 0 0 1 1 1 1 1 1
1 0 1 0 1 0 1
0 1
H 0 1 1 0 0 1 1
0 0 0 1 1 1 1 0 1
message
16
CRC CRC
Here's a picture for the start of the division of Here's a picture for the start of the division of
(x6 + x2 + 1) divided by (x3 + x2 + 1) (x6 + x2 + 1) divided by (x3 + x2 + 1)
x2 x1 x0 x2 x1 x0
0
0 0 0 1000101000 0 0 1 000101000
Let's do the steps. I'll list the output bit, the Let's do the steps. I'll list the output bit, the
values in the boxes, and the remaining input values in the boxes, and the remaining input
17 18
CRC CRC
Here's a picture for the start of the division of Here's a picture for the start of the division of
(x6 + x2 + 1) divided by (x3 + x2 + 1) (x6 + x2 + 1) divided by (x3 + x2 + 1)
x2 x1 x0 x2 x1 x0
0 1
0 1 0 00101000 1 0 0 0101000
Let's do the steps. I'll list the output bit, the Let's do the steps. I'll list the output bit, the
values in the boxes, and the remaining input values in the boxes, and the remaining input
19 20
CRC CRC
Here's a picture for the start of the division of Here's a picture for the start of the division of
(x6 + x2 + 1) divided by (x3 + x2 + 1) (x6 + x2 + 1) divided by (x3 + x2 + 1)
x2 x1 x0 x2 x1 x0
1 1
1 0 1 101000 1 1 0 01000
Let's do the steps. I'll list the output bit, the Let's do the steps. I'll list the output bit, the
values in the boxes, and the remaining input values in the boxes, and the remaining input
21 22
CRC CRC
Here's a picture for the start of the division of Here's a picture for the start of the division of
(x6 + x2 + 1) divided by (x3 + x2 + 1) (x6 + x2 + 1) divided by (x3 + x2 + 1)
x2 x1 x0 x2 x1 x0
0 0
0 0 1 1000 0 1 1 000
Let's do the steps. I'll list the output bit, the Let's do the steps. I'll list the output bit, the
values in the boxes, and the remaining input values in the boxes, and the remaining input
23 24
CRC CRC
Here's a picture for the start of the division of Here's a picture for the start of the division of
(x6 + x2 + 1) divided by (x3 + x2 + 1) (x6 + x2 + 1) divided by (x3 + x2 + 1)
x2 x1 x0 x2 x1 x0
1 0
1 1 0 00 0 0 1 0
Let's do the steps. I'll list the output bit, the Let's do the steps. I'll list the output bit, the
values in the boxes, and the remaining input values in the boxes, and the remaining input
25 26
CRC
Here's a picture for the start of the division of
(x6 + x2 + 1) divided by (x3 + x2 + 1)
x2 x1 x0
0
0 1 0
27