<Principles of Computer Organization> Notes One: Introduction to Computer Systems

Introduction Chapter1 computer system

Outline:

  • Introduction to Computer Systems
  • Basic components of a computer system
  • Computer hardware Main Specifications

1.1 Introduction to Computer Systems

Q1: Which by the modern computer parts? (Top layer of abstraction)

A: software + hardware. This course stresses the design of hardware logic.

== == management system complexity:

  • 1, abstract: Hide unimportant details of the system
  • 2. Hierarchical: divided into a plurality of modules, each module design
  • 3, modular: a functional and well-defined interfaces
  • 4, regularity (regularity): it is easier to reuse the module

From the programmer perspective stratified: high-level language -> Assembly Language -> operating system -> machine language -> System microinstruction

Computer basic composition 1.2

First, the von Neumann computer Features

  • Five major components (arithmetic unit, a controller, a memory, input, output) (which is not necessarily five member?)
  • Instructions and data stored in the memory in the same position, addressable search
  • Instructions and data are binary representation (binary Why? Replaced by another band not it?)
  • Instruction by the operation code and address code consisting of
  • == == stores a program (core features)
  • In the center operator

Its structural problem: == == core to operator, operator performance bottleneck; having no hierarchical feature

Second, a block diagram of computer hardware

Improve:

  • == computer memory in a hardware block diagram of the central ==
  • Hierarchical division:

Note: + CPU constituting the host main memory; secondary memory and input-output device configured I / O system

The figure further refine each part, and then reassembled together constitute a computer system composed. (+ Hierarchical modular)

Thinking: True computing, controller, memory structures are what? (This is what this course to learn)

Q: A real-world problems, and how to solve computer?

Q: Is not all problems can be solved by the method of calculation? (Computability theory / algorithm theory) (eg Turing machine halting problem)

Suppose we are faced with a computable problem, how to solve a problem?

Third, computer work steps

We set a computable problems to the various components of the composition of the refined block diagram of a computer.

1, before the machine is ready

  • Mathematical model

  • Determines the computing method

  • Preparation of problem-solving program

    • Procedure: all operation steps
    • Instruction: each step
  • Programming example:

    • The above two algorithms can be seen, the former have to save some of the calculation result in the step memory, which computes all the computing unit.
    • The above steps represented by instruction manner:

    The first eight addresses stored in the instruction is stored after the address data 5; each instruction by the operation code and address code; wherein Note multiplication section, the result of the multiplication is stored in the ACC, the overflow problem may exist, how to solve it?

Instructions and data stored in the memory, so memory is what? How do I access it? Every visit to the median of the data obtained is how much? We start to see the structure of memory.

2, computer problem solving process

Consisting essentially of 2.1 to memory

analogy:

  • Bank - the storage unit - the original memory (0/1)
  • Building - Room - bed (someone / nobody)

Key Concepts:

  • The storage unit == ==: storing a string of binary code (which may be an instruction, it may be data)
  • == == store word: composition binary code storage unit
  • == == word length memory: the storage unit number of binary code (32/64)

Each memory cell is assigned a number of addresses, each memory cell storing a memory word; search by address storage unit

  • == MAR == (Memory Address Register) memory address registers: a memory address, reflecting the number of memory cells

  • == MDR == (Memory Data Regester) Memory Data Register: data storage, the memory word length is reflected

    Description of the MAR = set number of memory cells 4 is the fourth power of 2 = 16 (reflecting the number of memory cells);

    MDR = 8 bit word length instructions stored 8

Explanation: The computer main memory data register (MDR), the main memory address register (MAR) to help the communication between the CPU and main memory:

  • MAR address used to store data is transmitted to the location or address data source location == ==;
  • Save MDR is to be written or read from address unit of address unit data == ==.
2.2 the basic structure and operation of the operator

What calculator feature is that how it works?

  • Adding
  • Multiplication
  • Or with non

Computing structure:

  • The ALU ( Arithmetic Logic Unit ): an arithmetic logic unit, the arithmetic unit core; usually a combination circuit which is characterized withdrawn if the input, then the output will be canceled, so if the need to save the results at the output of the input register with the corresponding ( ACC, X);
  • The ACC (Accumulator): accumulator;
  • X- : data register;
  • The MQ : multiply quotient register (in the multiplication process, the result is twice the number of operations) to the multiplication result are saved, this requires multiplying the increased storage portion;
ACC MQ X
addition Summand, and Addend
Subtraction Minuend, difference Subtrahend
multiplication High multiplication result Multiplier, the multiplication result of low Multiplicand
division Dividend, the remainder Business divisor

Multiplication: + addition shift operation ( here, a bit less clear )

Division: + subtraction shift operation ( here, a bit less clear )

== (go back and look at the "coding", "CSAPP" Chapter understanding understand, come back and come back) ==

The basic structure of the controller 2.3

Various arithmetic operations are performed under the control of the controller. So what is the function of the controller, and then it should be what kind of structure it?

Features:

  • Interpret instructions
  • In order to ensure that instruction execution

basic structure:

Complete one instruction:

  • Instruction fetch (PC)
  • Analysis command (IR)
  • Executing instructions (CU)

structure:

  • CU: central control unit, the execution instruction
  • PC: Program Counter, used to store the address of the current instruction to be executed == ==, with a counter (PC) + 1 -> PC (different models, this is not necessarily + 1, i.e. two adjacent physical instruction address not necessarily adjacent)
  • IR: instruction register, storing the current instruction to be executed
2.4 host a complete instruction process (very important!)

Here we must take steps to understand each instruction, to understand each step is equivalent to understand this chapter.

(1) completion of step a host instruction fetch

Load instruction functions: the number of banks (main memory / memory) is to ACC

The completion of the three stages of an instruction:

  1. Fetch
  2. Analysis of command
  3. Executing instructions

(Note: The instruction: code opcode address +)

== == step of analyzing the operand fetch (FIG):

  1. Address of the instruction to be executed is stored in the PC, the instructions stored in the memory banks; the first step in the address of the instruction to be executed in the PC into MAR;
  2. The MAR M instruction address to the memory bank;
  3. Under the control of the controller, the instruction address stored in the body M to the MDR instruction;
  4. Under the control of the controller, the MDR instructions stored in the IR; (this operation is complete the instruction fetch; PC-> MAR-> M-> MDR-> IR)
  5. Analysis instruction: The instruction operation code to the IR portion CU, executed by the CU control to analyze;
  6. The address portion of the instruction in the IR number to be taken to the MAR;
  7. The MAR address number M to the storage body;
  8. Under the control of the controller, the number of bank M the number of addresses in to the MDR;
  9. Under the control of the controller, the number ACC saved to the MDR.

(2) a host memory to complete the number of steps

Deposit number of instructions features: the ACC is stored in the calculation result stored in the memory unit M

Procedure deposit number == == analysis (FIG):

  1. Address of the instruction to be executed is stored in the PC, the instructions stored in the memory banks; the first step in the address of the instruction to be executed in the PC into MAR;
  2. The MAR M instruction address to the memory bank;
  3. Under the control of the controller, the instruction address stored in the body M to the MDR instruction;
  4. Under the control of the controller, the MDR instructions stored in the IR; (this operation is complete the instruction fetch; PC-> MAR-> M-> MDR-> IR)
  5. Analysis instruction: The instruction operation code to the IR portion CU, executed by the CU control to analyze;
  6. The address of the instruction in the IR number to be stored to the MAR; (From this point different)
  7. MAR the number of addresses to the memory banks M, told the bank to deposit come in a number, the address is the number;
  8. Under the control of the controller will be stored in the number of ACC to MDR;
  9. Under the control of the controller, the number of banks to the MDR.

Access number of instructions have been analyzed over, then add, multiply, stop printing instructions how to perform under this model? (Think for themselves)

2.5 how the program executed on the computer

An instruction execution steps we already know, so a program (instruction set multiple instructions) executed step is to execute a sequence of instructions;

Here again only analyzes the instruction fetches, for each instruction execute can be divided into three steps: fetch -> analysis command -> execution instruction. Note PC after executing one instruction after, you can +1, and point to the address of the next instruction.

1.3 Computer Hardware Index

A. Machine word

CPU can handle a number of data bits (e.g., the addition may be made of two 8-bit binary numbers, that is, 8 bits), the number of bits in the CPU registers (ACC, X, MQ) concerned.

In general, the longer the word, the better the performance of the machine.

II. Computing speed

The first two are hardware indicators; from the perspective of the four instructions executed measured.

III. Storage capacity

The total number of bits of binary information storage

1.4 summary

  • First of all, this course introduces logic is composed of hardware. It describes the management methods in complex systems 4: Abstract, hierarchical, modular, rules and so on.
  • Then, this chapter describes the instructions of a program (divided into opcode and address code) in the end is how the implementation of the host, I think this part is very important to me, I probably understand the importance on computer programs or instructions executed structure: the processor, memory controller, and how they work.
  • Finally, the computer hardware index, in fact, that correspond to the structure of CPU and memory structure, easy to find out.

Guess you like

Origin www.cnblogs.com/SimonZ/p/11628542.html