# CS601 - Data Communication - Lecture Handout 30

User Rating:  / 0
PoorBest

# Bit Stuffing

• It is possible to connect devices of different data rates to synchronous TDM
• For Example, device A uses one time slot, while the faster device B uses two slots
• The Time slot length is FIXED
• Therefore data rates should be integer multiples of each other
• For example, we can accommodate a device that is 5 times faster than the other device by giving it five slots to one for each of the other devices
• We cannot accommodate a device which is five and a half times faster using this method because we cannot introduce half a time slot into a frame
• When the speeds are not integer multiples of each other, they can be made to behave as if they were
• This is done by a technique known as BIT STUFFING
• In bit stuffing, MUX adds extra bits to a device
• For Example, if we have one device with a bit rate of 2.75 times that of other devices, we can add enough bits to raise this rate to 3 times that of others
• The extra bits are then discarded by the Demultiplexer

## Asynchronous TDM

• Synchronous TDM does not guarantee full utilization of the timeslots
• Because the time slots are fixed and pre assigned, whenever a connected device is not transmitting, the corresponding slot is empty and much of the channel capacity is wasted
• For Example, imagine that we have multiplexed the o/p of 20 identical computers onto a single line
• Using synchronous TDM, the speed of that line must be at least 20 times the speed of each i/p line
• But what if only 10 computers are in use at a time?
• Half of the capacity of the line is wasted
• Asynchronous TDM or Statistical TDM is designed to avoid this type of waste
• Asynchronous means flexible or Not fixed
• In an asynchronous system, if we have ‘n’ input lines, the frame contains no more than ‘m’ slots, where m is less than n

• In this way asynchronous TDM supports the same number of I/p lines as synchronous TDM with a lower capacity link
• A slot is available to any device that wants to send data
• MUX scans I/p lines, accepts data until a frame is filled and then sends the frame across the link

### Advantages of Asynchronous TDM

• Two major advantages:
• Ability to allocate time slots dynamically
• Lower ration of time slots to I/p lines

Above two factors greatly reduce the likelihood of a waste

• Fig. shows a system with 5 I/p lines sharing a link using Asynchronous TDM
• Frame size is 3 slots per frame
• Fig shows how MUX handles 3 levels of traffic
• In the first case, only 3 of the 5 computers have data to send
• In the second case, 4 lines are sending data
• In the third case, all devices are sending data
• In each case, MUX scans the devices in order from 1 to 5 filling time slots as it encounters data to be sent

### Asynchronous TDM Figure 1

• In the first case, the 3 active i/p lines correspond to the 3 slots in each frame
• For the first 4 frames, the I/p is symmetrically distributed among all the devices.
• By the 5 frame however, devices 3 and 5 have completed their transmission but device 1 still has two characters to go

### Asynchronous TDM Figure 2

• The MUX picks up the A from device 1, scans down the line without finding another transmission and returns to device 1 to pick up the last A
• There being no data to fill the final slot, the MUX then fills the 5th frame with only 2 slots filled
• Compare with Synchronous TX: 6 frames of 5 slots each would be required=30 slots, 14 slots used only
• In second case, there is one more I/p line than there are slots in each frame
• This time MUX scans from 1 to 5 and fills up a frame before each of the lines are checked
• The first frame contains data from device 1, 3,and 4

### Asynchronous TDM Figure 3

• MUX continues the scan and puts first portion of 5th device into the first slot of next frame and so on
• When the number of active senders does not equal the number of slots in a frame, the time slots are not filled symmetrically
• Device 1 occupies the first slot in the first frame , 2 slot in second frame and so on
• In the third case, frames are filled as shown above
• All 5 I/p lines are active
• In this case device 1 occupies the 1 slot in the first frame, the 3rd slot in the second frame and so on

## Aspects of Asynchronous TDM

• Case 2 & 3 above show a major weakness of Asynchronous TDM
• How does the DEMUX know which slot belongs to which output line?
• As opposed to Synchronous TDM, in this case, data from a given device might be in the first slot of one frame and in the third of the next
• Therefore, each time slot must carry an address telling the DEMUX how to direct data
• This address is for local use only attached by the MUX and detached by the DEMUX
• In the figure above address is specified by a digit
• Adding address bits to each time slot increase the overhead of an Asynchronous system and limits its efficiency
• Addresses usually consist of only a small number of bits
• Need for Addressing makes Asynchronous TDM inefficient for bit or byte interleaving
• Imagine bit interleaving with each bit carrying an address
• One bit of data plus 3 bits of address
• Asynchronous TDM is efficient only when the size of the time slot is kept relatively large

## Inverse Multiplexing

• Opposite of Multiplexing
• Takes data from one high speed line and breaks it into portions that can be sent over several lower speed lines simultaneously

### Why do we need Inverse Multiplexing?

• An organization wants to send data, voice and video each of which requires a different data rate
• To send voice it needs 64Kbps,
• To send data, it needs 128 Kbps link
• To send video it may need 1.544 Mbps link
• It can lease a 1.544 Mbps line from a common carrier and only use it fully for sometime
• Or it can lease several separate channels of lower data rates
• Voice can be sent over any of these channels
• Data & Video can be broken into smaller portions using Inverse Multiplexing and TX

### THE TELEPHONE SYSTEM

• Multiplexing has long been used as an essential tool in the Telephone industry
• A country’s telephone system may include various carriers that offer local and long-distance service
• These various carriers form a Telephone Network I.e. PTCL

Each subscriber is connected to the telephone network as a service line

## Summary

• Time Division Multiplexing
• Asynchronous TDM
• Inverse Multiplexing
• The Telephone System