Chapter 2 Flashcards
Shannon-Hartley Thm.
Upper bound to capacity of a link in terms of bits per second as a function of signal to noise ratio
C = B * log2(1 + S/N)
* S = Signal power
* N = Average noise
* B = Bandwidth of channel
Medium - Characterise
- Copper wire
- Optical / fibre
- Air
Frequency - Characterise
Hz
Wavelength
Distance min and max of wave in metres
Encoding
Binary data on a signal
* Bits travel between adaptors
* Signal travel between signalling components
Problems of Non Return to Zero
- Baseline wander
- Receiver keeps average of signals seen
- uses average to distinguish 0 or 1
- Too many 0s or 1s could lead to inaccuracy
- Clock recovery
- Frequenct transtions are needed for clock recovery
- Sending & decoding done by clock
- Every clock clock cyle a sender transmits a bit and receiver bit
- Sender and receiver has to be insync
Non Return to Zero Inverted
- Sender makes a transition from current signal to encode 1 and stay at 1
- Solves consecutive 1s
Manchester encoding
- Merge clock XOR of NRZ
- for clock: one high and low pair is a cycle
- 0 : low to high
- 1: high to low
Problems with Manchester
Doubles the rate at which signal transitions are made
* The receiver has 1/2 the time to detect each pulse
Baud rate
The rate of change in signal
4B/5B encoding
- Insert extra bits into bit stream to break up long 0s or 1s
- Every 4 bits are encoded in 5 bits
- Each 5B has no more than 1 leading 0
- Each 5B has no more than 2 trailling 0s
- No pair of 5 bit codes have more than 3 consecutive 0s
Idle line 4B/5B
11111
Dead Line 4B/5B
00000
Halt Line
00100
Frames
Blocks of data
Byte Oriented Protocol
View each frame as a collection of bytes rather than bits
Binary Synchronous Communication (BISYNC)
- SYN Character - 8 bits
- SYN Character - 8
- Start of Header (SOH) - 8
- Header
- Start of Text (STX) - 8
- Body
- End of text (ETX) - 8
- Cyclic Redundancy Check (CRC) 16
Point-to-Point Protocol (PPP)
Commonly used over internet links which use sentinel approach
* Special start character: 01111110 : Flag - 8
* Address - 8
* Control - 8
* Protocol for demux: IP/IPX - 16
* Payload
* Checksum - 16
* Flag - 8
Digital Data Communication Message Protocol (DDCMP)
Byte counting approach
If count is corrputed - framing error
* SYN - 8
* SYN - 8
* Class - 8
* Count - 14
* Header - 42
* Body
* CRC - 16
High Level Data Link Control (HDLC)
- Beginning and ending sequences
- 01111110
- Frame:
- Beginning Sequence - 8
- Header - 16
- Body
- CRC - 16
- Ending Sequence - 8
- On sender side
- If 5 1 bits are being sent a 0 is inserted
- On receiver side
- if 5 bits read
- if next bit is a 0 = body
- if next bit is 1 = either end sequence or error and must discard
Two dimensional Parity
- Based on parity
- Adding 1 bit for 7 bits to make it even or odd
- Catches 1, 2, 3 and most 4 bit errors
- Each 7 bits has a parity bit, and there is an additional parity byte at the end
Internet Checksum Algorithm
- Add up all words transmitted & transmit sum
- Sender & receiver do the same calculation then compare
- If different then there is an error
- Data checksummed as a sequence of 16 bit integers
- Add them together using complement arithemetic
- 16 bit number is the checksum
Cyclical Redundancy Check (CRC)
- Reduce the number of bits
- Maximise protection
- Uses bit string that represent polynomials
- M(X) is the message polynomial
- C(X) is the generator polynomial
- If M % C produces a remainder then there is an error
- M comes from the message itself
- C has to be agreed on between sender and receiver
Error handling with CRC
- if M % C does produce a remainder of 0, a bit error could have just gone unnoticed
- For single bit errors: X^k and X^0 must have non zero coefficients
- Double bit: C(X) has a factor of at least 3 terms
- Any odd number of errors : C(x) contains (k+1)
- Any burst error < k bits