0% found this document useful (0 votes)
36 views15 pages

EEE6432-A Closer Look at Hamming Code

Uploaded by

saiedali2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views15 pages

EEE6432-A Closer Look at Hamming Code

Uploaded by

saiedali2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

A closer look at Hamming code

Prof. Jie Zhang & Dr. Jiliang Zhang


{jie.zhang, jiliang.zhang}@sheffield.ac.uk
General Hamming code

r0 = a 3 + a 1 + a 0 s0 = b3 + b1 + b0 + q0
r1 = a 3 + a 2 + a 0 s1 = b3 + b2 + b0 + q1 Why?
r2 = a 3 + a 2 + a 1 s2 = b3 + b2 + b1 + q2

Bit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
position
Encoded
r0 r1 a0 r2 a1 a2 a3 r3 a4 a5 a6 a7 a8 a9 a10 r4 a11 a12 a13 a14
data bits
s0

Par s1
ity
s
bit 2
s s3

s4

C(1,3) C(7,4) C(15,11)


Two different C(7,4) Hamming codes

Bit Bit
1 2 3 4 5 6 7 1 2 3 4 5 6 7
position position
Encoded Encoded
r0 r1 a0 r2 a1 a2 a3 r0 r1 a2 r2 a0 a3 a1
data bits data bits

Par s0 Par s0
ity ity
s s
bit 1 bit 1
s s2 s s2

r0 = a 3 + a 1 + a 0 r0 = a 2 + a 1 + a 0
r1 = a 3 + a 2 + a 0 r1 = a 3 + a 2 + a 1
r2 = a 3 + a 2 + a 1 r2 = a 1 + a 0 + a 3
Trade-off in Hamming Code
Efficiency vs Reliability
Parity bits Total bits Data bits Name Rate
C(3,1)
2 3 1 1/3 ≈ 0.333
(Triple repetition code)
3 7 4 C(7,4) 4/7 ≈ 0.571
4 15 11 C(15,11) 11/15 ≈ 0.733
5 31 26 C(31,26) 26/31 ≈ 0.839
6 63 57 C(63,57) 57/63 ≈ 0.905
7 127 120 C(127,120) 120/127 ≈ 0.945
8 255 247 C(255,247) 247/255 ≈ 0.969

A codeword consists of n bits of which k are


data bits and r are check bits.
Let m = r, then we have: n = 2m -1
and k = n-m
Generator matrix for Hamming code

r0 = a 2 + a 1 + a 0
r1 = a 3 + a 2 + a 1
r2 = a 1 + a 0 + a 3
Parity check matrix for Hamming code

Proof
Associative property
Exercise

For a (7,4) Hamming code, the generator matrix is

Find
a) All corresponding code words
b) Minimum Hamming distance
c) Error detection and correction capability
d) Parity check matrix
e) Find error if received code is [0 1 1 0 0 1 1]
Answer
a) All corresponding code words

b) Minimum Hamming distance


3
c) Error detection and correction capability
2&1
Answer

d) Parity check matrix

e) Find error if received code is [0 1 1 0 0 1 1]

The third bit is corrupted.


The transmitted codeword is [0 1 0 0 0 1 1].
Information correction in erasing channel
A binary erasure channel (or BEC) is a common communications channel model used
in coding theory and information theory. In this model, a transmitter sends a bit (a zero
or a one), and the receiver either receives the bit or it receives a message that the bit
was not received ("erased").

s2 s1 s0 Tanner graph

a3 a2 a1 a0 r2 r1 r0

0 1 e e 0 1 1

0 1 0 0 0 1 1
Burst Errors

• A Hamming code can only correct a single error or


detect a double error. However, there is a way to
make it detect a burst error, as shown in Figure 10.13.
• The key is to split a burst error between several
codewords, one error for each codeword.
Burst Errors

• In data communications, we normally send a packet


or a frame of data. To make the Hamming code
respond to a burst error of size N, we need to make N
codewords out of our frame.
• Then, instead of sending one codeword at a time, we
arrange the codewords in a table and send the bits in
the table a column at a time.
Burst Errors

• In Figure 10.13, the bits are sent column by column


(from the left). In each column, the bits are sent from
the bottom to the top. In this way, a frame is made
out of the four codewords and sent to the receiver.
• Figure 10.13 shows that when a burst error of size 4
corrupts the frame, only 1 bit from each codeword is
corrupted. The corrupted bit in each codeword can
then easily be corrected at the receiver.
Interleaving: Burst error correction using Hamming code

10.
Fundamental concepts for next two lectures

• Generator matrix
• Parity check matrix
• Binary erasure channel
• Tanner graph

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy