Principles of Computer Composition
computer unit of calculation
- capacity unit
- speed unit
I/O system
Communication between CPU and IO device
CPU speed is inconsistent with IO device speed
-
Disadvantages of program interruption
: reduce the execution efficiency of the CPU -
DMA (Direct Memory Access)
Classification of memory
-
Classification by storage medium:
- Semiconductor memory: memory, U disk, solid state drive
- Magnetic Storage: Tape, Disk
-
By access method:
- Random Access Memory (RAM): Random reads, independent of position
- Serial memory: location dependent, lookup in order
- Read Only Memory (ROM): Read only, not write
memory hierarchy
cache, main memory, auxiliary memory
- Principle: Locality principle
Replace the memory frequently accessed by the program to the cache to improve the speed of the computer - Implementation: Add a layer of fast (small capacity) Cache between CPU and main memory
- Purpose: To solve the problem of insufficient main memory speed
computer cache
- example
computer command system
- form of machine instructions
- The type of operation of the machine instruction
- Control instructions, shift operations, data transfers, arithmetic and logic operations
- Addressing of machine instructions
- Instruction addressing: sequential addressing, jump addressing
- Data addressing: immediate addressing, indirect addressing, direct addressing
- Advantages and disadvantages of various addressing modes
computer controller
The controller coordinates and controls the operation of the computer
-
program counter
-
Timing generator (the CPU's metronome)
-
instruction decoder
-
various registers
-
instruction register
-
main memory address register
-
Main memory data register
-
general purpose register
-
-
bus
computer calculator
The calculator is used to perform data operation and processing
-
data buffer
-
ALU
-
general purpose register
-
Status word register
-
bus
Execution of computer instructions
-
instruction execution process
-
CPU pipeline design
Ideally, pipeline efficiency is three times that of serial
Basics of base arithmetic
- Signed and unsigned numbers
- original code notation
- two's complement notation
- one's complement notation
- Original code, complement code, inverse code conversion
IEEE754 standard
Fixed and floating point numbers
-
How to represent fixed point numbers
-
Representation of floating point numbers
-
Fixed point vs floating point
Addition and Subtraction of Fixed Point Numbers
Addition and subtraction of floating point numbers
Multiplication and division of floating point numbers
- Multiplication : addition of exponents, product of mantissas
- Division : Subtract the exponents, and obtain the quotient of the mantissas
practice
-
Implement doubly linked list
-
Implement the permutation algorithm