basic components of a computer
Article directory
Features of a von Neumann computer
- Composition of five major components
- calculator
- memory
- controller
- input device
- output device
- Instructions and addresses are stored in the memory on the same level, and are accessed by address
- Instructions and data are represented in binary
- Instructions consist of opcodes (indicating what to do) and address codes
- stored program, instructions are stored sequentially in the memory
- Calculator-centric
hardware block diagram
A computer with an arithmetic unit as its core
The above is a computer hardware block diagram with the arithmetic unit as the core
- The arithmetic unit completes arithmetic operations and logical operations, and temporarily stores the intermediate results of the operation in the arithmetic unit
- Memory stores data and programs
- The controller controls, directs the input, operation, and processing of calculation results of programs and data
- Input devices convert information familiar to humans into information recognized by machines
- Output devices convert the results of machine operations into a form familiar to humans
modern computer
- the host
- I/O device (external device)
- input device
- output device
Approaches to System Complexity Management
- Hierarchy Divide
the system being designed into modules or sub-modules - Modular
with well-defined functions and interfaces - Regularized
modules are more likely to be reused (chong)
computer work steps
Solving an example problem with a computer involves two major steps:
- Preparation
- Build a mathematical model
- Determine the calculation method
- Compile the problem-solving program: program (all steps) + instruction (each step)
- Run on the machine
memory
The basic composition of memory:
- Storage body (building) -> storage unit (room, a string of binary, storage word) -> storage element (bed, a binary)
- The MAR
memory address register stores the address of the storage unit, and the number of digits corresponds to the number of storage units (for example, MAR is 10 bits, then there are 2^10=1024 units, which is recorded as 1K) - MDR
memory data register, storing the code taken out from a storage unit or ready to be stored, the number of digits is equal to the storage sub-length
calculator
The arithmetic unit includes at least 3 registers (accumulator + multiplier register + operand register) and 1 arithmetic logic unit
register | addition | subtraction | multiplication | division |
---|---|---|---|---|
ACC | summand and sum | minuend and difference | product high | dividend and remainder |
MQ | Multiplier and Product Low | business | ||
X | addend | subtrahend | Multiplicand | divisor |
controller
The controller is the center, directing the various components to coordinate their work:
- Fetch , command memory to read an instruction
- Analyze , point out the operation corresponding to the instruction, and specify the address of the operand according to the addressing characteristics
- Execution , completes the operation based on the operand address and the opcode of the instruction
The basic composition of the controller:
- The program counter (PC)
stores the address of the instruction to be executed, and has a direct path with MAR, which can automatically add 1 to form the next instruction address - The instruction register (IR)
stores the current instruction, from the MDR- IR sends the opcode to CU to analyze the instruction, denoted as OP(IR)->CU
- IR sends the address code to MAR, denoted as Ad(IR)->MAR
- Control Unit (CU)
CU analyzes the operation required by the current instruction, and issues various bit micro-operation commands to control all controlled objects
I/0
footnote
Arithmetic Logic Unit, referred to as logic unit, is used to complete arithmetic and logic operations↩︎
Control Unit, which interprets the instructions in the memory and issues operation commands to execute the instructions↩︎
Store programs and data, and exchange information directly with the CPU↩︎