# 编码

编码是一种约定系统，把一个字母表（例如书面语言的字母）的符号映射到信道能够承载的信号或位模式，使消息得以传输、存储或保密，然后被重建。这个词涵盖几种不同的实践：把字母变成电脉冲的电报编码、把字母变成定长二进制数的字符编码，以及添加冗余数字以便克服噪声信道的纠错编码。

| 关键事实 | 详情 |
|---|---|
| 第一封公开电报 | 塞缪尔·莫尔斯（Samuel Morse）于1844年5月24日从华盛顿向巴尔的摩发送了“上帝创造了何等奇迹？”，使用的是以他名字命名的点划编码<sup>[1](https://www.loc.gov/collections/samuel-morse-papers/articles-and-essays/invention-of-the-telegraph/)</sup> |
| 第一种定长二进制字符编码 | 埃米尔·博多（Émile Baudot）于1870年发明的五单位编码可表示32个码字，并使用FIGS（数字移位）和LTRS（字母移位）两种移位字符来覆盖字母、数字和标点<sup>[2](https://www.ece.unb.ca/tervo/ee4253/baudot.shtml)</sup> |
| 国际标准化 | 1865年5月17日，二十个欧洲国家在巴黎签署第一部《国际电报公约》，国际电报联盟由此成立<sup>[3](https://www.itu.int/en/history/pages/ITUsHistory.aspx)</sup> |
| 用户电报标准 | 国际用户电报业务以50波特运行，使用5单位编码“国际电报字母表第2号”（ITA2）<sup>[4](https://www.itu.int/rec/dologin_pub.asp?id=T-REC-S.1-198811-S%21%21PDF-E&lang=e&type=items)</sup> |
| 理论基准 | 香农1948年的编码定理指出，存在这样的分组码：其码率可以任意接近信道容量，而错误概率可以任意接近零<sup>[5](https://ieeexplore.ieee.org/abstract/document/720549)</sup> |
| 早期速度记录 | 到1914年，带复用的自动读带机操作使电报传输速度达到每分钟400词<sup>[6](https://catalogimages.wiley.com/images/db/pdf/9781119274025.excerpt.pdf)</sup> |

## 电报编码：莫尔斯与变长思想

第一种广泛使用的字符编码源自塞缪尔·F. B. 莫尔斯（Samuel F. B. Morse）的电报。莫尔斯的系统为英文字母表的每个字母分配一组点和划，使复杂的消息能够以简单的电脉冲沿导线传输<sup>[7](https://www.history.com/articles/telegraph)</sup>。最初的设计远比后来全世界使用的编码笨拙：莫尔斯起初设想的是这样一种系统——在总词典中给每个英文单词分配一个特定编号，于是操作员在发送前实际上要逐位排印消息<sup>[8](https://www.electronics-notes.com/articles/history/morse-code-telegraph/morse-code-development-history.php)</sup>。一系列语言和技术上的改进把它变成了精简的国际莫尔斯电码，其中点的长度是基本时间单位<sup>[8](https://www.electronics-notes.com/articles/history/morse-code-telegraph/morse-code-development-history.php)</sup>。

莫尔斯的早期装置以机械方式记录传入的消息。电磁铁带动标记笔在移动的纸带上移动，勾画出短脉冲和长脉冲的序列，操作员再把由此形成的凸起点和划转译成字母<sup>[6](https://catalogimages.wiley.com/images/db/pdf/9781119274025.excerpt.pdf)</sup>。随着架空线沿大西洋海岸铺开，这种纸带方法让位于实时抄录：接收机装有两类发出不同声音的“止动”销，操作员学会凭听觉读码，并在听到的同时写下消息<sup>[1](https://www.loc.gov/collections/samuel-morse-papers/articles-and-essays/invention-of-the-telegraph/)</sup>。

莫尔斯电码是一种变长编码，后来理论所形式化的正是这一性质：常见符号得到短序列。互联网工程任务组（IETF）对编码的历史论述把莫尔斯电码的变长方案置于现代数据编码标准的直接谱系之中<sup>[9](https://technav.ieee.org/topic/telegraphy/)</sup>。

## 博多与定长二进制编码

**五单位编码。** 1870年，法国工程师让-莫里斯-埃米尔·博多（Jean-Maurice-Émile Baudot）发明了一种编码，标志着电信史上的一个里程碑：这是一种基于5位值、定义32个不同码字的二进制字符编码，早在无线电之前、也早在通常与数字通信联系在一起的电子技术之前就被设计出来<sup>[2](https://www.ece.unb.ca/tervo/ee4253/baudot.shtml)</sup>。博多设想操作员在五键键盘上按下五个键的组合来发送每个字符<sup>[2](https://www.ece.unb.ca/tervo/ee4253/baudot.shtml)</sup>。由于5位只能允许32个码字，足以容纳26个大写字母，博多把剩余值中的两个用作控制字符，即FIGS（数字移位）和LTRS（字母移位）：在FIGS字符之后，后续码字按数字和标点读取，直到LTRS字符切换回字母<sup>[2](https://www.ece.unb.ca/tervo/ee4253/baudot.shtml)</sup>。这种移位机制让相同的5位模式能够表示字母、数字和标点。

博多的系统还开创了时分复用，让若干操作员通过在定时时隙中交错插入各自的字符来共享一条电报线路；这一原理后来让许多电话通话共享一根电缆，也是数字蜂窝网络中时分多址（TDMA）的基础<sup>[10](https://www.geschichte-der-informatik.de/articles/data_communication_prehistory/)</sup>。威利出版社的一部字符编码史把1871年发明第一台时分复用装置归功于博多<sup>[6](https://catalogimages.wiley.com/images/db/pdf/9781119274025.excerpt.pdf)</sup>。

**从博多到ITA2。** 博多的系统被标准化为ITA1，即国际电报字母表第1号，其编码的分配方式使操作员容易学习；唐纳德·默里（Donald Murray）后来的重新排列被国际采纳为ITA2，即国际电报字母表第2号<sup>[11](https://rtty.internet-tty.net/history.html)</sup>。ITA2由国际电信联盟（ITU）在建议书S.1中定义，基于5单位结构，并规定了用于通信的图形字符和控制字符的字符集<sup>[4](https://www.itu.int/rec/dologin_pub.asp?id=T-REC-S.1-198811-S%21%21PDF-E&lang=e&type=items)</sup>。它成为国际用户电报业务的工作编码，在该业务中，用户通过起止式电报接口以50波特的调制速率直接通信<sup>[12](https://www.itu.int/dms_pubrec/itu-t/rec/f/T-REC-F.60-199208-I%21%21SUM-HTM-E.htm)</sup>。电传打字机完成了自动化，把键盘连接到打印机，并预示了计算机终端<sup>[10](https://www.geschichte-der-informatik.de/articles/data_communication_prehistory/)</sup>。

## 跨越国界的标准化

编码只有在双方对其达成一致时才起作用，而随着电报网络跨越国界，国际协议变得必要。在每一处国界，电报线路都迫使消息停下来，以便将其转换为邻国使用的编码；为便于做到这一点，各国开始缔结地区性协定，来自20个欧洲国家的代表在巴黎举行国际电报会议<sup>[3](https://www.itu.int/en/history/pages/ITUsHistory.aspx)</sup>。1865年5月17日，他们签署了第一部《国际电报公约》，成立国际电报联盟，以标准化电报设备、制定统一操作说明，并规定共同的国际资费和结算规则<sup>[3](https://www.itu.int/en/history/pages/ITUsHistory.aspx)</sup>。1865年公约还塑造了后来电话和无线电等技术的处理方式<sup>[13](https://www.itu.int/160/our-history/1865-1890s/)</sup>。

该联盟的标准化工作延续到无线电时代：1995年国际电信联盟关于海上莫尔斯电报的建议书规定，该业务中必须使用指定的莫尔斯电码信号<sup>[14](https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.1170-0-199510-S%21%21PDF-E.pdf)</sup>。1992年，该联盟将其工作重组为三个部门，并把国际电报电话咨询委员会（CCITT）更名为电信标准化部门（ITU-T）<sup>[15](https://www.itu.int/en/history/Pages/FocusOnStandardization.aspx)</sup>。

## 理论：编码能有多好？

两项由[贝尔系统](https://www.edgepedia.org/zh/bell-system)与麻省理工学院培养的研究者完成的分析为现代编码理论奠定了基础。1924年，[哈里·奈奎斯特](https://www.edgepedia.org/zh/harry-nyquist)（Harry Nyquist）发表了一项研究，考察支配电报传输最高速度的两个基本因素：信号成形和编码选择。他表明，涉及超过两个电流值的编码能够在给定信号单元数下提高所传输的信息量，但实际限制使大量电流值无法被使用<sup>[16](https://onlinelibrary.wiley.com/doi/abs/10.1002/j.1538-7305.1924.tb01361.x)</sup>。

1948年，[克劳德·香农](https://www.edgepedia.org/zh/claude-shannon)（Claude Shannon）提出了噪声信道通信效率的基本极限。根据他的编码定理，存在这样的分组码：其码率可以任意接近信道容量，同时其错误概率趋近于零。<sup>[5](https://ieeexplore.ieee.org/abstract/document/720549)</sup> 这一结果重新界定了编码的用途：编码不只是把字符分配给脉冲，还可以以受控方式向消息数据添加冗余数字，以便纠正信道错误，而最佳设计取决于信道的错误统计特性<sup>[17](https://kar.kent.ac.uk/id/document/3281438)</sup>。后来的工作追溯了从汉明码等最早的实际构造到接近香农极限的编码的演进<sup>[18](https://arxiv.org/abs/cs/0611112)</sup>。

## 早期编码留下了什么

电报时代的设计思想在现代系统中延续下来。给常见符号分配短编码——莫尔斯变长编码所体现的洞见——正是[霍夫曼编码](https://www.edgepedia.org/zh/huffman-coding)在一个世纪后从数学上形式化的同一种洞见<sup>[10](https://www.geschichte-der-informatik.de/articles/data_communication_prehistory/)</sup>。用于存储和重放消息的纸带实现了存储转发操作：消息被穿孔、自动传输并继续中继；这一逻辑后来用于报文交换网络和Usenet新闻组<sup>[10](https://www.geschichte-der-informatik.de/articles/data_communication_prehistory/)</sup>。而5位博多编码家族的移位字符技巧，在每一个通过转义码或移位码扩展固定字符集的字符集中都概念性地存留下来；例如，国际电信联盟建议书S.2定义了一种使用ITA2组合的编码方案，以便允许传输大写和小写字母<sup>[19](https://www.itu.int/rec/T-REC-S.2-198811-I/en)</sup>。

## References

1. [Invention of the Telegraph, Samuel F. B. Morse Papers, Library of Congress](https://www.loc.gov/collections/samuel-morse-papers/articles-and-essays/invention-of-the-telegraph/)
2. [History of Communications: The Baudot Code, University of New Brunswick EE4253](https://www.ece.unb.ca/tervo/ee4253/baudot.shtml)
3. [Overview of ITU's History, International Telecommunication Union](https://www.itu.int/en/history/pages/ITUsHistory.aspx)
4. [ITU-T Recommendation S.1: International Telegraph Alphabet No. 2](https://www.itu.int/rec/dologin_pub.asp?id=T-REC-S.1-198811-S%21%21PDF-E&lang=e&type=items)
5. [The art of signaling: fifty years of coding theory, IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/720549)
6. [Developments in Character Codes, Wiley excerpt](https://catalogimages.wiley.com/images/db/pdf/9781119274025.excerpt.pdf)
7. [Morse Code & Telegraph: Invention & Samuel Morse, HISTORY.com](https://www.history.com/articles/telegraph)
8. [Evolution of Morse Code, Electronics Notes](https://www.electronics-notes.com/articles/history/morse-code-telegraph/morse-code-development-history.php)
9. [Telegraphy, IEEE Technology Navigator](https://technav.ieee.org/topic/telegraphy/)
10. [Data Communication Prehistory: Telegraph, Morse, and Teletype, Geschichte der Informatik](https://www.geschichte-der-informatik.de/articles/data_communication_prehistory/)
11. [History, RTTY.com](https://rtty.internet-tty.net/history.html)
12. [ITU-T Rec. F.60: Operational provisions for the international telex service](https://www.itu.int/dms_pubrec/itu-t/rec/f/T-REC-F.60-199208-I%21%21SUM-HTM-E.htm)
13. [ITU history: 1865–1890s, International Telecommunication Union](https://www.itu.int/160/our-history/1865-1890s/)
14. [ITU-R Recommendation M.1170: Morse telegraphy procedures in the maritime mobile service](https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.1170-0-199510-S%21%21PDF-E.pdf)
15. [Historical Highlights: ITU and Standardization, International Telecommunication Union](https://www.itu.int/en/history/Pages/FocusOnStandardization.aspx)
16. [H. Nyquist (1924). Certain Factors Affecting Telegraph Speed, Bell System Technical Journal](https://onlinelibrary.wiley.com/doi/abs/10.1002/j.1538-7305.1924.tb01361.x)
17. [Coding schemes and channel error statistics, Kent Academic Repository](https://kar.kent.ac.uk/id/document/3281438)
18. [Channel Coding: The Road to Channel Capacity, arXiv](https://arxiv.org/abs/cs/0611112)
19. [ITU-T Recommendation S.2: Coding scheme using ITA2 to allow the transmission of capital and small letters](https://www.itu.int/rec/T-REC-S.2-198811-I/en)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 通信与日常技术 › 电报技术与线路基础设施 › Telegraph codes and operating practice › Telegraph code systems › Telegraph code standardization and theory

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/code

English original: https://www.edgepedia.org/code
