EE161 — Spring 2021 San Jose´ State University
Homework # 6 Due: Thu. 3/25/21
1. A systematic binary linear (5,2,3) code1 has generator matrix
G =
1 0 0 1 1
0 1 1 0 1
(a) What is the parity-check matrix H of this code?
(b) Build an encoding look-up table with two columns where you list all the 4 com-
binations of 2 information bits x = B¯ = (B1 B2) in the first column and the
associated codewords c = xG = B¯G in the second column.
(c) Build a hard-decision decoding lookup table (LUT) with two columns: In the
second column list all the six possible error vectors e¯ of Hamming weight2 up to
one (no errors plus five single errors). In the first column (LUT address) list the
associated syndrome vectors s¯ = e¯HT .
(d) Suppose that the received vector is r¯ =
1 1 0 1 0
i. Determine the syndrome vector s¯
ii. Use the decoding LUT of part (c) to determine the most likely error vector e¯
iii. Determine the most likely information bits ̂¯B = (B̂1 B̂2)
2. Download MATLAB script sim3DQ.m from Canvas. The script simulates both QPSK
and the 3DQ mapping discussed in class. Run the script with your student ID number.
(a) Use the figure produced by the script to estimate the coding gain of 3DQ over
QPSK at an average BER value of 10−5.
3. Maximum-likelihood decoding of the binary Hamming (7,4,3) code
Download MATLAB script Hamming743 SD vs HD decoder.m from Canvas. The script
simulates the performance of both hard-decision (HD) and soft-decision (SD) decoders
under AWGN. Run the script with your student ID number. The parts below refer to
an average bit-error rate (BER) value equal to 10−3.
(a) Determine the simulated coding gain of the SD decoder over the HD decoder
(b) Compare the simulated coding gain of the SD decoder, with respect to uncoded
BPSK, to the real coding gain (RCG) introduced in class
4. (Optional. Extra points in Midterm Exam 1) 16-QAM mapping
Consider a digital communication system with the 16-QAM IEEE 802.11 mapping
shown in class and the orthonormal pulses shown in the figure below. The symbol
1Be careful. This problem is similar but not equal to that in sample homework 6.
2The Hamming weight is equal to the number of ones in a vector.
period is formalized so that T = 1 and the average signal energy Es = 5 and the infor-
mation bits to be sent are (B1, B2, B3, B4) = (0 1 0 1).
(a) Determine the mapper outputs (s1, s2).
(b) In the same graph, plot or sketch carefully
i. The “in-phase” signal s1(t) = s1 · ψ1(t)
ii. The “quadrature” signal s2(t) = s2 · ψ2(t), and
iii. The modulated signal s(t) = s1(t) + s2(t)
(c) Suppose now that the correlator outputs are (Y1, Y2) = (2.5, 2.5). Determine the
estimated bits (B̂1, B̂2, B̂3, B̂4, ).