Tải bản đầy đủ
21 What are ISPs ( Internet service providers) and IAPs ( Internet access providers)?

# 21 What are ISPs ( Internet service providers) and IAPs ( Internet access providers)?

Tải bản đầy đủ

2
Fundamentals of Data
Communication and Packet
Switching
‘Data’, a plural noun, is the term used to describe information which is stored in
and processed by computers. In this chapter we how such data (computer text or
graphics) are represented electronically and explain the basic physical principles
and practicalities of telecommunications line transmission. We explain binary code,
ASCII, EBCDIC, pixels and graphics arrays, computer-to-network interfaces, digital transmission, modems, synchronisation, the basics of packet switching and the
measures necessary to avoid data communications errors.

2.1 The binary code
Binary code is the means used by computers to represent numbers. Normally, we as humans
quote numbers in decimal (or ten-state) code. A single digit in decimal code may represent
any of ten different unit values, from nought to nine, and is written as one of the figures 0,
1, 2, 3, 4, 5, 6, 7, 8, 9. Numbers greater than nine are represented by two or more digits:
twenty, for example, is represented by two digits, 20, the first ‘2’ indicating the number of
‘tens’, so that ‘twice times ten’ must be added to ‘0’ units, making twenty in all. In a three
digit decimal number, such as 235, the first digit indicates the number of ‘hundreds’ (or
‘ten times tens’), the second digit the number of ‘tens’ and the third digit, the number of
‘units’. The principle extends to numbers of greater value, comprising four or indeed many
more digits.
Consider now another means of representing numbers using only a two-state or binary
code system. In such a system a single digit is restricted to one of two values, either zero or
one. How then are values of 2 or more to be represented? The answer, as in the decimal case,
is to use more digits. ‘Two’ itself is represented as the two digits one-zero, or ‘10’. In the
binary code scheme, therefore, ‘10’ does not mean ‘ten’, but ‘two’. The rationale for this is
similar to the rationale of the decimal number system with which we are all familiar.
In decimals the number one thousand three hundred and forty-five is written ‘1345’. The
rationale is
(1 × 103 ) + (3 × 102 ) + (4 × 10) + 5

Data Networks, IP and the Internet: Protocols, Design and Operation
 2003 John Wiley & Sons, Ltd ISBN: 0-470-84856-1

Martin P. Clark

30

Fundamentals of data communication and packet switching

the same number in binary requires many more digits, as follows.
1345 (decimal) = 10101000001 (binary)
1345 (decimal) = 10101000001 (binary)

=
+
+
+
+
+
+
+
+
+
+

(binary)
1
0
1
0
1
0
0
0
0
0
1

x210
x29
x28
x27
x26
x25
x24
x23
x22
x2

(decimal)
1024
+
0
+ 256
+
0
+
64
+
0
+
0
+
0
+
0
+
0
+
1
= 1345

Any number may be represented in the binary code system, just as any number can be represented in decimal.
All numbers, when expressed in binary consist only of 0s and 1s, arranged as a series of
Binary digITS (in the jargon: bits). The string of bits of a binary number are usually suffixed
with a ‘B’, to denote a binary number. This prevents any confusion that the number might be
a decimal one. Thus 41 (forty-one in decimal) is written ‘101001B’.

2.2 Electrical or optical representation and storage of binary
code numbers
The advantage of the binary code system is the ease with which binary numbers can be
represented electrically. Since each digit, or bit, of a binary number may only be either 0 or 1,
the entire number can easily be transmitted as a series of ‘off’ or ‘on’ (sometimes also called
space and mark ) pulses of electricity. Thus forty-one (101001B) could be represented as ‘onoff-on-off-off-on’, or ‘mark-space-mark-space-space-mark’. The number could be conveyed
between two people over quite a distance, transmitting by flashing a torch, either on or off,
say every half second, and receiving using binoculars. Figure 2.1 illustrates this simple binary
communication system in which two binary digits (or bits) are conveyed every second. The
speed at which the binary code number, or other information can be conveyed is called the
information conveyance rate (or more briefly the information rate). In this example the rate
is 2 bits per second, usually shortened to 2 bit/s.

Figure 2.1

A simple binary communication system.

ASCII (American standard code for information interchange)

31

Figure 2.1 illustrates a simple means of transmitting numbers, or other binary coded data
by a series of ‘on’ or ‘off’ electrical or optical states. In fact, the figure illustrates the basic
principle of modern optical fibre transmission.
As well as providing a means for bit transmission across the communications medium, a
telecommunications system also usually provides for temporary data storage. At the sending
end the data has to be stored prior to transmission, and at the receiving end data may have to
‘wait’ momentarily before the final receiving device or computer program is ready to accept it.

2.3 Using the binary code to represent textual information
The letters of the alphabet can be stored and transmitted over binary coded communications
systems in the same way as numbers, provided they have first been binary-encoded. There have
been four main binary coding systems for alphabetic text. In chronological order these are the
Morse code, the Baudot code (used in telex, and also known as international alphabet IA2 ),
EBCDIC (extended binary coded decimal interchange code), and ASCII (American (national)
standard code for information interchange, also known as international alphabet IA5 ).

2.4 ASCII (American standard code for information interchange)
As a 7-bit binary code for computer characters, ASCII (American standard code for information
interchange) [pronounced ‘Askey’] was invented in 1963 and is the most important code. The
original code (Tables 2.1 and 2.2) encompassed not only the alphabetic and numeric characters
(which had previously also been catered for by the Morse code and the Baudot code but
Table 2.1 The original 7-bit ASCII code (International alphabet IA5)

32

Fundamentals of data communication and packet switching
Table 2.2
ASCII
character
ACK
BEL
BS
CAN
CR
DC1
DC2
DC3
DC4
DEL
DLE
EM
ENQ
EOT
ESC
ETB
ETX
FF
FS
GS
HT
LF
NAK
NUL
RS
SI
SO
SOH
STX
SUB
SYN
US
VT

ASCII control characters
Meaning
Acknowledgement
Bell
Backspace
Cancel
Carriage Return
Device Control 1
Device Control 2
Device Control 3
Device Control 4
Delete
End of Medium
Enquiry
End of Transmission
Escape
End of Transmission Block
End of Text
Form Feed
File Separator
Group Separator
Horizontal Tab
Line Feed
Negative Acknowledgement
Null
Record Separator
Shift In
Shift Out
Start of Text
Substitute Character
Synchronisation character
Unit Separator
Vertical Tab

also a range of new control characters as needed to govern the flow of data in and around
the computers.
An adapted 8-bit version of the code, developed by IBM and sometimes called extended
ASCII is now standard in computer systems, the most commonly used code used is the 8-bit
ASCII code corresponding to the DOS (disk operating system) code page 437. This is the
default character set loaded for use in standard PC keyboards, unless an alternative national
character set is loaded by means of re-setting to a different code page.
The extended 8-bit ASCII code (international alphabet IA5 and code page 437) is illustrated
in Table 2.3. The ‘coded bits’ representing a particular character, number or control signal
are numbered 1 through 8 respectively (top left-hand corner of Table 2.3). These represent
the least (LSB) (number 1) through most significant bits (MSB) (number 8) respectively. Each
alphanumeric character, however, is usually written most significant bit (i.e., bit number 8)
first. Thus the letter C is written ‘01000011’. But to confuse matters further, the least significant
bit is transmitted first. Thus the order of transmission for the letter ‘C’ is ‘11000010’ and for
the word ‘ASCII’ is as shown in Figure 2.2.