Hamming Code
Redundancy Bits (r)
- r must be able to indicate at least m+r+1 states
- m+r+1 states must be discoverable by r bits
- Therefore, 2r ≥ m+r+1
- If m=7, r=4 as 24 ≥ 7+4+1
Hamming Code
- Each r bit is the VRC bit for one combination of data bits
- r1(r2) bit is calculated using all bit positions whose binary representation includes a 1 in the first(second) position, and so on
Data Link Layer
Introduction
- Unless accurately received by a 2nd device, a signal TX over a wire is a waste of electricity
- With TX alone, we can put a signal to the line, but we have
- no way of controlling which of several devices attached to that line will receive it
- no way of knowing if the intended receiver is ready and able to receive it
- No way of keeping a second device from TX at the same time
- Communication requires at least 2 devices working together:
- Even such a basic arrangement requires great deal of coordination
- For Example, in Half Duplex TX, it is essential that only one device TX at a time
- If both device TX, the signals will collide leaving nothing on the line but Noise
- The coordination of half-duplex TX is a part of a procedure called Line Discipline, which is one of the functions included in the second layer of OSI Model, the data link layer
- In addition to Line Discipline, the most important functions in the data link layer are Flow Control and Error Control
- Collectively these functions are called Data Link Control
Data Link Layer & its Functions
Data Link Control
Line Discipline
- Coordinates the link systems, which device can send and when it can send?
Flow Control:
- The amount of data that can be sent before the receiving acknowledgement
- It also provides the receiver’s acknowledgement for frames received intact and so is linked to error control
Error Control:
- Means Error detection and Correction
- It allows the receiver to inform the sender of any frames lost or damaged in TX and coordinates Retransmission of those frames by the sender
Line Discipline
- How efficient the system is, no device in it should be allowed to transmit until that device has the evidence that the intended receiver is:
- able to receive
- is prepared to accept the TX
- What if the Rx device does not expect a transmission or is busy
- With no way of determining the status of the intended receiver, the transmitting device may waste its time sending data to a non-functioning receiver
- The Line Discipline functions of the data link layer oversee:
- the establishment of links and
- The right of a particular device to transmit at a given time
Ways to do Line Discipline
Line Discipline is done in 2 ways:
- Enquiry / Acknowledgement (ENQ/ACK)
- Used in Peer-to-Peer Communication
- Poll / Select
- Primary-Secondary communication
Summary
- Hamming Code
- Data Link Control
- Line Discipline
- Flow Control
Reading Sections
- Section 9.7, 10.1 “Data Communications and Networking” 4th Edition by Behrouz A. Forouzan