没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Bit OperationsRay SeyfarthJuly 30, 201164 Bit Intel Assembly Language c:copyright:2011 Ray SeyfarthOutline1 Introduction to bits2 Not3 And4 Or5 Exclusive or6 Shift operations7 Rotate instructions8 Bit testing and setting64 Bit Intel Assembly Language c:copyright:2011 Ray SeyfarthBit usageA bit can mean one of a pair of characteristicsTrue or falseMale or femaleBit fields can represent larger classesThere are 64 squares on a chess board, 6 bits could specify a positionThe exponent field of a floa
资源推荐
资源详情
资源评论
Bit Operations
Ray Seyfarth
July 30, 2011
64 Bit Intel Assembly Language
c
2011 Ray Seyfarth
Bit usage
A bit can mean one of a pair of characteristics
True or false
Male or female
Bit fields can represent larger classes
There are 64 squares on a chess board, 6 bits could specify a position
The exponent field of a float is bits 30-24 of a double word
We could use a 4 bit field to store a color from black, red, green,
blue, yellow, cyan, purple and white
Should you store numbers from 0-15 in 4 bits or in a byte?
64 Bit Intel Assembly Language
c
2011 Ray Seyfarth
Bit operations
Individual bits have values 0 and 1
There are instructions to perform bit operations
Using 1 as true and 0 as false
I
1 and 1 = 1, or in C, 1 && 1 = 1
I
1 and 0 = 0, or in C, 1 && 0 = 0
I
1 or 0 = 1, or in C, 1 || 0 = 1
We are interested in operations on more bits
I
10101000b & 11110000b = 10100000b
I
10101000b | 00001010b = 10101010b
These are called “bit-wise” operations
We will not use bit operations on single bits, though we will test
individual bits
64 Bit Intel Assembly Language
c
2011 Ray Seyfarth
剩余20页未读,继续阅读
资源评论
weixin_38665046
- 粉丝: 3
- 资源: 931
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功