Computers can only handle numbers and so to represent text, each text character has to be converted into a number. In this context, a printed number is also counted as a text character. It does not really matter what number represents a particular character, but it would be helpful if most people used the same number to represent a particular character. (Doesn't that seen a good idea?)
Out of the many initial variants, ASCII, the "American Standard Code for Information Interchange" became a generally accepted standard. It isn't an absolute standard, because all those who implement it are convinced they know best and make their own changes. At the present, some control characters and the text characters from 32 to 126 seem to have become accepted and standardised.
The implementation of ASCII on the teletype uses 7 bits for
the data, from 0000000 to 1111111, ie from 0 to 127. Table 1
below, lists all the 128 possible codes. Codes 0 to 31 are the so
called control codes, given with their mnemonics (as current in
1968). Many of these now have little meaning, as in their
original form they were used for the direct transmission of text
messages. Some have been hi-jacked and put to different (trivial)
use in recent years.
On a teletype, control characters are generated by pressing the control key (labelled CTRL), in combination with an alphabetical key. The control key suppresses the transmission of bit 7, which effectively subtracts 64 from the ASCII code. So the A key, which would normally transmit the code 65, transmits a 1 when pressed in conjunction with the control key (CTRL/A).
Table 2 shows a few control characters with their mnemonics,
functions and the key combination used to produce them.
|0||NULL||CTRL/@||Does nothing - effectively a slight pause|
|1||SOH||CTRL/A||Start Of Header|
|2||STX||CTRL/B||Start of TeXt|
|3||ETX||CTRL/C||End of TeXt|
|4||EOT||CTRL/D||End Of Transmission|
|9||HT||CTRL/I||Horizontal Tab. Now called TAB.|
|10||LF||CTRL/J||Line Feed - it still is.|
|13||CR||CTRL/M||Carriage Return. Although the teletype does not have a movable carriage, the type wheel assembly is fairly massive and this returns to the left with a resoundingly heavy clunk! Carriage Return is now generally referred to as "Enter" - nothing like as heroic.|
|17||DC1||CTRL/Q||Device Control 1. Used to be called X-ON.|
|18||DC2||CTRL/R||Device Control 2. Used to be called TAPE ON or AUX ON. On a teletype, this character would turn the punch on.|
|19||DC3||CTRL/S||Device Control 3. Used to be called X-OFF.|
|20||DC4||CTRL/T||Device Control 4. Used to be called TAPE OFF or AUX OFF. This could turn the tape punch off.|
Parity was an early method of error checking. The eighth bit of the teletype code was referred to as the Parity Bit and was used for error checking rather than for encoding information. Parity could be either Even (the usual) or Odd. It was also possible to set the eighth bit as always on or always off, but this had no error checking effect.
Even parity requires that the number of ones transmitted in the eight binary bits of a given character should always be EVEN. If the seven data bits have an ODD number of ones, then the eighth bit, the parity bit, is set to a one, so that the total number of ones becomes EVEN. Table 3, below, illustrates this for the characters A - H
At the receiving end, the parity could be checked, if the parity was correct, then no error was assumed to have occurred. The system worked because the most likely error was the gain or loss of one bit and parity would detect this. Parity would not detect two errors in a character when one error gained a bit and the other error lost a bit. This was much less likely to occur.
The teletype type wheel was not large enough to print all the
printable characters listed in the table above. The wheel could
only hold 4 rows of characters with 16 characters in each row. A
typical array is given below.
NOTICE, IN PARTICULAR, THAT THE TELETYPE DOES NOT PRINT lower case CHARACTERS.