CSC305 – Data Communication and Networking FALL 2024
College of Engineering
CSC305 – Data Communications and Networking
Fall 2024-2025
Assignment One
Question 1 (1.25 marks):
onsider the 3rd, 4th, and 6th digits of your student ID composed of seven digits. Convert it
to binary format (each digit is represented by a maximum of 4bits). For example,
1087365 is simplified to 876 and then converted to 1000 0111 0110. If any of the three
digits is equal to zero, then you need converted to number 9. Assume now that we want
to send your simplified student ID while being able to detect and correct single bit errors.
1.1) C (0.25 mark) Using two-dimensional parity check show what will be
transmitted using datawords of size 4bits.
1.2) (0.5 mark) Using the hamming code show what would be the codeword that
corresponds to your simplified binary student ID. Dataword size is 12bits.
1.3) (0.5 mark) Assume that a single bit error occurred and corrupted the 11 th bit.
Show that the receiver of such corrupted codeword will be able to detect and
correct the error when using the hamming code.
Question 2 (1 mark):
Reconsider your student ID in a binary format (as explained in the previous question) as
the dataword.
2.1) (0.25 marks) Find the codeword corresponding to this dataword using the CRC
error detection technique, and the divisor polynomial g(x) = x 6+x3+1. Use binary
division to obtain the CRC
2.2) (0.25 marks) Now assume that you have the polynomial dataword that is made
as x3rd+x4th+x5th + x7th and the divisor is as in 2.1 above. Make sure to arrange
the numbers in ascending order, meaning that the 3rd should be higher the 4th
and 4th should be higher than the 5th, and so on. Use the polynomial division
technique to find the CRC. Show your final results in binary form. Click here to
see how to do the polynomial division technique.
PS: If any two of your 3rd, 4th, 5th, and 7th are the same, you need to contact
your instructor for advice.
2.3) (0.5 marks) Assume that two errors occurred where 1 st and 5th bits are corrupted
in the codeword (numbering starts from 1 and from right); show how the CRC
technique allows you to detect such an error using the divisor of question 2.1.
1
Question 3 (0.75 marks):
A sender needs to send the five datawords 1037647, 1010973, 249809, 851760, and
the last 5 digits of your student ID. Convert all numbers to binary format and answer the
following questions:
3.1) (0.25 mark) Find the checksum at the sender side.
3.2) (0.25 mark) Find the checksum at the receiver side if there is no error.
3.3) (0.25 mark) Find the checksum at the receiver site if the first dataword is changed
from being 1037647 to 13701391.
Question 4 (2 marks):
The Trivial File Transfer Protocol (TFTP, RFC 1350) is an application layer protocol that
uses the Stop-and-Wait protocol. To transfer a file from a server to a client, the server
breaks the file into blocks of 512 bytes and sends these blocks to the client using Stop-
and-Wait ARQ. Assume that the transmission time of one block is 1ms, and that of an
acknowledgment is 1ms. Assume also that the sender uses a timeout value of 4ms.
Show the pattern of transmissions and associated state transitions for the following
sequence of events:
the server transmits 7 blocks.
If your student ID is EVEN the 2 nd block is lost and the acknowledgment of the 3 rd
block (not counting any resubmission) is lost.
If your student ID is ODD the 3 rd block is lost, and the acknowledgment of the 4 th
block (not counting any resubmission) is lost.
a) (1 mark) Draw the flow control in the chart provided in the following page. Describe
in detail how the sender and the receiver will behave. Your graphs must show the
sliding windows, the sequence number of the frames, and any special action
performed by the sender and the receiver (e.g., Discard the frame, initiate a timer,
timeouts …) as we have shown in the slides.
b) (0.25 mark) What will happen if the sender uses a longer timeout duration, let say
6ms?
c) (0.25 mark) What will happen if the sender uses a shorter timeout duration, let say
2ms?
2
Stop-and-Wait ARQ
Server Client
1 1ms
2
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Notes:
3
1. Assignment is worth 5% of total mark
2. Submission is no later than 6th November 2024 @ 23:59
3. This assignment is an individual assignment. Please no similarity.
5. 10% of the mark will be deducted for every extra day after the submission date.
6. Submit a document that has answers/screenshots via BB.
7. Any submission via email/Teams will be automatically discarded.