ぱたへね

はてなダイアリーはrustの色分けができないのでこっちに来た

Exercise 2.2-2.4

Exercise 2.2

What binary number does this hexadecimal number represent:0x7FFF_FFFA? What decimal number does it represent?

0x7FFF_FFFAは2進で表すと、0111_1111 1111_1111 1111_1111 1111_1100。十進で表すと、2147483642。

Exercise 2.3

What hexadecimal number does this binary number represent:1100 1010 1111 1110 1111 1010 1100 1110

0xCAFEFACE

Exercise 2.4

Why doesn't MIPS have a subtract immediate instruction.

負の即値が無い理由で良いのかな。最上位bitが立っていれば、負の値が必要なときは、負の値として計算に使えるから。