Computer Science 308-435B
Basics of Computer Networks
McGill University, Winter 2001
Assignment 2: Error detection and correction
Due date
UPDATED !:
Saturday 10 March, before 23:59 (hard deadline).
Read the description below VERY carefully. Some clarifications
have been added.
Submission medium
VisualCM
Assignment
The deliverable for this assignment is one ASCII text file
named errcodes.txt,
to be submitted via VisualCM.
This assignment will be graded by a program, so using the correct format
is essential.
The file must contain, in exactly the following format:
- One line with your first name.
- One line with your last name. If your last name is less than
2 characters long (highly unlikely), pad with blanks
(before the newline).
- One line with your student ID.
- One line with a series of 32 0's and 1's corresponding to four 8-bit
bytes containing the ACSII
encoding (with the most significant bit set to 0 as ASCII is only
a 7 bit code) of a string (not in the C sense, so don't add a
'\0' at the end) formed by (from left to right):
- the first letter of your first name,
- the blank space ' ' character,
- the first two letters of your last name (possibly padded
with blanks if not long enough).
The following
ASCII table may be useful.
- One line with an integer (N) denoting the total
(original + check bits) number
of bits needed for a Hamming encoding of the 32 bits.
- A line with a series of (N) 0's and 1's corresponding to the
Hamming encoding of the 32 bits. The bits are numbered from left
to right (as in class, NOT as in Forouzan !)
123456...
When putting the data bits in between the check bits, you should start
with the lowest bits first. So, the 32bits 011...10011 should appear in the appropriate places of the Hamming encoding in the order
1, 1, 0, 0, 1, ..., 1, 1, 0. (Note that this allows you to use
the description in Forouzan's book and reverse the result to get exactly
the line you need here).
- A line with a series of 16 0's and 1's corresponding to
the CRC-16 checksum for the 4-byte data.
- A line with a series of 48 0's and 1's corresponding to
the original data, followed by the CRC-16, subsequently
garbled by inverting 18bits, starting from the 9th bit (counting
up from the left; the first bit on the left has number 1 so the 9th
bit is the first one of the second byte).
Note that the above line previously read
``CRC-16 checksum'' meaning ``Cyclic Redundancy Check sum''.
It is one of many different types of
checksums. It is not what you find in section 9.6.
- One line with the remainder (series of 16 0's and 1's) after division
of the above by the CRC-16 generator polynomial. Obviously, if the
remainder is 0000000000000000, the error went undetected.
- One line with your first name.
- One line with your last name.
On all lines, information must start from the first column.
If your first or last name contains spaces (blanks), that is
acceptable (as long as you encode correctly).
Letters may be lower case or upper case (or mixed) as long as they are
encoded with the correct ASCII code.
Hans Vangheluwe