作者executor1107 (计概让人起笑...)
看板NSYSU-CSE97
标题[分享] [计概] [Chapter 4.3] 随手整理
时间Sat Dec 18 02:23:17 2004
4.3
Shift Operation.
"You must be careful about shift operations. If the pattern represents a
signed number,a shift operation may change the leftmost bits of the
operation, which is a sign umber."
Remark: Shift operations can only be used when a pattern represent an
unsigned number.
就是左移右移的动作,例题很有趣,Example 16要你把某数除2
结果发现Binary Operation里"A right shift operation divides the number by 2"
Example 17则要你"Use a combination of logical and shift operations
to find the value (0 or 1) of the forth bit (from the right) in a
bit pattern."
结果用AND operator保存第四个数字下来,再用right shift的方法把它移到
最右边就可以读了.
--
......ID......
......I am a learning Dancer......
Shake my body through the music...
Dance with the Feel...
This is my ID......
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.117.186.180
※ 编辑: executor1107 来自: 140.117.186.180 (12/18 02:24)