Homework 1
Homework 1
CS 470 Homework 1
1. Bit Stuffing. Suppose the sender and the receiver agrees to use the
bit pattern 01111110 to mark the beginning and the end of a frame.
a. The sender has the following bits to send. What does the sender
actually send?
011110000111111011101111101
Answer:
The sender actually sends below pattern
Flag
Flag
01111110 01111000011111010111011111001 01111110
b. The receiver receives the following bits. How many frames are
received and what does each frame contain? (note: this question has
nothing to do the previous question)
0111111011111011111000110111111010000111110111110
Answer:
1 frame received
Flag
01111110
Frame
Flag
11111111110011
01111110
CIN 303190217
Answer:
11010110 10000100
+ 00110111 10101001
00001110 00101101
+
1
00001110 00101110
+ 01010101 10100010
01100011 11010000
+ 01101010 01000101
11001110 00010101
CIN 303190217
10010010101100000
110011
0101111
110011
0111000
110011
10111
00000
101110
110011
111011
110011
10001
00000
100010
110011
100010
110011
100010
110011
100010
110011
100010
110011
10001 (CRC)
CRC
Answer(b): sender actually sends : 100100101011 10001
CIN 303190217
Answer:
LAN 1
IJ
JI
FA
AF
GI
IG
CG
EJ
A
A
A
A
A
BG1
LAN 2
I
I,J
I,J,F
I,J,F
I,J,F,G
I,J,F,G
I,J,F,G,C
I,J,F,G,C,E
BG2
LAN 2
LAN 3
I
I,J
I,J
F
I,J,A
F
I,J,A,G
F
I,J,A,G
F
I,J,A,G,C
F
I,J,A,G,C
F,E
BG3
BG4
LAN 2
LAN 4 LAN 2
LAN 5
I
I
I,J
I,J
I,J,F
F
I,J
I,J,F,A
F,A
I,J
I,J,F,A
G
F,A,G
I,J
I,J,F,A
G
F,A,G
I,J
I,J,F,A,C
G
F,A,G,C
I,J
I,J,F,A,C,E
G
F,A,G,C,E
I,J