You are on page 1of 36

Data Communications

MITC 213 Data Communication and Networking

Introduction
Moving data among computers involve many different components and methodologies Goal of Data Communication: To allow different hardware and OS to communicate and understand each other Transmission media have to meet certain hardware specifications Software used to access the transmission media must also conform to standards
2

Data Communications
concerns the transmission of digital messages to devices external to the message source It is the aim of any communications system to provide the highest possible transmission rate at the lowest possible power and with the least possible noise.

Communications Channels
Information sent through a communications channel has a source from which the information originates, and a destination to which the information is delivered, has no obvious physical presence. In a digital communications channel, the information is represented by individual data bits, which may be encapsulated into multibit message units.

Communications Channels
Any communications channel has a direction associated with it The message source is the transmitter, and the destination is the receiver.

Communications Channels
CHANNEL TYPES Transmitter Simplex Channel Receiver

Transmitter Receiver
Transmitter Receiver

Half-Duplex Channel

Receiver Transmitter
Receiver Transmitter

Full-Duplex Channel
6

Simplex
A channel whose direction of transmission is unchanging For example, a radio station is a simplex channel because it always transmits the signal to its listeners and never allows them to transmit back.

Half-Duplex
single physical channel in which the direction may be reversed. Messages may flow in two directions, but never at the same time, in a half-duplex system. In a telephone call, one party speaks while the other listens. After a pause, the other party speaks and the first party listens. Speaking simultaneously results in garbled sound that cannot be understood.

Full Duplex
allows simultaneous message exchange in both directions. It really consists of two simplex channels, a forward channel and a reverse channel, linking the same points. The transmission rate of the reverse channel may be slower if it is used only for flow control of the forward channel.

Data Transmission
the physical transfer of data over a pointto-point or point-to-multipoint communication channel Examples of such channels are copper wires, optical fibers, wireless communication channels, and storage media. The data is often represented as an electro-magnetic signal, such an electrical voltage signal, a radiowave or microwave signal or an infra-red signal.
10

Data Transmission
Serialized data is not generally sent at a uniform rate through a channel there is usually a burst of regularly spaced binary data bits followed by a pause, after which the data flow resumes. timing information should be known by the receiver to be synchronized with the transmitter Failure to remain synchronized throughout a transmission will cause data to be corrupted or lost
11

Types of Transmission
Synchronous Transmission Asynchronous Transmission

12

Synchronous Transmission
separate channels are used to transmit data and timing information. The timing channel transmits clock pulses to the receiver. Upon receipt of a clock pulse, the receiver reads the data channel and latches the bit value found on the channel at that moment.

13

Synchronous Transmission
The data channel is not read again until the next clock pulse arrives. Because the transmitter originates both the data and the timing pulses, the receiver will read the data channel only when told to do so by the transmitter (via the clock pulse), and synchronization is guaranteed.

14

Synchronous Transmission
uses start and stop bits to signify the beginning bit ASCII character would actually be transmitted using 10 bits e.g.: A "0100 0001" would become "1 0100 0001 0 The extra one (or zero depending on parity bit) at the start and end of the transmission tells the receiver first that a character is coming and secondly that the character has ended.

15

Asynchronous Transmission
a separate timing channel is not used. The transmitter and receiver must be preset in advance to an agreed-upon baud rate. A very accurate local oscillator within the receiver will then generate an internal clock signal that is equal to the transmitter's within a fraction of a percent.

16

Asynchronous Transmission
uses no start and stop bits but instead synchronizes transmission speeds at both the receiving and sending end of the transmission using clock signals built into each component. A continual stream of data is then sent between the two nodes. Due to there being no start and stop bits the data transfer rate is quicker although more errors will occur

17

Error Detection and Correction


Error detection is the ability to detect the presence of errors caused by noise or other impairments during transmission from the transmitter to the receiver. Error correction is the additional ability to reconstruct the original, error-free data.

18

Error Checking Mechanisms


Even Parity Checksum Cyclic Redundancy Check Hamming Code

19

Even Parity
A parity bit is added to a data packet for the purpose of error detection. In the even-parity convention, the value of the parity bit is chosen so that the total number of '1' digits in the combined data plus parity packet is an even number. Upon receipt of the packet, the parity needed for the data is recomputed by local hardware and compared to the parity bit received with the data. If any bit has changed state, the parity will not match, and an error will have been detected.
20

Even Parity Computation


Even Parity Computation Data 10110001 10000110 Parity Bit 1 0

21

Example
A A A B B B wants to transmit: 1001 computes parity bit value: 1^0^0^1 = 0 adds parity bit and sends: 10010 receives: 10010 computes parity: 1^0^0^1^0 = 0 reports correct transmission after observing expected even result.

22

Parity Bit
This mechanism enables the detection of single bit errors, because if one bit gets flipped due to line noise, there will be an incorrect number of ones in the received data. parity is used in many hardware applications where an operation can be repeated in case of difficulty, or where simply detecting the error is helpful.

23

Checksum
the packets that constitute a message are added arithmetically. A checksum number is appended to the packet sequence so that the sum of data plus checksum is zero. If the sum is nonzero, an error has occurred. As long as the sum is zero, it is highly unlikely (but not impossible) that any data has been corrupted during transmission.
24

Checksum Computation
Checksum Computation

10110001 10000110 01001100 11111111 +10100000

Data

001100100010 Arithmetic Sum 00100010 Sum Truncated to 8 bits 11011110 Checksum

mod (256) 00000000 Sum + Checksum = Zero


25

Cyclic Redundancy Check (CRC)


an error-detecting code a type of function that takes as input a data stream of any length, and produces as output a value of a certain space, commonly a 32-bit integer A CRC can be used as a checksum to detect alteration of data during transmission or storage.

26

Cyclic Redundancy Check (CRC)


Take a binary message and convert it to a polynomial then divide it by another predefined polynomial called the key. The remainder from this division is the CRC. Now transmit both the message and the CRC.

27

Cyclic Redundancy Check (CRC)


The recipient of the transmission does the same operation (divides the message by the same key) and compares his CRC with yours. If they differ, the message must have been mangled. If, on the other hand, they are equal, the odds are pretty good that the message went through uncorrupted.

28

Hamming Code
a linear error-correcting code named after its inventor, Richard Hamming. Hamming codes can detect up to two simultaneous bit errors, and correct single-bit errors; thus, reliable communication is possible when the Hamming distance between the transmitted and received bit patterns is less than or equal to one.

29

Correcting Errors
Error detection Positive acknowledgment Packet passed error checking routine Negative acknowledgment Packet failed the error-checking routine Retransmission If receiver has not received the packet within a certain period of time Negative acknowledgment
30

Flow Control
Managing the rate of data communication Devices on a network do not talk and listen at the same rates Stop-and-Go or the Stop-and-Wait Sliding Window

31

Stop-and-Go or the Stop-and-Wait


The sender does not send any more information until the receiver has indicated that it is ready to accept the next packet. Very inefficient reduces the capacity of the network

32

Sliding Window
Defines a window size the max amount of data the sender can transmit before acknowledgment must be sent Size is agreed upon by both parties Both the sender and receiver maintain a finite size buffer to hold outgoing and incoming packets from the other side.

33

Sliding Window
Every packet sent by the sender, must be acknowledged by the receiver. The sender maintains a timer for every packet sent, and any packet unacknowledged in a certain time, is resent. The sender may send a whole window of packets before receiving an acknowledgement for the first packet in the window.

34

Sliding Window
This results in higher transfer rates, as the sender may send multiple packets without waiting for each packet's acknowledgement. The Receiver advertises a window size that tells the sender how much data it can receive, in order for the sender not to fill up the receivers buffers.

35

Any questions?

36

You might also like