Introduction to Data Communications
Previous 20b. 7/8 Bit Codes Next

20b. 7/8 Bit Codes

There are 2 common data transfer codes in data communication:

  1. 7 bit code (Text)
  2. 8 bit (Binary)

7 Bit Code or Text:

7 bit data code transfer is used to transfer text files. These are files consisting of ASCII text characters only. There are only 27 or 128 different characters in the ASCII text transfer type.

Usually, files that are meant to be read by the human eye used 7 bit code! Text editors like DOS's EDLIN & EDITOR or Unix's pico or vi are used to change or modify the files. Examples of text files: autoexec.bat, config.sys, .signature, E-mail, stories, information.

8 Bit Code or Binary:

8 bit code is used to transfer binary files that contain information that is to be "read" specifically by an application or microprocessor. They contain 8 bit (1 byte) control codes and have 28 or 256 different characters. Examples of binary files are: drawings.bmp (bit mapped graphics), win.com (application), newtext.zip (compressed files).

Common Problems:

If you download a binary (8 bit) file, using text (7 bit) mode, you lose 1 bit from each character. In a binary file this is disastrous! The text transfer mode ignores the 8th bit and discards it into the bit bucket. In the following example the number 202 is transmitted but the number 74 is received. You end up with a corrupted file!

Decimal Binary
Transmitted
202
1100 1010 - 8 bit data
Received
74
100 1010 - 7 bit data (MSB is ignored)

If you download a text file (7 bit) using binary (8 bit) mode, an extra bit is inserted into the data. The bit is set to 0 and placed as the MSB or 8th bit.

Decimal Binary
Transmitted
74
100 1010 - 7 bit data
Received
74
0100 1010 - 8 bit data

The received file works beautifully! If there is a choice or you are not sure what the number of data bits are, always pick Binary or 8 bit transfer mode! Originally, when transfer rates were very slow (300 to 1200 bps), sending 7 or 8 bits would make a big difference in transfer times.


Introduction to Data Communications
Previous Table of Contents Next