1

Module -30

1. Introduction 2. Basic Data Communication System 3. Various data codes and their representation 3.1 3.2 3.3 ASCII code 3.4 EBCDIC code 4. Data Representation 5. Data Transmission Modes 5.1 The direction of the exchanges 5.2 The number of data sent simultaneously 5.3 Synchronization between the transmitter and receiver 6. Standard Organizations for Data Communication 7. Summary

Learning outcome –

After studying this module, you will be able to: 1. Understand the concept of data communication system 2. Learn the various data codes and their representation 3. Understand the various data transmission modes 4. Know about different types of data communication standard organizations 5. Apply the knowledge of encoders in different digital systems

Electronic Communication Electronic Science 33. Data Communication

2

1. Introduction

Data communication refers to the exchange of data between two or more devices through suitable transmission media either wired or as shown in fig. 1. It permits the transfer of binary or digital information between remote computers. The data communication circuits comprise of electronic equipments that aids in the interconnection of digital computer equipments.

Figure 1: Almost any type of data can be digitized. The effectiveness, low cost, reliability and high speed of digital technology have made data communication more widespread and inevitable in today‟s world. One of the major applications of data communication is , linking billions of devices worldwide and through which we have access to extensive range of information and resources at our fingertips. One of the other applications is Electronic mail (e-mail) services that enable us to send data from our personal computer (PC) to anyone anywhere in this world and receive information from anyone across the globe.

2. Basic Data Communication System

The Data Communication System has basic five components as shown in fig. 2: 1. Message: It is the information data that is intended to be communicated. Information data can be in the form of text, numbers, image, audio and video.

Electronic Communication Electronic Science 33. Data Communication

3

2. Sender: The device that sends the data information is called the sender or transmitter. Sender can be a computer, workstation, telephone handset, video camera, mobile phone and other peripheral devices.

Figure 2 : Block diagram of Data Communication System

3. Transmission media: The physical path through which data is transmitted or sent from the sender to the receiver. It is also known as . can be wired like twisted-pair wire, co-axial cable, fiber optic cable, telephone line etc. or it can be wireless over the free space using , microwave and infrared signals. 4. Receiver: The device that receives the data information from the sender is called the receiver. It is also called Sink. A receiver may be a computer, workstation, telephone handset, mobile phone, television set, printer, machine, and so on. 5. Protocol: Protocol is a set of rules that governs data communication. It refers to the agreement between the communicating devices. It defines the procedures the devices will use during the process of communication. Without a proper protocol, the devices may be connected but they cannot communicate with each other. Numerous protocols are being used to provide the networking capabilities specifying the data rate, flow control, data segmentation and assembly, sequence control, error detection and control.

Electronic Communication Electronic Science 33. Data Communication

4

3. Various data codes and their representation

Data is communicated between computers as sequences of binary digits or bits. A data code refers to the way in which bits are grouped together to represent different symbols. A sequence of bits is grouped to form a data character and an encoding scheme translates each group of bits into a character. Hence a unique binary code for every possible character to be communicated is generated and stored in the computer. The two communicating devices must use the same code in order to communicate properly. There are a number of different codes as shown in fig.3, but the most common code in use today is the ASCII code.

Figure 3: Simple block diagram of digital system 3.1 Baudot code The Baudot code developed in the year 1875 was named after the pioneer in telegraph printing Emile Baudot. It was used extensively in early teletype machines which was like a typewriter and was used to send and receive coded signal over a communication link. Pressing a key on the typewriter keyboard generates a unique code which is further transmitted to the receiving machine that prints the corresponding character. It is recognized as the first fixed-length character code for machines. It is a five code representing 32 different characters. In order to accommodate 26 letters of the , 10 numbers, and various punctuation marks, it uses two shift codes: letter and figure shift codes. Two of the 32 combinations were used to select the shift codes. If the message is

Electronic Communication Electronic Science 33. Data Communication

5

preceded by the letter shift code (11011), all of the following codes are interpreted as alphabet letters. When preceded by the figure shift code (11111), all the following characters are interpreted as numbers or punctuation marks.

LETTER FIGURE BINARY LETTER FIGURE BINARY A - 11000 Q 1 11101 B ? 10011 R 4 01010

C : 01110 S BEL 10100 D $ 10010 T 5 00001 E 3 10000 U 7 11100 F ! 10110 V ; 01111 G & 01011 W 2 11001 H # 00101 X / 10111 I 8 01100 Y 6 10101

J ' 11010 Z " 10001 K ( 11110 LETTER SHIFT 11011 L ) 01001 FIGURE SHIFT 11111

M . 00111 SPACE 00100 N , 00110 Line feed (LF) 01000

O 9 00011 Blank(null) Blank 00000 P 0 01101 Table 1: Baud Dot Code For example, if we have 01001 preceded by letter shift code 11011, the character is interpreted as alphabet L and the same binary bit combination when preceded by figure shift code 11111, is interpreted as a right closing parenthesis. As seen from the table 1, letter shift and figure shift code are represented by 11011 and 11111 respectively. In most data communications, baudot has been replaced by codes that can represent more characters and symbols.

3.2 Morse code In 1844, Samuel F. B. Morse successfully demonstrated an system. The transmitting end of the telegraph system sent text information in the form of electrical pulses Electronic Communication Electronic Science 33. Data Communication

6

along wires which controlled the electromagnet at the receiving end. Morse developed a special code called Morse code to transmit and receive messages at high speeds up to 80 words per minute. Morse code is a series of dots and dashes representing , numbers and punctuation marks. Dot and dash are usually represented as a short electrical pulse and a long electrical pulse respectively. The telegraph key when depressed causes current flow in an electromagnetic coil that attracts the armature and releases it quickly when the current stops, making clicks during both the instances. When the armature is closed for a short duration, a dot is produced and when closed for longer time, a dash is produced. The transmitter switches the carrier signal on and off to produce dot and dashes.

Table 2: Morse code

Table 2 displays the Morse telegraph code. As we can see from the table, alphabet A is represented by single dot and single dash, B is represented by single dash and three dots and so on. 3.3 American standard code for Information Interchange (ASCII) The ASCII code was developed by a committee of the American National Standards Institute (ANSI) for binary data coding. ASCII code is a 7-bit code representing 128 alphanumeric symbols with a distinctive code word. The least significant bit is designated bit 0 and the most significant bit is designated as bit 1. The first three bits from MSB onwards indicate whether a number, letter or character is being specified.

Electronic Communication Electronic Science 33. Data Communication

7

As seen from table 3, the first 32 values (character code 0 to 31) are non-printing control characters, such as NUL- null character, STX- start of text, ETX- end of text, LF -Line Feed, DLE- escape, US-Unit separator, CR- , File separator(FS),Group Separator(GS) CAN-cancel, SUB-substitute ,ESC- escape etc . Mostly they are used to control peripherals such as printers.Codes 32-127 are common for all the different variations of the ASCII table, they are called printable characters, representing letters, digits, punctuation marks, and a few miscellaneous symbols. Almost every character can be found on the computer keyboard.

ASCII BINARY ASCII BINARY ASCII BINARY ASCII BINARY NUL 00000000 SP 00100000 @ 01000000 ` 01100000 SOH 00000001 ! 00100001 A 01000001 a 01100001 STX 00000010 " 00100010 B 01000010 b 01100010 ETX 00000011 # 00100011 C 01000011 c 01100011 EOT 00000100 $ 00100100 D 01000100 d 01100100 ENQ 00000101 % 00100101 E 01000101 e 01100101 ACK 00000110 & 00100110 F 01000110 f 01100110 BEL 00000111 ' 00100111 G 01000111 g 01100111 BS 00001000 ( 00101000 H 01001000 h 01101000 HT 00001001 ) 00101001 I 01001001 i 01101001 LF 00001010 * 00101010 J 01001010 j 01101010 VT 00001011 + 00101011 K 01001011 k 01101011 FF 00001100 , 00101100 L 01001111 l 01101100 CR 00001101 - 00101101 M 01001101 m 01101110 SO 00001110 . 00101110 N 01001110 o 01101111 SI 00001111 / 00101111 O 01001111 p 01110000 DLE 00010000 0 00110000 P 01010000 q 01110001 DC1 00010001 1 00110001 Q 01010001 r 01110011 DC2 00010010 2 00110010 R 01010010 s 01110100 DC3 00010011 3 00110011 S 01010011 t 01110101 DC4 00010100 4 00110100 T 01010100 u 01110110 NAK 00010101 5 00110101 U 01010101 v 01110111 SYN 00010110 6 00110110 V 01010110 w 01101101 ETB 00010111 7 00110111 W 01010111 x 01111000 CAN 00011000 8 00111000 X 01011000 y 01111001 EM 00011001 9 00111001 Y 01011001 z 01111010 SUB 00011010 : 00111010 Z 01011010 { 01111011 ESC 00011011 ; 00111011 [ 01011011 | 01111100 FS 00011100 < 00111100 \ 01011100 } 01111101 GS 00011101 = 00111101 ] 01011101 ~ 01111110 RS 00011110 > 00111110 ^ 01011110 DEL 01111111 US 00011111 ? 00111111 - 01011111 Table 3: ASCII Code Electronic Communication Electronic Science 33. Data Communication

8

The advantage of ASCII code is its ability to represent both upper and lower case letters of the alphabet. For a 8- bit data, the 8th bit is not part of ASCII code but is reserved for parity bit required in error detection scheme. 3.4 EBCDIC (Extended Binary Coded Decimal Interchange Code) It is an eight-bit alphanumeric code developed by International Business Machines (IBM). It was used in IBM computers and IBM compatible equipments. As seen from the fig.4, there are four main blocks in the EBCDIC : 0000 0000 to 0011 1111 is reserved for control characters; 0100 0000 to 0111 1111 are for punctuation; 1000 0000 to 1011 1111 for lowercase characters and 1100 0000 to 1111 1111 for uppercase characters and numbers. EBCDIC allows a representation of maximum of 256 characters. EBCDIC has a wider range of control characters than ASCII. The major disadvantage of this code is that parity checking for error detection cannot be used on an 8 bit system. Most other computers use ASCII codes.

SYMBOL EBCDIC EBCDIC SYMBOL EBCDIC SYMBOL EBCDIC

NUL 00000000 RES 00010100 ESC 00100111 SP 01000000 SOH 00000001 NL 00010101 SM 00101010 - 01001011

STX 00000010 BS 00010110 CU2 00101011 < 01001100

ETX 00000011 C 00010111 ENQ 00101101 : : PF 00000100 CAN 00011000 ACK 00101110 “ 01111111

HT 00000101 EM 00011001 BEL 00101110 a 10000001

LC 00000110 CC 00011010 SYN 00110010 b 10000010 DEL 00000111 CU1 00011011 PN 00110100 : :

SMM 00001010 IFS 00011100 RS 00110101 z 10101001

VT 00001011 IGS 00011101 UC 00110110 A 11000001 FF 00001100 IRS 00011110 EOT 00110111 B 11000010

CR 00001101 IUS 00011111 CU3 00111011 : :

SO 00001110 DS 00100000 DC4 00111100 Z 11101001

SI 00001111 SOS 00100001 NAK 00111101 0 11110000 DLE 00010000 FS 00100010 SUB 00111111 1 11110001

DC1 00010001 BYP 00100100 : :

DC2 00010010 LF 00100101 9 11111001

TM 00010011 ETB 00100110

Table 4: EBCDIC Code Electronic Communication Electronic Science 33. Data Communication

9

4. Data Representation:

Data can be represented in various forms as shown in fig-4 such as: 1. Audio: It refers to the transmission of sound or music. Audio signal is a continuous signal representing sound as an electrical voltage with a frequency range of roughly 20 to 20,000 Hz. Audio signals may be directly synthesized, or may be originating at a transducer such as a microphone, musical instrument pickup or tape head. 2. Video: This word originates from latin meaning “ I see”. Video refers to video recording and transmission of image or movie. Video when captured by the TV camera is produced as a continuous entity. It is a discrete entity when is in the form of series of images processed in rapid succession creating the illusion of motion.

Figure 4: Various Data forms

3. Images: Image comprises of matrix of picture elements known as pixels. Each pixel is a tiny dot of colour which collectively creates any image. Greater number of pixels on the screen yields higher resolution enabling finer detail representation. A colour is typically represented by three component intensities such as red, green and blue (RGB). Some combination of these three colour components is represented by a pixel. 4. Numbers: Normally we write numbers using digits 0 to 9. This is called decimal number system with a base of 10. However, any integer can be easily represented by a sequence of 0's and 1's known as binary numbers. Numbers are represented using binary number system. ASCII is not used to represent numbers.

Electronic Communication Electronic Science 33. Data Communication

10

5. Text: Text can be represented easily by assigning a unique numeric value for each symbol used in the text. For example, the widely used ASCII code (American Standard Code for Information Interchange) defines 128 different symbols (all the characters found on a standard keyboard, plus a few extra), and assigns to each a unique numeric code between 0 and 127. When you save a file as "plain text", it is stored using ASCII. The code value for any character can be converted to base 2, so any written message made up of ASCII characters can be converted to a string of 0's and 1's.

5. Data Transmission Modes

The term Data Transmission indicates the movement of the bits over a transmission medium connecting the two communicating devices. Transmission on a communication channel between two machines can occur in several different ways. The transmission is characterised by: 1. The direction of the exchanges 2. The number of data bits sent simultaneously 3. Synchronization between the transmitter and receiver

5.1 Data Transmission Modes based on Direction of Exchange As shown in fig-5, based on the direction of exchange, data transmission can be classified into Simplex, Half Duplex and Full Duplex.

Data Transmission Modes

Simplex Half Duplex Full Duplex

Figure 5: Data transmission modes based on direction of exchange

Electronic Communication Electronic Science 33. Data Communication

11

5.1.1 Simplex In simplex communication networks, communication can take place in one direction only. Connected to such a circuit are either a send only or receive only device. The transmitter and the receiver operate on the same frequency. Simplex transmission generally involves dedicated circuits. It is not possible to send back error or control signals to the transmit end through Simplex channels. As shown the fig-6, A transmits and B receives. The direction of data signal is only in one direction that is, from A to B.

Figure 6: Simplex Communication

This way of Communication can be also called as unidirectional or one-way Communication. Simplex circuits are analogous to escalators, doorbells, fire alarms and security systems. Some examples of Simplex communication are shown in fig-7. A Communication between a computer and a keyboard involves simplex transmission. The CPU never needs to send characters to the keyboard but the keyboard always send characters to the CPU. Other simplex device is the Monitor that can only accept output. A television broadcast is another example of simplex transmission. Other example of simplex transmission is loudspeaker system. An announcer talks into a microphone and his/her voice is sent through an amplifier and then to all the speakers. Signal travels in only one direction from microphone to speaker.

Electronic Communication Electronic Science 33. Data Communication

12

Figure 7: Examples of Simplex Communication

5.1.2 Half Duplex A half duplex system can transmit data in both directions, but only in one direction at a time. In other words, half duplex mode supports two-way traffic but in only one direction at a time. Both the connected devices can transmit and receive but not simultaneously. When one device is sending the other can only receive and vice-versa. As seen in the figure 8, when A is in transmit mode, B is in receive mode and vice versa. It is possible to perform error detection and request the sender to retransmit information that arrived corrupted. Two existing stations alternately (not simultaneously) send signals to each other on the same frequency.

Figure 8: Half Duplex Communication This type of connection makes it possible to have bidirectional communications using the full capacity of the line. The only advantage of half duplex is that the single connection is cheaper than the double connection.

Electronic Communication Electronic Science 33. Data Communication

13

One of the examples of half duplex communication as shown in fig- 9, is a walkie-talkie system. It can only send or receive a transmission at any given time. It cannot do both at the same time. A walkie-talkie requires only a single frequency for bidirectional communication. Communication between the computer and line printer is half duplex. Printers send messages to the computer. The printer cannot send these messages while the computer is sending characters but when the computer stops sending characters, then the printer can send messages back.

Figure 9: Examples of Half Duplex Communication

5.1.3 Full Duplex A full duplex system can transmit data simultaneously in both directions on transmission path. Both the connected devices can transmit and receive at the same time. Therefore it represents truly bi-directional system. Here as shown in figure 10, A and B can simultaneously send and receive data.

Figure 10: Full Duplex Communication The communication link may contain two separate transmission paths one for sending and another for receiving.

Electronic Communication Electronic Science 33. Data Communication

14

Most of data networks are using duplex transmission using different channels in the same medium connecting the transmitter and receiver. Each of the channels is half duplex, but together it makes full duplex. This type of transmission can also be called bidirectional transmission. The use of full duplex increases the data transmission rate. Modern network interface cards are configured for full duplex support by default. In full duplex transmission, the channel capacity is shared by both communicating devices at all times. Best examples of full duplex communication are the Telephone networks as shown in fig-11. When two persons talk on telephone line, both can listen and speak simultaneously.

Figure 11: Examples of Full Duplex Communication

5.2 Data transmission modes based on the number of data bits sent simultaneously

The transmission mode can be characterized by the number of elementary units of information (bits) that can be simultaneously translated by the communications channel. Based on this, the two types of transmission modes are parallel transmission and serial transmission as shown in fig-12.

Data Transmission Modes

Parallel Serial

Figure 12 : Transmission modes based on the number of simultaneous data bits

Electronic Communication Electronic Science 33. Data Communication

15

5.2.1 Parallel data transmission In parallel transmission, all bits the data are transferred simultaneously. Transmission of parallel data is extremely fast, can be of the order of ns, since there is a simultaneous transfer of all the data bits. The transmission speed is limited to the speed of the logic circuits involved in the data transfer. Parallel data transmission is not practical for long distance communications as multiple wires cost more than a single wire and also suffers signal attenuation. In fact, computers never process a single bit at a time; generally they are able to process several and for this reason the basic connections on a computer are parallel connections.

Figure 13 : Parallel Transmission

As shown in the fig-13, a register is loaded with n bit binary word that needs to be transmitted. The register contains one flip-flop for each bit. All the flip-flop outputs are connected to transmission lines that carry the data bits to the receiver. The receiver also has n bit storage register. In parallel data communication you need one wire for transmission of each data bit. Therefore there is a necessity of multi-wire cable. When a clock pulse is applied to the flip-flops of the register, the bits of the word are transmitted simultaneously during the time period of a single clock pulse.

Electronic Communication Electronic Science 33. Data Communication

16

5.2.2 Serial transmission In serial transmission, data bits are sent sequentially that is, one after the other on the same channel (wire). It reduces costs for wire but also slows the speed of transmission. In computers, digital data transmission between circuits is in parallel format. Therefore parallel to serial conversion devices are required at interface between the transmitter and the single . Also there is a requirement of serial to parallel conversion between the single transmission line and the receiver. Such data conversions are made possible by shift registers.

Figure 14: Serial Transmission

As shown in fig-14, when a clock pulse is applied to the sequentially cascaded flip-flops of the shift register, the bits of the word are shifted from one flip-flop to the next. At the end of n clock pulses, all the n data bit of the word will be transmitted. The transmitted serial word over the communication link is then received by the serial in-parallel out shift register at the receiving end. Further the parallel data outputs from the shift register is transferred to the computer circuits.

5.3 Data transmission modes based on the synchronization between receiver and transmitter

Based on the synchronization between the receiver and transmitter, the two types of transmission modes are asynchronous transmission and synchronous transmission as shown in fig-15.

Electronic Communication Electronic Science 33. Data Communication

17

Data Transmission Modes

Asynchronous Synchronous

Figure 15 : Transmission Modes based on the Rx and Tx Synchronization

5.3.1 Asynchronous data transmission In Asynchronous data transmission as shown in fig-16, each data word representing single character , has a “Start bit” before the and “Stop bit” at the end of the byte for Start/Stop synchronisation or identifying the beginning and ending of the word.ie binary 1 which is referred to as a mark. When there is no information being transmitted, communication line is at high state.

Figure 16 : Asynchronous Transmission Start bit is always 1 bit duration and is always equal to binary „0‟ referred to as a space. The transition from mark to space indicates the data word beginning and aids in receiver synchronization. Stop bit may be 1 or 2 bits duration and is always equal to binary „1‟ or mark indicating the end of word. The start and stop bits ensure the transmitter and receiver synchronization. It is extremely reliable communication mode but bit slow due to significant overhead caused by the addition of start and stop bits per character transmission and is inefficient when large blocks and volume of data needs to be transmitted.

Electronic Communication Electronic Science 33. Data Communication

18

5.3.2 Synchronous data transmission In Synchronous data transmission shown in fig-17, there are no start/stop bits. Continuous block of data of multi-words are transmitted. Synchronization between the transmitter and receiver is maintained by means of group of synchronization bits both at the beginning and ending of the data block.

Figure 17 : Synchronous Transmission Each of these data blocks may contain hundreds and thousands of characters. These blocks are encapsulated with Header & Trailer along with Flags. As shown in the figure, two bit synchronization characters indicate the start of data transmission. The end of the data block is specified by another special code end of text (ETX). ETX is usually followed by one or more error detection. Since the number of synchronizations bits used in synchronous transmission is much less as compared to the number of start and stop bits used in asynchronous transmission per block, it is much faster than asynchronous transmission.

6. Standard Organizations for Data Communication

An association of organizations, governments, manufacturers and users form the standards organizations .They are responsible for developing, coordinating and maintaining the standards. All the data communications equipment manufacturers and users should comply with these standards. The major standards organizations for data communication are shown in figure 18.

Electronic Communication Electronic Science 33. Data Communication

19

International Institute of Internet Internet Electronics Electrical and Architecture Union- Research Industry Electronics Board (IAB) Task Force Association (EIA) Engineers Sector (ITU-T) (IRTF) (IEEE)

American International Internet Telecommunications National Standard Engineering Industry Association Standards Organization Task Force (TIA) Institute (ISO) (IETF) (ANSI)

Figure 18 : Standard Organizations

7. Summary

We this lesson, we have learnt the following:  Data communication is the exchange of binary data between two or more devices through suitable transmission media either wired or wireless. It permits the transfer of binary or digital information between remote computers.  There are major five components of a data communication system: message, sender, transmission medium, receiver and protocol.  A data code refers to the way in which bits are grouped together to represent different symbols. There are a number of different codes like Baudot code, Morse code etc., but the most common code in use today is the 7 bit American Standard Code for Information Interchange (ASCII) code.  Another popular code is an eight-bit alphanumeric code developed by International Business Machines (IBM) known as EBCDIC (Extended Binary Coded Decimal Interchange Code).  Data can be represented in various forms such as text, numbers, image, audio and video.  Data Transmission indicating the movement of the bits over a transmission medium connecting the two communicating devices can be characterised: based on the direction of the exchanges into simplex, half duplex and full duplex; based on the Electronic Communication Electronic Science 33. Data Communication

20

number of data bits sent simultaneously into parallel and serial transmission; based on the synchronization between the transmitter and receiver into asynchronous and synchronous transmission.  In serial transmission, data bits are sent sequentially that is, one after the other on the same transmission channel where as in parallel transmission, the data bits are transferred simultaneously. Transmission of parallel data is extremely fast than serial transmission but it requires multiple wires of the channel. Hence it is costly and not used for long distance communication.  In asynchronous transmission, use of start and stop bits per character transmission makes it inefficient when large blocks and volume of data needs to be transmitted.  In synchronous data transmission, there are no start/stop bits. Continuous block of data of multi-words are transmitted making it more faster than asynchronous transmission.  An association of organizations, governments, manufacturers and users form the standards organizations responsible for developing, coordinating and maintaining the standards. Some of the standard organization for data communication are International Standard Organization (ISO), Internet Engineering Task Force (IETF) , Institute of Electrical and Electronics Engineers (IEEE), American National Standards Institute (ANSI) etc.

Electronic Communication Electronic Science 33. Data Communication