suxxsfe

一言(ヒトコト)

ics1

20240 09 14
hw1

1

2

2.1

  1. 73 01001001
  2. 46 00101110
  3. -115 10001101

2.24

  1. 01011010 90
  2. 11110110 -10
  3. 10000110 -122

3

  1. \((11)_B+(01010101)_B = 1+85=86\)
  2. \((01001)_B-(111010)_B = 9-6=3\)
  3. \((1010)_B-(01011)_B = 6-11 = -5\)

4

  1. \((1111111)_B=(127)_D\)
  2. \((-10000000)_B=(-128)_D\)
  3. \((111\dots 111)_B(n-1 \texttt{位})=(2^{n-1}-1)_D\)
  4. \((-100\dots 000)_B(n \texttt{位})=(-2^{n-1})_D\)

5

  1. 两个正数相加得到结果为负数,或两个负数相加得到结果为正数。
  2. 得到的结果小于两个加数。

6

  1. 符号为正,指数 \(2^{10010010_B-127}=2^19\),底数 \(1.0111_B=1.4375\)。结果为 \(753664\)
  2. 符合为负,指数 \(2^{1110_B-127}=2^{-113}\),底数 \(1.10011_B=1.59375\)。结果为 \(-1.5347\times 10^{-34}\)
  3. \(5.375=101.011_B=1.01011\times 2^2\),表示为 0 10000001 01011000000000000000000
  4. \(-10\frac{9}{32}=1010.01001_B=1.01001001\times 2^3\),表示为 1 10000010 01001001000000000000000

7

  1. 最大指数:\(255-127=128\)。最小指数:\(0-127=-127\)
  2. 最小:\(-1.11111111111111111111111_B\times 2^{128}\)。最小正数:\(1.0_B\times 2^{-127}\)

8

  1. \((0011 \texttt{ AND } 0110) \texttt{ AND } 1101=0000=0_H\)
  2. \(0101 0111 \texttt{ OR } \texttt{NOT }(1101 0111)=0111 1111=7f_H\)
  3. \((1101 0010 \texttt{ OR } 0001 1001) \texttt{ OR } \texttt{NOT }(0110 1101 \texttt{ AND } 1010 1110)=1101 1011=db_H\)

strategy:分别将两个二进制数为 0 的位置置为 0。

9

  1. mask: \(11111011\), op: and
  2. mask: \(01000100\), op: or
  3. mask: \(00000000\), op: and
  4. mask: \(11111111\), op: or
  5. \(a \leftarrow \texttt{ BUSYNESS} \texttt{ AND } 00100000\),则答案为 \(a \texttt{ ADD } a \texttt{ ADD } a \texttt{ ADD } a\)

10

x y z Q1 Q2
0 0 0 0 1
0 0 1 1 0
0 1 0 0 0
0 1 1 1 0
1 0 0 0 1
1 0 1 0 0
1 1 0 1 0
1 1 1 0 0
posted @ 2024-09-14 20:28  suxxsfe  阅读(5)  评论(0编辑  收藏  举报