Docsity

Data Communications & Networks, Lecture notes of Data Communication Systems and Computer Networks

Partial preview of the text

Download Data Communications & Networks and more Lecture notes Data Communication Systems and Computer Networks in PDF only on Docsity!

1

Data Communications & Networks

G22.2262-

Session 2 - Main Theme Data Transmission/Encoding Concepts and ADTs in Protocol Design

Dr. Jean-Claude Franchitti

New York University Computer Science Department Courant Institute of Mathematical Sciences

Agenda

„ Data Transmission „ Data Encoding „ Protocol Design ADTs „ Conclusion „ Assignment & Readings

3

Part I

Data Transmission / Encoding Concepts

Simplified Data Communications Model

7

Terminology (2/3)

„ Direct link

„ No intermediate devices

„ Point-to-point

„ Direct link „ Only 2 devices share link

„ Multi-point

„ More than two devices share the link

8

Terminology (3/3)

„ Simplex

„ One direction

„ e.g., television

„ Half duplex

„ Either direction, but only one way at a time

„ e.g. police radio

„ Flux duplex

„ Both directions at the same time

9

Analog and Digital Data Transmission

„ Data

„ Entities that convey meaning

„ Signals

„ Electric or electromagnetic representations of data

„ Transmission

„ Communication of data by propagation and processing of signals

Data

„ Analog

„ Continuous values within some interval „ e.g., sound, video

„ Digital

„ Discrete values „ e.g., text, integers

13

Analog Transmission

„ Analog signal transmitted without regard to

content

„ May be analog or digital data

„ Attenuated over distance

„ Use amplifiers to boost signal

„ Also amplifies noise

Digital Transmission

„ Concerned with content

„ Integrity endangered by noise, attenuation etc.

„ Repeaters used

„ Repeater receives signal

„ Extracts bit pattern

„ Retransmits

„ Attenuation is overcome

„ Noise is not amplified

15

Advantages/Disadvantages of Digital

„ Cheaper

„ Less susceptible to noise

„ Greater attenuation

„ Pulses become rounded and smaller „ Leads to loss of information

Attenuation of Digital Signals

19

Non-Return to Zero-Level (NRZ-L)

„ Two different voltages for 0 and 1 bits

„ Voltage constant during bit interval

„ No transition (i.e. no return to zero voltage) „ e.g., Absence of voltage for zero, constant positive voltage for one

„ More often, negative voltage for one value and

positive for the other

„ This is NRZ-L

Non-Return to Zero Inverted

„ Nonreturn to zero inverted on ones

„ Constant voltage pulse for duration of bit

„ Data encoded as presence or absence of signal transition at beginning of bit time

„ Transition (low to high or high to low) denotes a binary 1

„ No transition denotes binary 0

„ An example of differential encoding

21

NRZ

Differential Encoding

„ Data represented by changes rather than levels

„ More reliable detection of transition rather than

level

„ In complex transmission layouts it is easy to

lose sense of polarity

25

Biphase

„ Manchester „ Transition in middle of each bit period „ Transition serves as clock and data „ Low to high represents one „ High to low represents zero „ Used by IEEE 802. „ Differential Manchester „ Midbit transition is clocking only „ Transition at start of a bit period represents zero „ No transition at start of a bit period represents one „ Note: this is a differential encoding scheme „ Used by IEEE 802.

Biphase Pros and Cons

„ Con „ At least one transition per bit time and possibly two „ Maximum modulation rate is twice NRZ „ Requires more bandwidth

„ Pros „ Synchronization on mid bit transition (self clocking) „ No dc component „ Error detection „ Absence of expected transition

27

Asynchronous/Synchronous Transmission

„ Timing problems require a mechanism to

synchronize the transmitter and receiver

„ Two solutions

„ Asynchronous

„ Synchronous

Asynchronous

„ Data transmitted on character at a time

„ 5 to 8 bits

„ Timing only needs maintaining within

each character

„ Resync with each character

31

Synchronous – Bit Level

„ Block of data transmitted without start or stop bits

„ Clocks must be synchronized

„ Can use separate clock line „ Good over short distances „ Subject to impairments

„ Embed clock signal in data „ Manchester encoding „ Carrier frequency (analog)

Synchronous – Block Level

„ Need to indicate start and end of block

„ Use preamble and postamble

„ e.g. series of SYN (hex 16) characters

„ e.g. block of 11111111 patterns ending in

„ More efficient (lower overhead) than

async

33

Synchronous (diagram)

Part II

ADTs and Protocol Design

(Ring Buffer, Queue, FSM)

37

Data from Two Sources

„ Up from the Lower Layer (LL)

„ Lower layer sends data and indications „ Data must be separated from indications „ Read requests from HL may use different data boundaries than LL „ LL may be providing data at same time as HL wants to read it

Ring Buffer of Size N

. . .

0 1 2

N-

Inititial State Input: 0 Output: 0

39

Ring Buffer of Size N

. . .

0 1 2

N-

New Element Arrives Input: 1 Output: 0

Element 0

Ring Buffer of Size N

. . .

0 1 2

N-

New Element Arrives Input: 2 Output: 0

Element 0 Element 1