0% found this document useful (0 votes)
93 views3 pages

Homework 3 Solution

This document contains the solutions to assignment questions for a data communication and networks course. It provides sample algorithms for encoding data streams using different encoding schemes like NRZ-L, NRZI, bipolar AMI, pseudoternary, Manchester, and differential Manchester encoding. It also explains the advantages and disadvantages of enhanced NRZ encoding over NRZ-L encoding and sketches the waveform representations of a sample data stream encoded using different encoding schemes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views3 pages

Homework 3 Solution

This document contains the solutions to assignment questions for a data communication and networks course. It provides sample algorithms for encoding data streams using different encoding schemes like NRZ-L, NRZI, bipolar AMI, pseudoternary, Manchester, and differential Manchester encoding. It also explains the advantages and disadvantages of enhanced NRZ encoding over NRZ-L encoding and sketches the waveform representations of a sample data stream encoded using different encoding schemes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

New York University

Computer Science Department


Courant Institute of Mathematical Sciences

Course Title: Data Communication & Networks Course Number:CSCI-GA.2662-001


Instructor: Jean-Claude Franchitti Session: 2

Assignment #3 Solutions

1. Question 1:
Develop algorithms for generating each of the codes shown in slide 29 of the Session 3 slide
deck on Data Encoding and Transmission from NRZ-L.

Answer (Sample solution):

(a) NRZL

For i = 1 to input_length
If input(i) is zero; output(i) = “+”
Else output(i) = “-“

(b) NRZI

For i = 1 to input_length
If input(i) is one {
If output(i-1) is “+”; output(i) = “-“
Else output = “+”
} else output(i) = output(i-1)

(c) Bipolar AMI

For i = 1 to input_length
If input(i) is one {
If previous is “-“; output(i) = “+”; previous = “+”
Else output(i) = “-“; previous = “-“
} else output(i) = “neutral”
(d) Pseudo Ternary

For i = 1 to input_length
If input(i) is zero {
If previous = “-“; output(i) = “+”; previous = “+”
Else output(i) = “-”; previous = “-”
} else output(i) = “neutral”

(e) Manchester

For i = 1 to input_length
If input(i) is zero; output(2*i-1) = “+”; output(2*i) = “-“
Else output(2*i-1) = “-“; output(2*i) = “+”

(f) Diff Manchester

If output(i) is one; output(1) = “+”; output(2) = “-”


Else output(1) = “-“; output(2) = “+“

For i = 2 to input_length
If input(i) is one; output(2*i-1) = output(2*i-2); output(2*i) = output(2*i-3)
Else output(2*i-1) = output(2*i-3); output(2*i) = output(2*i-2)

2. Question 2:
Enhanced NRZ (E-NRZ) is used for high-density recording on magnetic tape. It separates
the NRZ-L data stream into 7-bit words, inverts bits 2, 3, 6, and 7, and adds a parity bit to
each word. In this case, the parity bit is chosen to make the total number of 1s in the 8-bit
word an odd count. Explain the advantages and disadvantages of E-NRZ over NRZ-L.

Answer: There are many possible answers for this.


3. Question 3:
For the bit stream 01010101, sketch the corresponding waveforms for NRZ-L, NRZI,
Bipolar-AMI, Pseudoternary, Manchester, and Differential Manchester. Assume that the
signal level for the preceding bit for NRZI was high; the most recent preceding 1 bit (AMI)
has a negative voltage; and the most recent preceding 0 bit (pseudo ternary) has a negative
voltage Solution:

Answer:

4. Question 4:
Consider a stream of binary data that consists of a long sequence of 1s followed by a zero
followed by a long string of 1s and the same assumptions as in Problem 3 above. Draw the
waveform for this sequence using:
(a) NRZ-L
(b) Bipolar-AMI
(c) Pseudoternary

Answer:

You might also like