作者shin28 (康妮)
看板C_and_CPP
标题[问题] 几个很简单的问题(rotate shift)
时间Thu Aug 13 15:27:03 2009
题目是这样
使用者输入一串(如下)
所使用的是16进位
number range 是 0*00 到 0*ffffffff
1. type in an expression: 49 add 41 (相加)
the answer: 8a
2. type in an expression: 2a xor 7d
the answer is:57
3. type in an expression:49 ror 10 (rotate 数字49 10bits)
the answer is :490000 (为什麽不是49000000)
4. type in an expression:49 shiftleft 10 (移动数字49 往左10bits)
the answer is :??(不知道)
5. type in an expression:80000002 asr 1 (不太懂asr是甚麽意思,上面写是
arithmatic shift right)
the answer is :c0000001
有问题的是3.4.5题(跑出来答案都不对)
谢谢!!!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 202.74.208.168