Principles of Computer Organization (2nd Edition) Tang Shuofei

Machine language

Assembly language

High-level languages: fortran, basic, pascal, c

Translation: The process of translating high-level language into machine language

Compile program

Interpreter

Computer architecture

  1. Computer system organization: the attributes of the computer system seen by programmers
    Refers to the attributes of traditional machines seen by programmers who use the machine, assembly language programming: instruction set, data type, memory addressing technology, I/O mechanism

  2. Computer composition: Refers to how to realize the computer architecture. How to fetch instructions, analyze instructions, fetch operands, and perform operations. The instructions are the same, it can only be considered that they have the same structure, and how to start the line instruction may be completely different (multiplication circuit may be used to realize multiplication instructions, or continuous addition circuit may be used)

The hardware structure of the computer system

Composition: CPU (computing unit, controller), I/O device, main memory, system bus.

Controller (Control Unit, CU): Interpret the instructions in the memory and issue various operating commands to execute the instructions.

Arithmetic logic unit (ALU): complete arithmetic logic operations.

System bus

  1. Data Bus
  2. Address bus
  3. Control bus

Bus performance index

  1. Bus width: number of buses

CPU

Computer method

The information is all codes composed of 0 and 1 internally.

Unsigned and signed

Unsigned number

Each bit in the register can store a value,

When storing the number of symbols, leave a place to store the symbols.

When the machine word length is the same, the value range is different.

Signed number

Machine number truth value

0 positive

1 negative

Put in front of significant numbers

Source code notation

The value bit is the absolute value of the true value

Two's complement notation

Find a positive number equivalent to a negative number to replace the negative number

Mod

Complement

-3 +9 mod 12 +9 is the complement of -3 modulo 12

  1. The positive complement of a negative number is: modulus + negative number itself
  2. The sum of absolute values ​​is modulo
  3. The complement of a positive number is itself

+1010 complement 0,1010

-1101 complement 1,0011

In addition to the sign bit of the source code, each bit is negated, and the last bit is increased by 1

One's complement

Features

  1. The highest bit of the three machine numbers is the sign number. Use "." (decimal number)"," (positive number) between sign and value
  2. When the true value is +, the original code, complement code, and inverse code have the same form
  3. When it is -, the inverse code is the original code "negation of each bit", and the complement code is the original code "negation +1"

Fixed-point and floating-point representations of numbers

Fixed-point representation

A number with the decimal point fixed at a certain position

Pure decimal

Pure integer

Floating point representation

mantissa

Order code

Base: 2, 4, 6

Specifies that the mantissa of a floating-point number is in pure decimal form, and the floating-point number with the highest digit of the mantissa is 1 becomes a normalized number

0.000011

0.11

Insert picture description here

Guess you like

Origin blog.csdn.net/cs18335818140/article/details/108720604