You are on page 1of 10

Block 2 Part)1( Self-Assessments

Activity [1.2]
Which of the following might be valid code words using even parity?
a. 01101010
valid ‫ لو كان زوجي يبقى‬1 ‫بنشوف عدد تكرار الرقم‬
b. 01001100
c. 11110010
d. 11110110

a. Valid
b. Not valid
c. Not valid
d. Valid
====================================================================
Activity [1.3]
Suppose, with G = 99, that a decoder receives the following messages and check digits:
a. Message 234567, check digits 36 ‫ ونشوف اول رقمين بعد الفاصلة لو‬99 ‫هنا هنقسم الرسالة على‬
b. Message 345678, check digits 22. ‫ يبقى ال يوجد خطأ‬check digits ‫نفس‬
In which case must there have been errors?
a. 234567 / 99 = 2369.36  there is no error
b. 345678 / 99 = 3491.69  there is error
====================================================================
Activity [1.6]
Suppose now that we use a denary cyclic redundancy check similar to that described in the
text, but with G = 999.
a. What is the code word if the message is 45454545?
b. The following code words are received at a decoder. What are the message digits in
each case, and do they appear to contain errors?

i. 32132132296
ii. 52310642002
c. Approximately what percentage of errors will this scheme detect, assuming that all
errors are equally likely?
a. 5454545 / 999 = 45500.045  check digits = 045
Code word = message + check digits = 45454545045
b.
i. Code word= message + check digits = 32132132296
Message = 32132132, check digits =296  32132132 / 999 = 32164.296
 There is no error
ii. Code word= message + check digits = 52310642002
Message = 52310642, check digits = 002  52310642 / 999 = 52363.005
 There is error
c. One error in every 999 numbers will not be detected which = 99.9% of errors will be
detected.
====================================================================
Activity [1.7]
One of the standards for asymmetric digital subscriber line (ADSL) (which you will read
more about in Block 3) specifies the use of CRCs with the following generator polynomial:
x 8 + x 4 + x 3 + x 2 + 1. What binary number does this represent?

x8 x7 x6 x5 x4 x3 x2 x1 1
1 0 0 0 1 1 1 0 1
 Binary number=100011101
====================================================================
Activity [1.11]
 The figure represents a code word from a rectangular code.
a) How many parity digits are used per code word to check for errors?
b) Describe this code using the (n, k) notation.
c) Calculate the code rate and the redundancy of this code.
d) Assuming that no more than one digit is in error, how many different
errors can be corrected using this code?

a) parity digits are used to check for errors = 8


b) (n, k) notation = (20,12)
𝒌 𝟏𝟐
c) code rate = = = 0.6
𝒏 𝟐𝟎
𝒏−𝒌 𝟐𝟎−𝟏𝟐
The redundancy = = 𝟐𝟎 = 0.4
𝒏
d) The rectangular code can correct a single error at any digit position, including the
parity digits.
n = the total number of bits in the code = 20
k = is the number of bits in the message
k = parity digits - total number = 8 -20 = 12
Activity [1.14]
This question is about a system using the seven-digit Hamming code of Table 1.2.
a. For this code:
i. describe it in the form (n, k)
ii. Write down the code rate.
b. What would the coded messages be if the original messages were the following?
i. 0101 messages ‫هنا الكود نحطه في خانات الـ‬
ii. 1011
c. If the following codes are received, state whether there have been any errors, and give
the decoded output. (Assume that the probability of there being more than one error
in a received code word is negligible.)
i. 1110000
ii. 1101011
a.
i. (n, k) = (7 , 4 )
𝒌 𝟒
ii. code rate = = = 0.57
𝒏 𝟕
b.
i. 0101
1 (Parity) 2 (Parity) 3 (messages) 4 (Parity) 5 (messages) 6 (messages) 7 (messages)
0 1 0 1

‫ الزم يكون عدد التكرار زوجي‬1 ‫بنشوف عدد تكرار الرقم‬


1 (Parity):
1 (Parity) 3 (messages) 5 (messages) 7 (messages)
0 0 1 1

2 (Parity):
2 (Parity) 3 (messages) 6 (messages) 7 (messages)
1 0 0 1

4 (Parity):
4 (Parity) 5 (messages) 6 (messages) 7 (messages)
0 1 0 1

1 (Parity) 2 (Parity) 3 (messages) 4 (Parity) 5 (messages) 6 (messages) 7 (messages)


0 1 0 0 1 0 1
ii. 1011
1 (Parity) 2 (Parity) 3 (messages) 4 (Parity) 5 (messages) 6 (messages) 7 (messages)
1 0 1 1

1 (Parity):
1 (Parity) 3 (messages) 5 (messages) 7 (messages)
0 1 0 1

2 (Parity):
2 (Parity) 3 (messages) 6 (messages) 7 (messages)
1 1 1 1

4 (Parity):
4 (Parity) 5 (messages) 6 (messages) 7 (messages)
0 0 1 1

1 (Parity) 2 (Parity) 3 (messages) 4 (Parity) 5 (messages) 6 (messages) 7 (messages)


0 1 1 0 0 1 1

i. 1110000
1 (Parity) 2 (Parity) 3 (messages) 4 (Parity) 5 (messages) 6 (messages) 7 (messages)
1 1 1 0 0 0 0

1 (Parity) 3 (messages) 5 (messages) 7 (messages)


1 1 0 0
 Parity 1: passed

2 (Parity) 3 (messages) 6 (messages) 7 (messages)


1 1 0 0
 Parity 2: passed

4 (Parity) 5 (messages) 6 (messages) 7 (messages)


0 0 0 0
 Parity 3: passed

The syndrome is 000, and there are no errors

Code word = message = 1000.

ii. 1101011
1 (Parity) 2 (Parity) 3 (messages) 4 (Parity) 5 (messages) 6 (messages) 7 (messages)
1 1 0 1 0 1 1
1 (Parity) 3 (messages) 5 (messages) 7 (messages)
1 0 0 1
 Parity 1: passed

2 (Parity) 3 (messages) 6 (messages) 7 (messages)


1 0 1 1
 Parity 2: fails

4 (Parity) 5 (messages) 6 (messages) 7 (messages)


1 0 1 1
 Parity 3: fails

 The syndrome is 110  this is the binary number 6 and there is error in digit number 6

 Corrected code word = 1101001

==========================================================================
Activity [1.17]
a. Repeating three times gives a code with two code words: 000 and 111. What is the
Hamming distance of this code? How many errors can it correct in each code word?
Describe the code using the (n, k) notation. What is the code rate?

b. Answer the same questions as in part (a) for a code that repeats five times.
a.
 The Hamming distance = 3,  because 000 differs from 111 in three places.
 It can correct a single error in any one code word.
 (n, k) notation = (3, 1) .
Hamming distance = 3
𝒌 𝟏 𝟑−𝟏
 The code rate = = = 0.33 Correct error = 𝟐 = 1 correct a single error
𝒏 𝟑

b.
 The Hamming distance = 5,  because 00000 differs from 11111 in five places.
 It can correct two errors in any one code word
 (n, k) notation = (5, 1) .
𝒌 𝟏
 The code rate = = = 0.2
𝒏 𝟓

Hamming distance = 5
𝟓−𝟏
Correct error = 𝟐 = 2 correct two errors
Activity [1.18]
Consider a block interleaving scheme where 21 consecutive (7,4) hamming code words are
interleaved .

a) The interleaving scheme writes the interleaved code words into a matrix before sending
them (interleaved) through the channel .what are the dimensions of this matrix?
b) Calculate the latency (in bits) caused by the used block interleaving scheme
Matrix Dimensions = p × n p = rows = 4 n = column = 7
 Matrix Dimensions = 4 × 7
Latency = 2pn p: consecutive n: column
 Latency = 2 × 21 × 7 = 294 bit
==========================================================================
Question:
A burst of up to p errors can be corrected with this scheme by interleaving p consecutive
code words, each of length n bits, using a p × n matrix. It would therefore seem that there
are advantages to making p as large as possible. Can you think what might limit how big
we can make p?
Bits are delayed during interleaving and de-interleaving. Bigger values of p will cause longer
delays, and will also increase the amount of storage and processing required at both the encoder
and the decoder.
==========================================================================
Activity [1.25]
The parity-check matrix of one of the possible LDPC codes included in the standard for
IEEE 802.16 (WiMAX) has 2304 columns and 768 rows. What are:
a) n, k and m
b) The code rate?

k=n-m n =2304(Columns) m =768(Rows)


 k = 2304 – 768 = 1536
𝒌
Code rate =
𝒏
𝟏𝟓𝟑𝟔 𝟐
 Code rate = 𝟐𝟑𝟎𝟒 = = 𝟎. 𝟔𝟕
𝟑
Question:
What code parameter is given by the number of columns in the parity-check matrix, and
what parameter is given by the number of rows?
The number of columns gives the block size (n) and the number of rows is the number of parity
checks.
==========================================================================
Question:
Write down a formula for k in terms of n and m, for an (n, k) code.

n: encoded block size , k: message bits , m: parity bits


 n=k+m k=n–m
==========================================================================
Activity
A non-binary code used as error detection in product barcodes.
 Has 12 identification digits and a single check digit

Position

1 2 3 4 5 6 7 8 9 10 11 12

9 7 8 0 5 2 1 4 2 5 5 7

• Sum all the digits in odd positions.

Position

1 3 5 7 9 11

9 8 5 1 2 5

Total = 9+8+5+1+2+5 = 30
• Sum all the digits in even positions and multiply the result by 3

Position

2 4 6 8 10 12

7 0 2 4 5 7

Total = 7+0+2+4+5+7=25  25 × 3 = 75

• Add the results of the sum odd and even positions = 30 + 75 = 105

• Take the answer modulo-10 = 105 mod 10 = 5

• If the answer after modulo-10 = 0  check digit = 0

• If the answer after modulo-10 = 5  check digit = 10 – 5 = 5

• The full EAN-13 code = 9 780521425575

==========================================================================
Activity [1.27]
Calculate the check digit, and so derive the full EAN-13 code, for the following:
978–014102662.

Position

1 2 3 4 5 6 7 8 9 10 11 12

9 7 8 0 1 4 1 0 2 6 6 2

• Sum all the digits in odd positions.

Position

1 3 5 7 9 11

9 8 1 1 2 6

Total = 9+8 +1+1+2+6=27


• Sum all the digits in even positions and multiply the result by 3

Position

2 4 6 8 10 12

7 0 4 0 6 2

Total = 7+0+4+0+6+2=19  19× 3 =57

• Add the results of the sum odd and even positions = 27+ 57 = 84

• Take the answer modulo-10 = 84 mod 10 = 4

• If the answer after modulo-10 = 4  check digit = 10 – 4 = 6

• The full EAN-13 code = 978–0141026626


==========================================================================
Activity [1.30]
How many bits are there in a block of 255 digits?
One digits = one byte = 8 bits
 Block size = 255 × 8 = 2040 bits
==========================================================================
Activity [1.31]
A popular base-256 (byte) RS code is the (255, 223) code. n = 255 k = 223
a) How many symbol errors can this code correct? How many bits is that?
b) How many erasures can it correct? How many bits is that?
c) What is the code rate and the redundancy of this code?

𝟐𝟓𝟓−𝟐𝟐𝟑
 Symbol errors = = 16 symbol errors  16 × 8 = 128 bits in each block =
𝟐
255 × 8 = 2040 bits.
 The number of erasures = 255 – 223 = 32 erasures  32 × 8 = 256 bits in each block =
255 × 8 = 2040 bits
223
 The code rate = 255 = 0.87
𝟐𝟓𝟓−𝟐𝟐𝟑
 The redundancy = = 0.13
𝟐𝟓𝟓


Symbol errors Redundancy Code rate Erasures

𝒏−𝒌 𝒏−𝒌 𝒌 n–k


𝟐 𝒏 𝒏
Activity [1.34]
Use the trellis of Figure 1.22(a) to find the coding of the following input data: 1010.

The output = 11 10 11 10

‫ يخلينا نمشي لالعلى‬0 ‫ يخلينا نمشي لالسفل لكن رقم‬1 ‫رقم‬


==================================================================
Activity [1.36]
Decide what the following sequences should be decoded to (Hint: to keep it
simple, I have ensured that there is at most one error in each sequence.)
a) 00 10 10 00
‫ يخلينا نمشي لالعلى‬0 ‫ يخلينا نمشي لالسفل لكن رقم‬1 ‫رقم‬
b) 11 01 01 01

a. The sequence 00 10 10 00 does not correspond to any path through the


decoder. I found one error in the fourth received bit  the correct sequence
is 00 11 10 00  the data: 0100

b. The sequence 11 01 01 01 corresponds to the sequence through the decoder


 the data: 1111  without any errors

==================================================================
Activity [1.40]
HARQ was introduced into mobile communications with 3G systems and continues to be
used in mobile systems. Suggest why it might be particularly useful for mobile
communications systems.

The communications channel for mobile communications is highly variable. As the user moves
around, varying how far they are from the base station and passing behind obstructions, the signal
gets weaker and stronger. In order to make best use of the available channel, a flexible coding and
modulation system is required, ensuring that when the channel is good, a high data rate is used,
whereas when the channel deteriorates, communication is still possible but at a lower rate. HARQ
is one of the ways of delivering that flexibility.

You might also like