Data Communication Computer Network 简明教程

Digital Transmission in Computer Network

数据或信息可以使用两种方式存储,模拟和数字。对于计算机来说,它必须采用离散的数字形式才能使用数据。与数据类似,信号也采用模拟和数字形式。为了以数字方式传输数据,它必须先被转换为数字形式。

Data or information can be stored in two ways, analog and digital. For a computer to use the data, it must be in discrete digital form.Similar to data, signals can also be in analog and digital form. To transmit data digitally, it needs to be first converted to digital form.

Digital-to-Digital Conversion

本部分解释了如何将数字数据转换为数字信号。它可以通过两种方式完成,线路编码和块编码。对于所有通信,都必须使用线路编码,而块编码是可选的。

This section explains how to convert digital data into digital signals. It can be done in two ways, line coding and block coding. For all communications, line coding is necessary whereas block coding is optional.

Line Coding

将数字数据转换为数字信号的过程称为线路编码。数字数据采用二进制格式。它在内部表示(存储)为一系列 1 和 0。

The process for converting digital data into digital signal is said to be Line Coding. Digital data is found in binary format.It is represented (stored) internally as series of 1s and 0s.

line coding

数字信号由离散信号表示,它表示数字数据。有三种可用的线路编码方案:

Digital signal is denoted by discreet signal, which represents digital data.There are three types of line coding schemes available:

line coding schemes

Uni-polar Encoding

单极编码方案使用单个电压电平来表示数据。在这种情况下,为了表示二进制 1,高电压会传输,为了表示 0,不会传输电压。它还被称为单极-不归零,因为不存在静止条件,即它表示 1 或 0。

Unipolar encoding schemes use single voltage level to represent data. In this case, to represent binary 1, high voltage is transmitted and to represent 0, no voltage is transmitted. It is also called Unipolar-Non-return-to-zero, because there is no rest condition i.e. it either represents 1 or 0.

Unipolar NRZ

Polar Encoding

极性编码方案使用多个电压电平来表示二进制值。极性编码有四种类型:

Polar encoding scheme uses multiple voltage levels to represent binary values. Polar encodings is available in four types:

  1. Polar Non-Return to Zero (Polar NRZ) It uses two different voltage levels to represent binary values. Generally, positive voltage represents 1 and negative value represents 0. It is also NRZ because there is no rest condition. NRZ scheme has two variants: NRZ-L and NRZ-I. NRZ-L changes voltage level at when a different bit is encountered whereas NRZ-I changes voltage when a 1 is encountered.

归零(RZ)NRZ 的问题在于,如果发送器和接收器的时钟不同步,接收器无法确定何时结束一个位和何时开始下一个位。RZ 使用三个电压电平,正电压表示 1,负电压表示 0,零电压表示无。信号会在位中改变,而不是在位之间改变。

. Return to Zero (RZ) Problem with NRZ is that the receiver cannot conclude when a bit ended and when the next bit is started, in case when sender and receiver’s clock are not synchronized. RZ uses three voltage levels, positive voltage to represent 1, negative voltage to represent 0 and zero voltage for none. Signals change during bits not between bits.

曼彻斯特这种编码方案结合了 RZ 和 NRZ-L。位时间分为两半。它在位中间过渡,并且在遇到不同位时改变相位。

. Manchester This encoding scheme is a combination of RZ and NRZ-L. Bit time is divided into two halves. It transits in the middle of the bit and changes phase when a different bit is encountered.

差分曼彻斯特这种编码方案结合了 RZ 和 NRZ-I。它也过渡在位的中间,但是仅在遇到 1 时改变相位。

. Differential Manchester This encoding scheme is a combination of RZ and NRZ-I. It also transit at the middle of the bit but changes phase only when 1 is encountered.

Bipolar Encoding

双极编码使用三个电压电平,即正、负和零。零电压表示二进制 0,位 1 通过交替正电压和负电压来表示。

Bipolar encoding uses three voltage levels, positive, negative and zero. Zero voltage represents binary 0 and bit 1 is represented by altering positive and negative voltages.

bipolar

Block Coding

为了确保接收到的数据帧的准确性,使用了冗余位。例如,在偶校验中,添加一个校验位,以便使帧中 1 的数量变为偶数。通过这种方式,位数会增加。这被称为块编码。

To ensure accuracy of the received data frame redundant bits are used. For example, in even-parity, one parity bit is added to make the count of 1s in the frame even. This way the original number of bits is increased. It is called Block Coding.

块编码以斜线表示法表示,mB/nB。这意味着,m 位块被 n 位块替换,其中 n > m。块编码涉及三个步骤:

Block coding is represented by slash notation, mB/nB.Means, m-bit block is substituted with n-bit block where n > m. Block coding involves three steps:

  1. Division,

  2. Substitution

  3. Combination.

完成块编码后,对它进行线路编码以进行传输。

After block coding is done, it is line coded for transmission.

Analog-to-Digital Conversion

麦克风会产生模拟语音,摄像机会产生模拟视频,它们被视为模拟数据。为了通过数字信号传输这种模拟数据,我们需要进行模数转换。

Microphones create analog voice and camera creates analog videos, which are treated is analog data. To transmit this analog data over digital signals, we need analog to digital conversion.

模拟数据是波形中的连续数据流,而数字数据是离散的。为了将模拟波转换为数字数据,我们使用脉冲编码调制 (PCM)。

Analog data is a continuous stream of data in the wave form whereas digital data is discrete. To convert analog wave into digital data, we use Pulse Code Modulation (PCM).

PCM 是将模拟数据转换为数字形式最常用的方法之一。它涉及三个步骤:

PCM is one of the most commonly used method to convert analog data into digital form. It involves three steps:

  1. Sampling

  2. Quantization

  3. Encoding.

Sampling

sampling

模拟信号在每个 T 间隔取样。取样的最重要的因素是模拟信号取样的速率。根据奈奎斯特定理,取样速率必须至少为信号最高频率的两倍。

The analog signal is sampled every T interval. Most important factor in sampling is the rate at which analog signal is sampled. According to Nyquist Theorem, the sampling rate must be at least two times of the highest frequency of the signal.

Quantization

quantization

取样产生连续模拟信号的离散形式。每个离散模式显示该时刻模拟信号的幅度。量化是在最大幅度值和最小幅度值之间进行的。量化是对瞬时模拟值的近似。

Sampling yields discrete form of continuous analog signal. Every discrete pattern shows the amplitude of the analog signal at that instance. The quantization is done between the maximum amplitude value and the minimum amplitude value. Quantization is approximation of the instantaneous analog value.

Encoding

encoding

在编码中,每个近似值然后被转换成二进制格式。

In encoding, each approximated value is then converted into binary format.

Transmission Modes

传输模式决定了数据如何在两台计算机之间传输。1 和 0 形式的二进制数据可以通过两种不同的模式发送:并行和串行。

The transmission mode decides how data is transmitted between two computers.The binary data in the form of 1s and 0s can be sent in two different modes: Parallel and Serial.

Parallel Transmission

parallel

二进制位被组织成定长的组。发送器和接收器都通过等量的数据线并行连接。这两台计算机都区分高位和低位数据线。发送器一次在所有线上发送所有位。由于数据线等于一组或数据帧中的位数,因此一组完整的位(数据帧)一次发送。并行传输的优点是速度快,缺点是导线成本,因为它等于并行发送的比特数。

The binary bits are organized in-to groups of fixed length. Both sender and receiver are connected in parallel with the equal number of data lines. Both computers distinguish between high order and low order data lines. The sender sends all the bits at once on all lines.Because the data lines are equal to the number of bits in a group or data frame, a complete group of bits (data frame) is sent in one go. Advantage of Parallel transmission is high speed and disadvantage is the cost of wires, as it is equal to the number of bits sent in parallel.

Serial Transmission

在串行传输中,位在队列方式下逐个发送。串行传输只需要一个通信通道。

In serial transmission, bits are sent one after another in a queue manner. Serial transmission requires only one communication channel.

serial

串行传输可以是异步或同步的。

Serial transmission can be either asynchronous or synchronous.

Asynchronous Serial Transmission

之所以这么命名,是因为没有时间的重要性。数据位有特定的模式,它们帮助接收器识别开始和结束数据位。例如,每个数据字节前缀一个 0,并在末尾添加一个或多个 1。

It is named so because there’is no importance of timing. Data-bits have specific pattern and they help receiver recognize the start and end data bits.For example, a 0 is prefixed on every data byte and one or more 1s are added at the end.

两个连续的数据帧(字节)之间可能存在间隙。

Two continuous data-frames (bytes) may have a gap between them.

Synchronous Serial Transmission

同步传输中的时序很重要,因为没有机制遵循来识别开始和结束数据位。没有模式或前缀/后缀方法。数据位以突发模式发送,在字节(8 位)之间不保持间隙。单个数据位突发可能包含多个字节。因此,时序变得非常重要。

Timing in synchronous transmission has importance as there is no mechanism followed to recognize start and end data bits.There is no pattern or prefix/suffix method. Data bits are sent in burst mode without maintaining gap between bytes (8-bits). Single burst of data bits may contain a number of bytes. Therefore, timing becomes very important.

由接收器识别和将位分隔为字节。同步传输的优点是速度快,而且没有异步传输中额外的报头和报尾位的开销。

It is up to the receiver to recognize and separate bits into bytes.The advantage of synchronous transmission is high speed, and it has no overhead of extra header and footer bits as in asynchronous transmission.