













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














6.02 F^
all 2012^
Lecture 4, Slide
6.02 Fall 2012 Lecture 4, Slide #
Original source Source coding(if needed) Digitize Source binary digits(“message bits”) Bit stream
Receiving app/user Source decoding Render/display,etc. correction)(bit error^ ChannelCoding^ Bits^ samplesMapperXmit+ (Voltages)Signalsover DemappersamplesRecv+^ Bit stream physical link (reducing orbit errors)Decodingremoving^ Channel
computers Bits
6.02 Fall 2012^
Lecture 4, Slide #
If d is the minimum Hamming distance betweencodewords, we can: •^ detect^ all
patterns of up to t bit errorsif and only if^ d ≥ t+
-^ correct^ all
patterns of up to t bit errorsif and only if^ d ≥ 2t+
-^ detect^ all
patterns of up to t
bit errorsD^ while correcting all patterns of t
(
Block code:
k^ message bits encoded to
n^ code bits
i.e., each of
k^ 2 messages encoded into a unique
n-bit
codeword via a
linear transformation. Key property:
Sum of any two codewords is
also^ a
codeword^
necessary and sufficient for code to be linear. (n,k)^ code has rate
k/n. Sometime written as
(n,k,d) , where
d^ is the minimum
Hamming Distance of the code. 6.02 Fall 2012^
Lecture 4, Slide #
k -bit blocks
-^ Add ( n-k ) parity bits to each block using (
n-k ) linear
equations, making each block
n^ bits long
-^ Every linear code can be represented by an equivalentsystematic form --- ordering is not significant, directinclusion of k message bits in n-bit codeword is. •^ Corresponds to using invertible transformations onrows and permutations on columns of G to get •^ G = [I | A] --- identity matrix in the first k columns^ 6.02 Fall 2012^
Lecture 4, Slide # Message bits^ kn-k Parity bitsn
6.02 Fall 2012^
Lecture 4, Slide #
DDP^1 21 DD^3 4 P^ P^3
P^ is parity bit^1 for row #
Idea: start with rectangulararray of data bits, add paritychecks for each row andcolumn.^ Single-bit error indata will show up as parity
P^2 (n,k,d)=?
errors in a particular rowand column, pinpointing the
P^ is parity bit^4
bit that has the error.
for column #
0 1 1^
0 1 1^
0 1 1
1 1 0^
1 0 0^
1 1 1
1 0^
1 0^
1 0
Parity for each row
Parity check fails for
Parity check only fails
and column is^
row #2 and column #
for row #
correct^ ⇒^ no errors
⇒^ bit D^ is incorrect^4
⇒^ bit P^2
is incorrect
Task: given k-bit message, compute n-bit codeword.
We can
use standard matrix arithmetic (modulo 2) to do the job.
For
example, here’s how we would describe the (9,4,4) rectangularcode that includes an overall parity bit.^1
0 0 0 1 0
1 0 1 0 1 0 0 1 0
⎥ 0 1 1 DDDD [^ ]^1 2 3
⎥ =^ D^ D^ D^
0 0 1 0 0 1
(^1) ⎥ (^1 0 ) 2 3 4 1
2 3 4 5 ⎥ 0 0 0 1 0 1
0 1 1 6.02 Fall 2012^
Lecture 4, Slide # ⎤ ⎦ ⎡ ⎢ ⎢•⎢ ⎢ ⎣ 1×k k×n^
1×n
message^
generator^
code word
vector^
matrix^
vector
( n − k^ )
w.
Calculates all the parity bits from the data bits.If no parity errors, return
rc^ bits of data. Single row or column parity bit error
^ rc^ data
bits are fine, return themIf parity of row
x^ and parity of column
y^ are in
error, then the data bit in the
( x , y )^ position is wrong; flip it and return the
rc^ data bits All other parity errors are
uncorrectable
.^ Return
the data as-is, flag an “uncorrectable error” 6.02 Fall 2012^
Lecture 4, Slide #
parity bits, which collectively can represent^^2
n-k^ possibilities
-^ For^ single-bit error
correction, parity bits need to represent two sets of cases:^ –^ Case 1: No error has occurred (1 possibility)^ –^ Case 2: Exactly one of the code word bits has anerror ( n^ possibilities, not
k )
-^ So we need
-^ Rectangular codes satisfy this with big margin ---inefficient 6.02 Fall 2012^
Lecture 4, Slide #
-^ Hamming codes correct single errors with theminimum number of parity bits:
-^ (7,4,3) •^ (15,11,3)m^ m •^ (2^ –1,^
-1-m,3)
-^ --- “perfect codes” (but not best!) 6.02 Fall 2012^
Lecture 4, Slide #
unique
combination of parity bits 6.02 Fall 2012^
Lecture 4, Slide #
Index^1
3 4
5 6 7 Binary^001 010 index^
011 100
101 110 111 (7,4)^ P1^ P2 code
D1^ P^
D2^ D3^ D4 P with binary index 00 1
1 covers
P^ = D^ +D+D^1 1
4 P^ = D^ +D+D^2 1
D 4 with binary index 01 1
1
P= D^ +D+D^3 2
D 4 with binary index 10 2
1 Dwith binary index 11^4
1
6.02 Fall 2012^
Lecture 4, Slide #
i
E^ = D’^ + D’^1 1 to figure out correction
Index^1
3 4 5
6 7 Binary^001 010 index^
011 100 101
110 111 (7,4)^ P1^ P2^ code
D1^ P3^ D^
D3^ D
⎞^ n! “n choose m” =
⎜^ ⎟ = m (⎝⎠^
n^ −^ m )! m! 6.02 Fall 2012^
Lecture 4, Slide #
-^ e.g., ISBN numbers for books,0-691-12418-3(Luenberger’s
Information Science
)
-^ 1D^ + 2D^1
+3D+…+10D 2 3
= 0 mod 11 10 Detects single-digit errors, and transpositions 6.02 Fall 2012^
Lecture 4, Slide #