Soft Exam Intermediate Software Designer Notes Chapter 1 Computer Composition and Architecture

1. The knowledge point framework of this chapter is the score distribution

1. Knowledge point framework

insert image description here

2. Score distribution ( 上午题6分):

insert image description here

2. Representation of numbers

This part of the knowledge framework

insert image description here

1. Base conversion

insert image description here
Remark:

  • Octal is represented by three-digit binary, and hexadecimal is represented by four-digit binary
  • 10 and above numbers are represented by A, B, C, D, E, F (convenient to distinguish)

2. Coding issues

insert image description here
Remark:

  • Coding problems are often used in signed numbers, the highest bit is used for the sign bit, 1 for negative numbers, 0 for positive numbers
  • The original code, inverse code, and complement code of the positive number are the same (the original code is the machine number, binary number)
  • The original code of the negative number is to convert the corresponding hexadecimal number to binary, 反码除符号位外进行取反操作and the complement code is added 1 on the basis of the inverse code.
  • Code shift, invert the sign bit of positive and negative numbers
  • Complement code is used for addition and subtraction operations, and the sign bit can be treated the same as the number bit

3. Floating point operations

insert image description here
Example 1:

  • 3.14 X 103

Mantissa: 3.14
Base: 10
Index: 3

Example 2:
0.1x10 3 +1.19x10 2

  • Opposite order (decimals are aligned with large numbers, and low exponents are converted to high exponents)

1.19x10 2 becomes 0.119 X10 3

  • Mantissa calculation

0.1x103+0.119 X103 = 0.219 X103

  • Formatting (numbers to the left of the decimal point cannot be 0 and 1位above )

2.19X102

Example 3:
insert image description here

3. Numerical representation range

insert image description here

3. Computer structure

This part of the knowledge framework

insert image description here

1. CPU structure

insert image description here

2. Computer Architecture Classification - Flynn

insert image description here
Remark:

  • Single instruction single task, multiple instructions multiple tasks
  • Single data stream single processor, multi data stream multiple processors

3. Basic Concept of Instruction

insert image description here
Remark:

  • OP refers to operations, such as: addition, subtraction, fetching, storing, etc.
  • The address code field needs to contain the address of each operand and the storage address of the operation result, etc. A1, A2, and A3 in the above figure are the address codes (three are three-level address instructions)
  • +(OP) a(A1) b(A2) c(A3) ==> a+b=c
  • +(OP) a(A1) b(A2) ==> a+=b
  • ++(OP) a(A1) ==> a++

4. Addressing method

insert image description here
It can be understood as follows:
insert image description here
Remarks: Register addressing and register indirect addressing are equivalent to placing data in registers, and the operation is similar to the above example.

5.CISC and RISC

insert image description here
insert image description here

6. Pipeline

(1) Concept

insert image description here

(1) Calculation

insert image description here
example:
insert image description here

  • It takes 3t+2t+4t=9t to execute an instruction, a total of 10 instructions or a total of 90t
  • The pipeline cycle is the one with the longest execution time, that is, 4t
  • Theoretical formula: (3t+2t+4t)+(10-1)x4t=9t+36t=45t
  • Actual formula: 3x4t+(10-1)x4t=12t+36t=48tx`

The difference between the theoretical formula and the actual formula is as follows:
insert image description here

(3) Superscalar pipeline

insert image description here
Remarks: From the above figure, it can be seen that a total of two pipelines are used, that is, the degree is 2

(4) Throughput calculation of pipeline

insert image description here

7. Hierarchical storage structure

The reason why the hierarchical storage structure is adopted is determined by the needs of users. The needs of users are often fast, large storage capacity and low price.
insert image description here

8.Cache

(1) Concept

insert image description here

(1) Video

insert image description here
insert image description here
insert image description here
insert image description here

9. Main memory programming and calculation

insert image description here
example:
insert image description here

  • How many storage units are there in total, 43FFH-4000H+1=4400H-4000H=400H
  • 400H is expressed in binary (0100 0000 0000) 2 =2 10 D
  • Capacity=(2 10 x 16bit)/4=256x16bit

10. Bus

insert image description here

11. Series and parallel systems

(1) Tandem system ( 重点)

insert image description here
Series reliability:R=R1xR2XR3XR4X...XRn

(2) Parallel system ( 重点)

Parallel system reliability:1-(1-R1)X(1-R2)X...X(1-Rn)
insert image description here

(3) Touch the redundant system

R1, R2...Rn generate results respectively and put them into the voter, and the result is the one with the largest number.
insert image description here
insert image description here

(4) Hybrid system

The hybrid system as a whole is regarded as a series, and the single parallel is calculated in parallel:RX(1-(1-R)^3^)X(1-(1-R)^2^)
insert image description here

12. Validation code

(1) Basic knowledge

insert image description here
Remarks:
Code distance: 1 bit 0, 1; 0 only needs one bit to change to 1, that is, the code distance is 1, 2 bits 00, 11; Requires a three-digit yardage distance of 3

(2) Parity ( 可检错,不可纠错)

insert image description here

(3) Cyclic check code CRC ( 可检错,不可纠错)

insert image description here
insert image description here
insert image description here

(4) Hamming Code ( 重点:可检错,也可纠错)

insert image description here

insert image description here
Calculate check digit: 2 k -1>=k+m
data information=16=m
2 k -1>=k+16 ⇒ 2 k >=k+17 ⇒k=5
答案:C(5)

Guess you like

Origin blog.csdn.net/weixin_42753193/article/details/124101023