<<

Basic Data Communications Concepts OVERVIEW

& • Characters • Parallel vs. Serial • Timing Methods for Serial Transmission • Directionality of the Transmission FIGURE 3-1: TERMINAL AND HOST COMPUTER A SIMPLE DATA COMM. MODEL

• Host Computer - where the processing takes place – Mainframes – – Microcomputers (PCs) – Super Computers • Terminal - a device that communicates with a host – Dumb - Send/Receive data. Can’ modify data – Smart - Sends extra info to host (.., terminal ID) – Intelligent - Programmable • PCs are the most “intelligent” terminal – Can emulate any of the three listed above. – Can also act as a host in some situations BITS & BYTES

• With few exceptions, digital computers communicate through a series of 1’ and 0’s known as bits. • This binary representation can also be thought of as being on and off. • Groups of bits are referred to as bytes – In most systems, a consists of 8 bits – Usually each byte represents a single • A-, a-z, 0-9 • characters(e.g., @, #, %) • special characters (LF, CR, ESC) • Bits and bytes are closely related to the system. See Appendix in text for more information CHARACTER CODES

• The relationship of bytes to characters is determined by a character • Each time a user presses a key on a terminal/PC, a is generated for the corresponding character. • Various character codes have been used in including: – Morse, Baudot – EBCDIC, ASCII – • Regardless of the character code, both the terminal/ host or sender/receiver must recognize the same coding scheme

• First character code developed • For transmitting data over telegraph wires – telegrams (remember Western Union) • Used dots (short beep) and (long beeps) instead of 1’s and 0’s • More frequent the character, the fewer the beeps • Problems: – variable “length” character representation – required pauses between letters – no lower case, few punctuation or special characters – no error detection mechanism FIGURE 3-2: MORSE CODE

• One of first codes developed for machine to machine communication • Uses 1’s and 0’s instead of dots and dashes • For transmitting messages (punch tape) • character length (5-bits) – 32 different codes – increased capacity by using two codes for shifting • 11111 (32) Shift to Lower (letters) • 11011 (27) Shift to Upper (digits, punctuation) – 4 special codes for SP, CR, LF & blank – Total = 26 + 26 + 4 = 56 different characters BAUDOT CODE (cont.)

• Problems: – required shift code to switch between character sets – no lower case, few special characters – no error detection mechanism – characters not ordered by binary value – designed for transmitting data, not for data processing • International Baudot – Added a 6th for parity – Used to detect errors within a single character FIGURE 3-3: BAUDOT CODE EBCDIC

• Extended Binary Coded Interchange Code • 8-bit character code developed by IBM – used for data communication, processing and storage – extended earlier proprietary 6-bit BCD code – designed for backward compatibility or marketing? – still in use today on some mainframes and legacy systems. • Allows for 256 different character representations (28) – includes upper and lower case – lots of special characters (non-printable) – lots of blank (non-used codes) • assigned to international characters in various versions – used with/without parity (block transmissions) FIGURE 3-4: EBCDIC CODE ASCII CODE

• American Standard Code for Information Interchange • 7-bit code developed by the American National Standards Institute (ANSI) – most popular data communication character code today • Allows for 128 different character representations (27) – includes upper and lower case – lots of special characters (non-printable) – generally used with an added – better binary ordering of characters than EBCDIC • Extended ASCII uses 8 data bits and no parity – Used for processing and storage of data – Allows for international characters – 8th bit stripped of for transmission of standard character set FIGURE 3-5: 7-BIT ASCII CODE FIGURE 3-5: ASCII NON-PRINTABLE CODES UNICODE

• Designed to support international languages: Latin; Greek; Cyrillic; Armenian; Hebrew; Arabic; Syriac; Thaana; ; Bengali; Gurmukhi; Oriya; Tamil; Telegu; Kannada; Malayalam; Sinhala; Thai; Lao; Tibetan; Myanmar; Georgian; Hangul; Ethiopic; Cherokee; Canadian-Aboriginal Syllabics; Ogham; ; Khmer; Mongolian; Han (Japanese, Chinese, Korean ideographs); Hiragana; Katakana; Bopomofo and Yi • Uses a 16-bit code for total of 65,536 possible char. – Incorporates ASCII in first 128 codes – Incorporates LATIN in first 256 codes • Support found in newer hardware & software, especially web technologies (e.g., JAVA, XML, HTML) • For more see www.unicode.org SUMMARY OF CHARACTER CODES

Morse = .- Baudot = 5 bit (no parity) Int. Baudot = 6 bit (5 data + 1 parity) ASCII = 8 bit (7 data + 1 parity) EBCDIC = 9 bit (8 data + 1 parity) UNICODE = 16 bits (no parity)

• Normally terminals and hosts must use the same code • However, code conversion hardware/software can be used to allow different machines to communicate SUMMARY OF CHARACTER CODES (cont.)

• Bits per character affect – storage requirements – throughput of information • Use of larger codes became feasible due to – higher transmission speeds – denser storage mediums • Choice of character coding scheme is a trade off between – simplicity & brevity – expressivity TRANSMISSION CHARACTERISTICS

• A character code determines what bits we will send between a terminal and host • But how will those bits be sent: – Parallel vs. Serial Transmission – Serial Transmission Timing – Direction of Transmission Path – Others which we’ll look at later • speed • organization of data (protocol) • transmission media FIGURE 3-8: PARALLEL DATA TRANSMISSION

Used most often for communication with local devices FIGURE 3-9: SERIAL DATA TRANSMISSION

Used most often for data communication SERIAL TRANSMISSION TIMING

• ASYNCHRONOUS – Bits comprising a character are transmitted independent of timing of any other character – Asynchronous information bits are preceded by a start bit and followed by a stop bit • Start bit is always a 0 () • Stop bit is always a 1 (mark) – Start and Stop bits along with a parity bit result in 30% overhead in data transmission using ASCII codes – Also known as start-stop transmission – Used with dumb terminals and “character at a time” applications FIGURE 3-10: ASYNCHRONOUS DATA TRANSMISSION SERIAL TRANSMISSION TIMING (cont.)

• SYNCHRONOUS – Timing between sending and receiving locations is synchronized for transmission using clocks or sync characters – Provides support for block-mode transmission of data – No start or stop bits – Parity bits may not be used depending on the character code and block protocol – Frequently used with smart/intelligent terminals • User inputs data which is held in the terminal • After input is complete, user presses the “send” or “enter” key and all data is transmitted in a single block. FIGURE 3-11: SYNCHRONOUS DATA TRANSMISSION FIGURE 3-12: SYNCHRONOUS AND ASYNCHRONOUS TRANSMISSION EFFICIENCY FIGURE 3-13: SIMPLEX COMMUNICATIONS PATH FIGURE 3-14: HALF DUPLEX COMMUNICATIONS PATH FIGURE 3-15: FULL DUPLEX COMMUNICATIONS PATH