Tugas Lab Session 2
Tugas Lab Session 2
1110117421417
EXERCISES
1. Apply table lookup decoding to (7,4) hamming code. The P submatrix is given as
1 0 1
N= 7 , k=4
1 0 1 1 0 0 0
[
G= 1
1
0
1
1
1
1
0
1
0
0
0
1
0
0
0
1
0
0
0
1
]
1 0 0 1 1 1 0
[
H= [ Ikxk |Pt ¿= 0 1 0 0 1 1 1
0 0 1 1 1 0 1 ]
c) Tabulate the code words through simulation and write their corresponding
weights.
Message Code Vector Weigths
0000 0000000 -
0001 0110001 3
0010 1100010 3
0011 1010011 4
0100 1110100 4
0101 1000101 3
0110 0010110 3
0111 0100111 4
1000 1011000 3
1001 1101001 4
1010 0111010 4
1011 0001011 3
1100 0101100 3
1101 0011101 4
1110 1001110 4
1111 1111111 7
Reindy Gerian Pranata
1110117421417
PROGRAM:
2. Write MATLAB code to construct lookup table for the (6,3) block code generated by the
submatrix.
1 1 0
[ ]
0 1 1
1 0 1
Reindy Gerian Pranata
1110117421417
PROGRAM :
%Linear Block Code
clc;
clear all;
% Input Generator Matrix
G=input('Masukkan Generator Matrix: ')
disp ('G = ')