最新新闻 NEW6
1  Linux基础知识
2  数据库设计范式
3  六种设置方法彻底优化
4  黑客Web欺骗的工作
5  dfm格式转换: 将
6  五种提高 SQL 性

热门新闻 HOT6

 qq声音下载 qq声 112463
  windows中英 19598
 目录册,报价单制作, 18014
 windows中英文 16967
 批量在图片上添加文字 15837
 二进制与十六进制对照 15662

 
     新 闻 中 心 - 详 细 内 容
 
二进制与十六进制对照表
双击自动滚屏 免费大作,古代风格的武侠游戏背单词 发布者:ufo2003 发布时间:2007-12-29 阅读:15662

Binary Hexadecimal
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F
Examples:
• FACE = 1111 1010 1100 1110
• 1A2B = 0001 1010 0010 1011
• 4821 = 0100 1000 0010 0001
Converting binary to hexadecimal is almost as easy. First, you separate the binary number
into groups of four bits starting with the L.O. bit and working your way to the left (adding zeros
at the left end of the number if necessary):
• 11011010 = 1101 1010
• 110 = 0110
• 11001010010 = 0110 0101 0010
• 1111100000101= 0001 1111 0000 0101
The next step is to substitute the corresponding hexadecimal digit for each group of four
bits in the binary number:
• 1101 1010 = DA
• 0110 = 6
• 0110 0101 0010 = 652
• 0001 1111 0000 0101 = 1F05
There are four major logical operation on bits11: AND, OR, XOR, and NOT. The following
tables provide the “truth tables” for these operations:
AND 0 1
0       0 0
1       0 1
Table 3: OR Truth Table
OR 0 1
0     0 1
1     1 1
Table 4: XOR Truth Table
XOR 0 1
0       0 1
1       1 0
Table 5: NOT Truth Table
NOT 0 1
         1 0
AND, OR, and XOR are dyadic (双目)functions, meaning(意味着) they operate on two operands(操作数) to produce a single result. NOT is
a monadic(单目) function which means it takes a single operand to produce a single result. For example:
• 1 AND 1 = 1
• 0 OR 0 = 0
• 1 XOR 0 = 1
• NOT 1 = 0
According to the truth tables above, these four operations operate on single bit operands.(根据上边的单比特对照操作表得知1个比特可以有4个操作符号) However, in assemblylanguage you’ll often work with strings of bits (i.e., bytes, words, double words, etc.)(然而在汇编语言中通常都是多个比特同时操作的), therefore, a extension of these functions to bit strings would be appropriate(因此就必须用合适的表达式对比特串进行操作). When performing a logical operation on two bit strings, you must adjust them so that they contain the same number of bits (by adding zero bits to the shorter of the two values)(当对2个比特数操作前你必须调整它们的长度给比较短的比特数补0). Then you perform the logical operation on both sets of values between corresponding bits:
• 100010 AND 1110001= 010 0010 AND 111 0001 = 010 0000
• 11110000 OR 0101010 = 1111 0000 OR 0010 1010 = 1111 1010
• 10100101 XOR 11110000 = 1010 0101 XOR 1111 0000 = 0101 0101
• NOT F4h = NOT 1111 0100 = 0000 1011 = 0Bh
 
 
打印本页 | 关闭窗口

| 企业邮局 | 企业荣誉 | 营销网络  | 产品分类  | 信息反馈联系我们 | 留言评论 | 网络游戏 | | |

版权所有 Finer Tech  浙ICP备11014575号-1