You are on page 1of 3

1- A CDMA receiver gets the following chips: (1 +1 3 +1 1 3 +1 +1).

Assuming the chip sequences defined in Figure (a), which stations transmitted,
and which bits did each one send?

Solution
S.A = (-1+1-3+1-1-3+1+1).(-1-1-1+1+1-1+1+1) = (1-1+3+1-1+3+1+1)/8 = 1
S.B = (-1+1-3+1-1-3+1+1).(-1-1+1-1+1+1+1-1) = (1-1-3-1-1-3+1-1)/8 = -1
S.C = (-1+1-3+1-1-3+1+1).(-1+1-1+1+1+1-1-1) = (1+1+3+1-1-3-1-1)/8 = 0
S.D = (-1+1-3+1-1-3+1+1).(-1+1-1-1-1-1+1-1) = (1+1+3-1+1+3+1-1)/8 = 1
Therefore, A transmits 1, B transmits 0, C doesn't transmit, D transmits 1

2- The following character encoding is used in a data link protocol:


A: 01000111 B: 11100011 FLAG: 01111110 ESC: 11100000
Show the bit sequence transmitted (in binary) for the four-character frame
A B ESC FLAG when each of the following framing methods is used:
(a) Byte count.
(b) Flag bytes with byte stuffing.
(c) Starting and ending flag bytes with bit stuffing.

Solution
(a) 00000101 01000111 11100011 11100000 01111110
(b) 01111110 01000111 11100011 11100000 11100000 11100000 01111110
01111110
(c) 01111110 01000111 110100011 11100000 011111010 01111110

3- The following data fragment occurs in the middle of a data stream for
which the byte stuffing
algorithm described in the text is used: A B ESC C ESC FLAG FLAG D.
What is the output after stuffing?
Solution:
After stuffing, we get A B ESC ESC C ESC ESC ESC FLAG ESC FLAG D.
4- A bit string, 0111101111101111110, needs to be transmitted at the data link
layer. What is the string actually transmitted after bit stuffing?
Solution
The output is 011110111110011111010.

5- Sixteen-bit messages are transmitted using a Hamming code. How many


check bits are needed to ensure that the receiver can detect and correct
single-bit errors? Show the bit pattern transmitted for the message
1101001100110101. Assume that even parity is used in the Hamming code.
Solution
Parity bits are needed at positions 1, 2, 4, 8, and 16 for messages that do not extend
beyond 31 bits (including the parity bits). Our message has 16 data bits and 5 parity bits,
for a total of 21 bits. Write this message ab1c101d0011001e10101, from position 1
through 21 where a through e are the even parity bits. a is the sum of all positions with a
20 term except itself, or odd positions except 1. Thus a is 1 1 1 0 1 0 1 1 1
1 0. b is the sum of positions with a 2 1 term except 2, or positions 3, 6, 7, 10, 11, 14,
15, 18, and 19. b is 1 0 1 0 1 0 1 0 1 1. c is the sum of all other
positions with a 22 term, or positions 5 to 7, 12 to 15, 20, and 21. c is
1 0 1 1 0 0 1 0 1 1. d is the sum of all other positions with a 2 3 term, or
positions 9 to 15. d is 0 0 1 1 0 0 1 1. e is the sum of all other positions with
a 24 term, or positions 17 to 21. e is 1 0 1 0 1 1. The bit pattern transmitted is
011110110011001110101.

a: 1 at first bit
b: 1 at second bit
c: 1 at third bit
d: 1 at fourth bit

0001
0010
0011 ab
0100
0101 ac
0110 bc
0111 abc
1000
1001 ad
1010 bd
1011 abd
1100 cd
1101 acd
1110 bcd
1111 abcd

You might also like