惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
P
Proofpoint News Feed
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
The Last Watchdog
The Last Watchdog
F
Fortinet All Blogs
S
Schneier on Security
Help Net Security
Help Net Security
Security Archives - TechRepublic
Security Archives - TechRepublic
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
I
InfoQ
T
The Blog of Author Tim Ferriss
Cisco Talos Blog
Cisco Talos Blog
Stack Overflow Blog
Stack Overflow Blog
T
Troy Hunt's Blog
人人都是产品经理
人人都是产品经理
T
Threatpost
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cyber Attacks, Cyber Crime and Cyber Security
雷峰网
雷峰网
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
Forbes - Security
Forbes - Security
Vercel News
Vercel News
S
Security Affairs
美团技术团队
P
Privacy & Cybersecurity Law Blog
N
News and Events Feed by Topic
Cyberwarzone
Cyberwarzone
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Jina AI
Jina AI
Spread Privacy
Spread Privacy
Attack and Defense Labs
Attack and Defense Labs
IT之家
IT之家
U
Unit 42
Recorded Future
Recorded Future
W
WeLiveSecurity
PCI Perspectives
PCI Perspectives
P
Palo Alto Networks Blog
H
Hacker News: Front Page
S
Security @ Cisco Blogs
博客园 - 【当耐特】

博客园 - 杨连国

win10 IoT开发 Serial​Device 返回 null .NET Delegates: A C# Bedtime Story【转载】 C++ 和 C# 变量定义的一点区别 变量定义 接口(CLR via C# 读书笔记) 生成器模式(builder) 类型和成员基础(CLR via C#) 基本类型、引用类型、值类型——(CLR via C#) 抽象工厂模式(abstract factory) 李建忠C#面向对象设计模式纵横谈 —— 单件模式 李建忠C#面向对象设计模式纵横谈 —— 面向对象设计模式与原则 程序设计和重构的目标 OO设计原则——读《你必须知道的.NET》 输入法灰掉bug解决 半角全角Bug解决 由迭代模式想到得——用设计模式理解 .NET 调用VC封装的DLL时,两个类型匹配问题 调用非托管Dll Invoke 和 BeginInvoke 的区别
ASCII 表设计之妙
杨连国 · 2008-03-31 · via 博客园 - 杨连国

老是记不住数字、字母的ASCII表值,每次使用都要查一查,总觉得有点不爽。今天看过《Windows程序设计》的下边一段话后,才发现,哎呀,ASCII表是经过巧妙设计的,自己没发现罢了。

ASCII有许多优点。例如,26个字母代码是连续的;大写字母和小写字母可通过改变一位数据而相互转化;10个数字的代码可从数值本身方便地得到

先看字母: ——要用二进制码和16进制码才能看出妙来

       大写字母A 对应  0100 0001   41

       小写字母a对应   0110 0001   61

    看看后4位,26个字母的第一个就用1表示,无论大小写。再看前四位,大小写字母之间只需要改变第3位就OK了,那么为什么A对应的前4位是0100,而不是1000 0001呢,首先ASCII只对应到127,所以第一个Bit肯定是0;然后26个字母的表示需要5Bit,所以前4位的第4Bit就不能用了,那么只能在第23Bit下功夫了,00 011011 任选两对就可以了,至于为什么选择了 10 11,我就不清楚了。

再看看数字:

       数字0对应  0011 0000

       数字1对应  0011 0001

       4位,就是数字大小。前四位为什么用 0011,我就不清楚了。

再看看几个常用的按键:

       Backspace   0000  1000  08        8

      Enter           0000  1101  0D        13

      Esc              0001  1011  1B        27

      Space          0010  0000  20        32

      0                 0011  0000  30        48

      A                 0100  0001   41       65

      a                 0110  0001   61       95

      也许通过上边几个键值的前四位的变化比较看出点端倪,我没有充分的证据,就不乱说了。