CS 455 - Introduction to Computer Networks
Homework 1

Due: See class webpage.

### Question 1. (10 pts)

• In Ethernet, a transmission has a non-zero probability to fail due to collission

Suppose the probability that a transmission will collide with another transmission is 0.1

Questions:

 What is the probability that a transmission will succeed on the first attempt (3pts) What is the probability that a transmission will succeed on the second attempt (3pts) What is the probability that a transmission will succeed on the attempt #n (4pts)

### Question 2. (10 pts)

• Show the digital signal using NRZ when you transmit the following data:

 10110010 (3pts) 10110010 using 4B/5B (4 pts)

• Show the digital signal using Manchester code when you transmit the following data:

 10110010 (3pts)

### Question 3. (10 pts)

• An audio source emits audio signals of frequencies between 100 Hz - 5000 Hz.

Suppose you want to make a digital recording of the audio signal by sampling the signal at the minimum rate that is necessary. Each sample is represented by an integer value between -64 and 63.

What is the size of your data file if you record 1 hour of the audio. (10 pts)

### Question 4. (10 pts)

• A sender uses NRZ to transmit an (long) serie of bits to a receiver. The receiver reads the transmission at precisely the middle of its clock to determine the value of the transmitted bit.

The sender's clock runs at 1000 Hz and the receiver's clock runs at 999 Hz.

Suppose the receiver does not re-synchronize its clock to the sender's clock.

If the sender's and the receiver's clock are synchronized at the start of a (long) transmission, which bit poistion is the first bit that the receiver may receive incorrectly due to the clock drift ?

### Question 5. (20pts)

• A node uses a 2 dimensional parity scheme to transmit the following 4 ASCII characters :
```		 1010000
0100101
0100010
1001001
```
It uses even parity in rows and in columns and transmits the bits row-wise (including the parity bit in each row).

• Show the series of bits transmitted by this node. (5 pts)

In other words: first, encode the above message, then show the transmitted bits.

• Suppose a data link layer uses the 2 dimensional parity scheme with even parity for both columns and rows. The sender transmit the following already encoded message:
```                11110000
01010101
10101010
00001111
```
As you can see, all rows and columns have even parity. So the receiver will accept this message without errors.

Suppose the messages above that was received in error

• Is it possible to have 2 bit errors that the receiver cannot detect ? (5 pts)

• If so, show an error pattern with 2 bit errors by circling the bits that are in error) that is undetectable by the 2-dim parity method:

 ``` 11110000 01010101 10101010 00001111 ```

• Is it possible to have 3 bit errors that the receiver cannot detect ? (5 pts)

• If so, show an error pattern with 3 bit errors by circling the bits that are in error) that is undetectable by the 2-dim parity method:

 ``` 11110000 01010101 10101010 00001111 ```

• Is it possible to have 4 bit errors that the receiver cannot detect ? (5 pts)

• If so, show an error pattern with 4 bit errors by circling the bits that are in error) that is undetectable by the 2-dim parity method:

 ``` 11110000 01010101 10101010 00001111 ```

### Question 6. (20pts)

• A sender transmits the following bit pattern using Hammings code:
```  Bit position: 6543210987654321
----------------
0100000010000001
```
What is the bit pattern transmitted ? (5 pts)

I.e.: encode the above message.

NOTE: You MUST number your answer with the bit position as I have done above to receive credit !

• This question is not related to the above question !.

A receiver received the following pattern that is encoded using Hamming code:

```  Bit position: 6543210987654321
----------------
0100000010000001
```

• Which one bit will the receiver assume to be in error ? (5 pts)

• What was the original data that was transmitted ? (5 pts)

Further clarification:

I am asking what is the original data BEFORE the Hamming code was applied. You must use the corrected Hamming code word to answer this (the corrected Hamming code word is obtained from the previous question: Which one bit will the receiver assume to be in error ? - correct that bit and use the corrected Hamming code to obtain the original data).

NOTE: You MUST number your answer with the bit position as I have done above to receive credit !

• Show a Hamming code word in which two bit errors were made in the transmission that results in the pattern: (5 pts)
```  Bit position: 6543210987654321
----------------
0100000010000001
```
You must indicate which bits are in error to receive full credits.

In other words, find an Hamming code word such that:

``` Original Hamming code word: yyyyyyyyyyyyyyyy
After two bit errors:          x     x        <--- MUST indicate WHICH
|     |             2 bits are in error.
V     V
```
The difficulty of this question lies in the fact that a Hamming code word must pass the Hamming code test (see: click here ).

NOTE: You MUST number your answer with the bit position as I have done above to receive credit !

### Question 7. (10pts)

• Sender wants to send the following message protected by the CRC divider 101
```		10000001
```
What is the bit pattern that the sender will transmit ? (5 pts)

• A receiver using the CRC divider 101 receives the bit pattern
```                10000001
```
Will the receiver decide that the message was correct or in error ? Explain to get full credit. (5 pts)

### Question 8. (10pts)

• Show the shift-register circuit used to compute the CRC code using the divisor pattern 1100101 (10 pts)