[問題] 幾個很簡單的問題(rotate shift)
題目是這樣
使用者輸入一串(如下)
所使用的是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
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章