DATA
COMMUNICATIONS
© Copyright Brian Brown, 1995-2000. All rights reserved.
Part 9: Baudot and ASCII Codes
Introduction
This section introduces the concept of data codes. This refers to
the way in which bits are grouped together to represent different
symbols. There are a number of different codes, but the most
common code in use today is the ASCII code.
Objectives
At the end of this section you should be able to
DATA CODES
This refers to the way in which data is represented. The sender
and receiver must use the same code in order to communicate
properly. Here, we will briefly look at two common codes, one
which was developed earlier on and was widely used in early
telegraph systems, and the other, which is in widespread use
today.
The
Baudot Code
The Baudot code was used extensively in telegraph systems. It is
a five bit code invented by the Frenchman Emile Baudot in 1870.
Using five bits allowed 32 different characters. To accommodate
all the letters of the alphabet and numerals, two of the 32
combinations were used to select alternate character sets.
Each character is preceded by a start bit, and followed by a stop bit. It is an asynchronous code, and thus suited for low speed data communication.
Value | LTRS shift | FIGS shift | Value | LTRS shift | FIGS shift |
3 | A | - | 23 | Q | 1 |
25 | B | ? | 10 | R | 4 |
14 | C | : | 5 | S | . |
9 | D | Who are u | 16 | T | 5 |
1 | E | 3 | 7 | U | 7 |
13 | F | ! | 30 | V | ; |
26 | G | & | 19 | W | 2 |
20 | H | # | 29 | X | / |
6 | I | 8 | 21 | Y | 6 |
11 | J | Bell | 17 | Z | " |
15 | K | ( | 0 | BLANK | BLANK |
18 | L | ) | 31 | LTRS | LTRS |
28 | M | . | 27 | FIGS | FIGS |
12 | N | , | 4 | SPACE | SPACE |
24 | O | 9 | 8 | CR | CR |
22 | P | 0 | 2 | LF | LF |
For instance, lets consider coding the phase "JAMES BOND 007 SAYS HI!" using the Baudot code. To switch between the LTRs and FIGs requires the use of a LetterShift or a FigureShift. Once switched, you stay in that mode till you want to switch back again. So, here is the phrase encoded in Baudot.
J | A | M | E | S | B | O | N | D | 0 | 0 | 7 | S | A | Y | S | H | I | ! | ||||
31 11 | 3 | 28 | 1 | 5 | 4 | 25 | 24 | 12 | 9 | 4 | 27 22 | 22 | 7 | 4 | 31 5 | 3 | 21 | 5 | 4 | 20 | 6 | 27 13 |
Exercise
Code the phrase "YEAR 1997 TIME 10AM" in Baudot. [Answer]
Something to think about
Looking at the Baudot code, can you think of a reason why it is
not suitable for widespread use today? [Answer]
ASCII (American Standard Code for Information
Interchange)
The ASCII code is the most popular code for serial data
communications today. It is a seven bit code (128 combinations),
and thus supports upper and lowercase characters, numeric digits,
punctuation symbols, and special codes. The table below lists the
values for each character in the ASCII set.
00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F | |
00 | NUL | SOH | STX | ETX | EOT | ENQ | ACK | BEL | BS | TAB | LF | VT | FF | CR | SO | SI |
10 | DLE | DC1 | DC2 | DC3 | DC4 | NAK | SYN | ETB | CAN | EM | SUB | ESC | FS | GS | RS | US |
20 | ! | " | # | $ | % | & | ' | ( | ) | * | + | , | - | . | / | |
30 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | : | ; | < | = | > | ? |
40 | @ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O |
50 | P | Q | R | S | T | U | V | W | X | Y | Z | [ | \ | ] | ^ | _ |
60 | ` | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o |
70 | p | q | r | s | t | u | v | w | x | y | z | { | | | } | ~ | DEL |
To work out a particular value from the table, you first determine the row value, then add the column value. For example, the character A has a value of 41, being a row value of 40 and a column value of 1.
ASCII is also used as the data code for keyboards in computers. Control Codes have values between 00 and 1F (hexadecimal). Control codes are used in binary synchronous communication, and device control codes in communicating with devices such as printers or terminals.
A control code can be generated from a keyboard by holding down the Ctrl key and pressing another key. For instance, holding down the Ctrl key and pressing the A key generates the control code SOH.
Exercise
Code the phrase "Ascii was here 1997." in ASCII. [Answer]
Something to think about
Looking at the ASCII code, can you think of any limitation it
might have for widespread use today? [Answer]
Summary
Data codes have always been in widespread
use from mankinds early history. From the use of hand signals to
mirrors flashing signals across the land, to smoke signals of the
American Indians, information has been coded and sent by a
variety of means.
ASCII is the most widespread data code in use today. It is a seven bit code, but with the world rapidly shrinking and global boundaries becoming blurred, the necessity to communicate across language barriers has exposed the limitations of this code. Another code, unicode, offers some promise in this multi-language area.