← Back to Hub ← 返回主页

Week 7: Data Communications Fundamentals (Part 1) 第 7 周:数据通信基础(第一部分)

Core Concepts 核心概念

1. Analog vs. Digital Signals (5.1)

  • Analog Signals: Continuous waves that vary smoothly and constantly over time (e.g. human voice traveling through air or telephone copper wire).
  • Digital Signals: Discrete voltage pulses that represent binary 0s and 1s as sudden changes in level (e.g. square waves representing computer data stored on disk).

2. Serial vs. Parallel Transmission (5.1b)

  • Serial Transmission: Bits are sent sequentially, one after another, over a single transmission channel. Slower but cheaper and highly reliable over long distances (e.g., WAN cables, USB).
  • Parallel Transmission: Multiple bits are sent simultaneously over separate physical channels. Fast but expensive and susceptible to clock skew over long distances (restricted to short internal bus interfaces).

3. Data Encoding Techniques (5.2)

  • NRZ-L (Non-Return-to-Zero Level): Low voltage for 1 and high voltage for 0. Simple but has synchronization issues during long strings of identical bits.
  • Manchester Encoding: A transition occurs in the middle of each bit period (low-to-high is 1, high-to-low is 0). Mid-bit transition provides clock synchronization.
  • Differential Manchester: Transition in the middle of the bit interval serves as a clock. Transition at the start of the bit interval represents 0, no transition represents 1.

1. 模拟信号与数字信号 (5.1)

  • 模拟信号 (Analog):随时间连续、平滑变化的电磁波(例如人说话的声音在空气或电话铜线中传播的波形)。
  • 数字信号 (Digital):代表二进制 0 和 1 的离散电压脉冲,表现为突变的电平(例如计算机存储在磁盘上的数据在芯片中的脉冲表示)。

2. 串行传输与并行传输 (5.1b)

  • 串行传输 (Serial):比特沿着单条物理传输信道依次排队发送。虽然速度慢但成本低,且在远距离传输中极高可靠(例如广域网电缆、USB)。
  • 并行传输 (Parallel):多位比特通过多条物理信道同时发送。虽然速度快但成本昂贵,且由于比特同步偏斜问题,仅限短距离内部总线使用。

3. 数据编码技术 (5.2)

  • NRZ-L(不归零电平):高电压表示 0,低电压表示 1。编码简单,但在长串相同比特流下极易丢失时钟同步。
  • 曼彻斯特编码 (Manchester):每个比特周期中间强制产生一次电平跳变(从低到高跳变代表 1,从高到低跳变代表 0)。此中间跳变既提供时钟同步,又表示数据。
  • 差分曼彻斯特编码 (Differential Manchester):周期中间的跳变仅作时钟。周期起始处有电平跳变表示 0,无跳变表示 1。

Concept Visualization: Manchester Encoding Waveform 概念可视化:曼彻斯特编码波形

This diagram represents the binary sequence 1, 0, 1, 1 encoded into a Manchester waveform. A mid-bit low-to-high transition is 1; high-to-low is 0.

此图表示二进制序列 1, 0, 1, 1 被编码为曼彻斯特波形。比特中间从低到高的电平跳变代表 1,从高到低代表 0。

Bit '1' Bit '0' Bit '1' Bit '1'

Tips 提示

  • Self-Clocking Capability: Manchester encoding is "self-clocking" because the mandatory transition in the middle of each bit interval allows the receiver to continuously sync its clock with the transmitter.
  • Speed/Duplex Mismatch: In Packet Tracer, if you configure one switch port to speed 100 and the opposite port to speed 10, the link will go down. Ensure both sides match!
  • 自时钟能力:曼彻斯特编码具有“自时钟”功能,因为每个比特周期中间强制性的跳变使接收端能够连续地将时钟与发送端同步。
  • 速度/双工不匹配:在 Packet Tracer 中,如果将一个交换机端口配置为 speed 100 且对端配置为 speed 10,链路将断开。确保两端配置一致!

Practical Exercises & Step-by-Step Guide 实践练习与分步指南

Exercise 1: Digital Signal Waveform Drawing Practice 练习 1:数字信号波形绘制练习

Steps to complete:

  1. Get a piece of grid paper or use an online drawing pad.
  2. NRZ-L (01101): Draw a high level for 0, drop to low level for 1, keep low level for 1, rise to high level for 0, and drop to low level for 1.
  3. Manchester (01101): For the first bit (0), draw a high-to-low transition. For the second bit (1), draw a low-to-high transition. For the third bit (1), draw low-to-high. For the fourth bit (0), draw high-to-low. For the fifth bit (1), draw low-to-high. Make sure transitions occur exactly at the midpoints of the bit periods.

完成步骤:

  1. 准备一张网格纸或使用在线画板。
  2. NRZ-L (01101):对于0画高电平,对于1下降到低电平,保持低电平,对于0上升到高电平,对于1下降到低电平。
  3. 曼彻斯特 (01101):第1个比特(0)画一个从高到低的跳变。第2个比特(1)画低到高的跳变。第3个比特(1)画低到高的跳变。第4个比特(0)画高到低的跳变。第5个比特(1)画低到高的跳变。确保跳变发生在比特周期正中间。

Exercise 2: Speed and Duplex Configuration in Cisco IOS 练习 2:Cisco IOS 中的速度和双工配置

Steps to complete:

  1. In Cisco Packet Tracer, connect PC0 to Switch0's FastEthernet 0/1 port using a Copper Straight-Through cable.
  2. Click Switch0 -> go to the CLI tab. Press Enter to activate the prompt.
  3. Enter Global Configuration mode: enable then configure terminal.
  4. Enter interface config mode: interface fastEthernet 0/1.
  5. Force the speed and duplex manually using commands: speed 100 and duplex full. Verify port status using show interface fastEthernet 0/1.

完成步骤:

  1. 在 Cisco Packet Tracer 中,使用铜直通线将 PC0 连接到 Switch0 的 FastEthernet 0/1 接口。
  2. 点击 Switch0 -> 进入 CLI(命令行)选项卡。按回车激活提示符。
  3. 进入全局配置模式:输入 enable 然后输入 configure terminal。
  4. 进入接口配置模式:输入 interface fastEthernet 0/1。
  5. 手动强制设置速度与双工模式:输入 speed 100 和 duplex full。通过命令 show interface fastEthernet 0/1 验证状态。

Self-Check Practice Questions 自测练习题

1. Which encoding scheme uses mid-bit transition for both clock synchronization and data? 哪种编码方案使用比特周期中间的电平跳变来同时进行时钟同步和数据传输?

2. Describe a key difference between digital and analog signals. 描述数字信号与模拟信号之间的一个关键区别。

3. Which transmission mode sends multiple bits simultaneously over separate physical channels? 哪种传输模式通过多条独立的物理信道同时发送多位比特?

4. Explain the benefit of self-clocking digital encoding schemes. 解释自时钟数字编码方案的益处。

5. Describe the main characteristic of serial transmission. 描述串行传输的主要特征。

6. In Manchester encoding, a high-to-low transition represents which binary value? 在曼彻斯特编码中,从高至低的跳变代表哪种二进制值?

Vocabulary Matching Game 词汇配对游戏

Match the encoding term on the left with its definition on the right. (Click a term, then click its matching definition). 将左侧的编码术语与右侧的定义进行配对。(点击术语,然后点击匹配的定义)。

NRZ-L
Manchester
Differential Manchester
Serial Transmission
Parallel Transmission
Mid-bit transition for clock; transition at start for binary 0 比特周期中间跳变同步时钟;开始有跳变代表二进制 0
Sending bits sequentially one after another over a single link 比特沿着单条物理链路依次排队顺序发送
Static level encoding without mandatory mid-bit transitions 静态电平编码,中间无强制电平跳变
Sending multiple bits simultaneously over separate channels 多位比特通过多条物理信道同时进行发送
Mandatory mid-bit transition matches data value (low-to-high is 1) 比特周期中间强制跳变且对应数据值(低到高跳变代表 1)