Principles of Computer Composition - Experiments on Arithmetic Units

calculator experiment

1. Experimental results (12 points)

1. Record of experimental results (8 points)

operation type

A

B

S3 S2 S1 S0  

CN

result

logic operation

65

A7

0  0  0  0

X

F=( 65 )  FC=( 0)   FZ=(0 )

65

A7

0  0  0  1

X

F=( A7 )  FC=( 0)   FZ=(0 )

65

A7

0  0  1  0

X

F=( 25 )  FC=( 0)   FZ=( 0)

65

A7

0  0  1  1

X

F=( E7)   FC=( 0)   FZ=( 0)

65

A7

0  1  0  0

X

F=( 9A)   FC=( 0)   FZ=(0 )

shift operation

65

A7

0  1  0  1

X

F=( CA)   FC=(0 )  FZ=(0 )

65

A7

0  1  1  0

0

F=( 32 )  FC=( 0)  FZ=(0  )

1

F=(B2 )   FC=( 1)  FZ=(0 )

65

A7

0  1  1  1

0

F=( CA )  FC=( 0)  FZ=( 0 )

1

F=( CA )  FC=( 0 )  FZ=( 0)

arithmetic operation

65

A7

1  0  0  0

X

F=( 65 )  FC=( 0 )  FZ=( 0 )

65

A7

1  0  0  1

X

F=( 0C)   FC=( 1 )  FZ=( 0 )

65

A7

1  0  1  0(FC=0)

X

F=( 0D)   FC=( 1 )  FZ=( 0 )

1  0  1  0(FC=1)

X

F=( 0D )  FC=( 1 )  FZ=( 0 )

65

A7

1  0  1  1

X

F=( BE )  FC=( 1 )  FZ=( 0 )

65

A7

1  1  0  0

X

F=( 64 )  FC=( 0 )  FZ=( 0 )

65

A7

1  1  0  1

X

F=( 66 )  FC=( 0 )  FZ=( 0 )

2. Record the experimental results (set the values ​​of A and B by yourself , 4 points)

operation type

A

B

S3 S2 S1 S0  

CN

result

logic operation

35

48

0  0  0  0

X

F=(35)   FC=( 0 )  FZ=( 0 )

35

48

0  0  0  1

X

F=( 48 ) FC=( 0)    FZ=( 0 )

35

48

0  0  1  0

X

F=( B7 ) FC=( 0 )  FZ=( 0 )

35

48

0  0  1  1

X

F=( FF ) FC=( 0 )  FZ=( 0 )

35

48

0  1  0  0

X

F=( 6A ) FC=( 0 )  FZ=( 0 )

shift operation

35

48

0  1  0  1

X

F=( B2 ) FC=( 0 )  FZ=( 0 )

35

48

0  1  1  0

0

F=( 1A ) FC=( 0 )  FZ=(0)

1

F=( 9A )  FC=( 1  )  FZ=(0 )

35

48

0  1  1  1

0

F=( 6A )  FC=( 0 )  FZ=( 0 )

1

F=( 6A )  FC=( 0 )  FZ=( 0)

arithmetic operation

35

48

1  0  0  0

X

F=( 35 )  FC=( 0 )  FZ=(0 )

35

48

1  0  0  1

X

F=( 7D )  FC=( 0 )  FZ=(0)

35

48

1  0  1  0(FC=0)

X

F=( 7D)   FC=( 0 )  FZ=(0)

1  0  1  0(FC=1)

X

F=( 7E )   FC=( 1 )  FZ=( 0)

35

48

1  0  1  1

X

F=( ED)   FC=( 1 )  FZ=( 0)

35

48

1  1  0  0

X

F=( 34 )  FC=(0 )   FZ=( 0 )

35

48

1  1  0  1

X

F=( 36 )  FC=( 0 )  FZ=(0 )

2. Experimental questions and thinking (3 points, 0.5 points for each of the first six)

  1. If there is an experiment result that cannot be displayed correctly, what might be the reasons?

1. Connection error.

2. The CLE key was not pressed before the start of each test.

3. Timing and console unit switch setting error

4. The input is wrong.

5. The internal circuit of the experiment box is faulty

  1. What is the role of CN? What do the FC and FZ indications mean?

(1) CN is the control signal, indicating whether it is circular movement or arithmetic movement.

(2) FC is the carry flag, and FZ is the zero flag of the arithmetic unit. FC and FZ in the function column in the table indicate that the current operation will affect the flag.

  1. If the value of the switch input position is the same, will the value of FC affect the result of the next calculation?

Will do.

For example, in this experiment, the value of FC affects the next calculation result.

 

  1. 逻辑移位和循环移位的区别是什么?

逻辑移位:

逻辑左移时,低位补0;

逻辑右移时,高位补0;

只影响FZ标志,不影响FC标志

循环移位:

不带进位的循环右移:操作数循环右移位,高位补移掉的那位。

不带进位的循环左移:操作数循环左移位,低位补移掉的那位。

带进位的循环右移:操作数连同CF位循环右移,高位补移掉的那位

带进位的循环左移:操作数连同CF位循环左移,低位补移掉的那位。

影响FZ,和FC

  1. LDA和LDB的作用是什么?是相容的微命令还是互斥的微命令?

(1)LDA往A里送数据,LDB往B里送数据

(2)相斥命令

  1. ALU_B的作用是什么?

ALU_B为低电平时,三态控制门有效

Guess you like

Origin blog.csdn.net/cangzhexingxing/article/details/124046680