Principles of computer composition

Source: Internet
Author: User
Tags binary to decimal movable type

Computer overview

The basic composition of the computer:

    • memory : A memory-enabled component used to store computational programs and various data involved in the operation
    • arithmetic and logic operation of data: processing of data
    • Controller : Responsible for analyzing the control information stipulated by the program, controlling and coordinating the input, output operation or memory access
    • input Device : Implements the input of the calculation program and raw data
    • output Device : Achieve output of calculation result

Composition of the link:

    • Figure A
    • Figure II

The working process of the computer:

    • User Open Program
    • The system sends the program code snippet and data segment into the computer's memory
    • The controller takes instructions from the memory
    • Controller analysis, execution instructions, preparation for removing an instruction
    • Take down an instruction, analyze the execution, repeat the operation until all the instructions in the program are executed, and get all the instructions.

von Neumann mechanism:

    • Program Storage
    • with 2 binary

Architecture of the computer system:

    • Figure One:
    • Figure II
Data overview

Two basic methods of data information:

    • by value : requires the correct representation of the value in the selected carry system, including the number symbol, the decimal sign
    • Representation by shape : Data is represented by a certain encoding method

Storage unit of information:

    • 1kb=2^10b=1024byte
    • 1mb=2^20b=1024kb
    • 1gb=2^30b=1o24mb
    • 1tb=2^40b=1024gb

Floating-point notation:

Formula : n=2^ (+-E) * (+-s)

Description :

    • E is the order code it is a binary positive integer
    • Symbol for step (Ef) e before +--for order code
    • s called Mantissa it is a binary positive decimal
    • The sign of the mantissa (Sf) s before +--
    • "2" is the bottom line of order E.

R-Binary notation:

The representation of a commonly used binary number in a computer:

Rounding System Binary octal decimal hexadecimal    

Rule every two into a every eight into a every ten into a every 16 into a
Radix r=2 r=8 r=10 r=16
Digital 0, 1 0 ... 7 0 ... 9 0 ... F
Right 2^i 8^i 10^i 16^i
form denotes B Q D H

Conversions between different binaries:

    • Decimal and R-Binary conversions:
      Decimal to R binary:
      Conversion of integers : "Take the remainder of the method except R" and read from the last one.
      Fractional conversion: "Multiply R takes integer" to read the resulting decimal number from the first multiply integer, that is, the decimal decimal number corresponding to the R decimal point
      R-Binary to decimal:
      The use of the right to add, will be all the binary digital and its corresponding rights multiplied, its product addition, and number is the corresponding decimal number of the R-binary
    • Binary, octal, hexadecimal conversions:
      • (binary octal) "three-bit and one"
      • (octal binary) "one split three-bit"
      • (binary hex) "four-bit and one"
      • (hex binary) "One split four-bit"
      • (hexadecimal octal) "one split two-bit"
      • (octal hex) "Two-bit and one"

Original code, anti-code, complement, BCD code:

Binary source code, anti-code and complement:

    • True Value: A number of the plus sign with "+" means, minus signs with "-", that is, the number of truth
    • Number of machines: the symbol with 0 for integers, 1 for negative numbers, and for each digit is also represented by 0,1, so the number called machine number is also called machine code
    • Original code: The original code of the number of symbols in the machine with the sign bit 0 and 1 to indicate the number of signs, while the rest of the number itself
    • Anti-code:
      • For positive numbers whose inverse code is the same as the original code
      • For a negative number of its inverse code and the original code of the symbol bit constant value, you take the inverse is 0 change to 0
    • Complement:
      • For positive numbers whose complement is the same as the original code
      • For the negative complement and the original code sign bit unchanged, the values are reversed, the end plus 1

The relationship between the original code, the inverse code, and the complement:

BCD Code:

(ii → decimal) encode a decimal number using the thought binary code
Example: (931) 10 = (1001 0011 0001) 2

BCD Parity Check Code:

decimal BCD Code Odd Check code even check code          
0 0000 00001 00000
1 0001 00010 00011
2 0010 00100 00101
3 0011 00111 00110
4 0100 01000 01001

Binary arithmetic:

Operation rules:

    • Addition rule: 0+0=0; 0+1=1+0=1 1+1=1
    • Subtraction rule: 0-0=0;  1-0=1;  1-1=0; 0-1=1
    • Multiplication rule: 0*0=0;  0*1=1*0=0; 1*1=1
    • Division rule: 0∕1=0; 1∕1=1

Operation Formula:

    • "X" complement + "Y" complement = "x+y" complement
    • "X-y" complement = "x+ (-y)" complement = "×" complement + "-y" complement

Logical operation:

    • Definition: Implements the operation between logical variables
    • Classification:
      • logical addition (' or ' operation)
      • Logical multiplication (' and ' operations)
      • Logical negation (' non ' operation)

Logical operation:

    • ' or ':
      • Operational rules: 0∪0=0;  0∪1=1;  1∪0=1; 1∪1=1 "1-True, 0-false"
      • Expression: C=a∪b or c=a+b (this event can only occur if one or more of the conditions of an event is determined)
    • ' With ':
      • Operational rules: 0∩0=0;   0∩1=0;   1∩0=0; 1∩1=1
      • Expression: C=a∩b or C=a-b or c=a*b (this can happen only if all events that determine an event are fully available)
    • ' Non ':
      • Operational rules: ō= 1; ī= 0
      • Expression: C=a (when the condition of an event is satisfied, the event does not occur, whereas the event occurs)
    • ' XOR ':
      • Operation rules: 0 XOR or 0=0;  0 xor or 1=1;  1 xor or 0=1; 1 XOR 1=0
      • Expression: C=a xor B "Same as 0, different 1"

Common formulas for logical algebra

    • 0-1 law: a+0=a; A*0=0
    • Overlapping law: a+1=1;  A*1=a;  A+a=1; A*a=a
    • Complementary law: A * (!  A) = 0; A + (! A) =1
    • and the law:! (! A) =a
    • Exchange law: a+b=b+a; A*b=b*a
    • Binding law: A + (b+c) = (a+b) +c; A * (b*c) = (a*b) *c
    • Allocation Rate: A * (b+c) =a*b+a*c; A + (b*c) = (a+b) * (A+C)
    • Moore's Law:! (a+b) = (! A) * (!  B); ! (a*b) = (! A) + (! B
Bus

Definition: A bunch of public information lines connecting computer parts or computers directly, which is the public way of transmitting information code in computer

Characteristics:

    • The same set of buses can only accept one send source at a time, otherwise a conflict will occur
    • The sending of information can be sent to one or more destinations at the same time

Classification:

    • Transfer classification
      • Serial bus binary you're on one line.
      • Parallel bus can simultaneously transmit multiple bits number of buses
    • Information classification
      • Data bus transmits data between the central processing unit and the memory or i/0 device
      • Address bus used to transmit unit or I/O device interface information
      • The control bus is responsible for transmitting information between the central processing unit or memory or peripherals
    • Object Location Classification
      • On-chip bus means the channel <I^2C bus, SPL bus, SCI bus for transmitting information inside each chip of the computer >
      • External bus between microcomputer and external device bus with plug-in board one-level interconnect <isa bus, EISA Bus, PCI bus >
      • System bus microcomputer plug-in and system board <USB bus, IEEE-488 bus, RS-485 bus, Rs-232-c bus >

Bus standard basis: physical size, lead array, signal meaning, function and timing, operating frequency, bus protocol

Cpu

An operator consists of:

    • Arithmetic logic unit (ALU)
    • Universal Register Set (R1 ~rn)
    • Multi-Channel selector (MN)
    • Flag Register (FR)

Controller composition:

    • Time-scale generator (TGU)
    • Main pulse oscillator (MF)
    • Address forming device (AGU)
    • Program Counter (PC)
    • Instruction Register (IR)
    • Instruction Decoder (ID)

Bus:

    • Data Bus (DBUS)
    • Address Bus (ABUS)
    • Control Bus (CBUS)

CPU operation schematic diagram:

CPU Main Performance Index:

    • Clock frequency: CPU internal operating frequency, is the CPU operation time
    • FSB : A reference beat is provided on the motherboard for use by each component, and the motherboard provides the beat to become FSB
    • frequency: CPU frequency to FSB a number of times to work, CPU frequency is a multiple of FSB become the CPU's frequency, this CPU operating frequency = signal Frequency * FSB
    • basic Word length : The number of bits of a binary number that the CPU processes at a time
    • Address bus width : Address bus width (number of bits in address bus) determines the capacity of the CPU to access the memory, different models of CPU bus width, so the maximum capacity of the memory used is not the same
    • Data Bus width : The data bus width determines the amount of data transmitted between the CPU and the memory input/output device
Memory

Definition: Computer storage is a device that holds data and programs

Classification:

    • main Memory: Also known as memory, storage directly with the CPU exchange information, composed of semiconductor memory
    • Secondary storage : Also known as external memory, which stores information that is not currently being used immediately, and which is bulk exchanged with the main memory, consisting of a tape drive, a tape drive, and a disc

Storage hierarchy:

Comparison of memory and external memory:

      Main Memory Secondary Storage

Type ROM RAM floppy disk hard disc

High and low cost + + lower +

Fast speed + + slowly +

Small size + small---

Is there any power loss or no

Memory:

Function:

The main memory is the memory that can be accessed directly by the CPU, it stores the program that needs to be executed and the data that needs to be processed, can only temporarily store the data, can't persist the data for a long time

Composition

    • Storage (MPS): Consists of storage units (each containing several storage elements, one binary number per component) and each unit has a number, called a storage unit address (address), usually a storage unit consisting of 8 storage elements
    • Address register (MAR): A number of triggers to hold the address of the access register, and the address register length matches the register capacity (i.e. 1 k, length without 2^10=1k)
    • Address decoders and drivers
    • Data register (MDR): The data register consists of a number of triggers to hold the data read in the storage unit, or to temporarily hold data from the data bus that is about to be written to the storage unit "the width (w) of the data memory should match the length of the storage unit"


    

Main Technical Index:

    • Storage capacity: Generally refers to the number of storage units contained in the storage unit (N)
    • Access Time (TA): Refers to memory from accept command to read/write data and stabilize at Data register (MDP) output
    • Storage cycle (TMC): The shortest time required between two separate access operations, usually TMC is longer than TA
    • Access rate: The total number of bits of information exchanged between main memory and external (such as CPU) per unit of time
    • Reliability: The mean time interval between two failures is described by MTBF for mean time between failures

High-speed buffer memory:

definition: high-speed buffer memory is a small-capacity storage unit consisting of a fast-access circuit, that is, on the basis of memory, add a layer called high-speed buffer memory

Features: 5 ~ times faster than main memory

virtual Memory: It is based on the main memory-secondary physical structure, a storage system consisting of additional hardware devices and operating system storage management software, which unifies the main memory and the secondary address space to form a large storage space, because the real " The CPU can only execute the program that is transferred into main memory, so this storage system becomes "virtual memory"

Rom and Ram

RAM (random memory)

Readable, writable, random access means that the time required to access any unit is the same, and when the power is lost, the contents of the store disappear immediately, known as volatile

ROM (read-only memory)

    • Definition: Once the ROM has information, not easy to change, simple structure, so the density is higher than the read-write memory, with volatile
    • Classification:
      • Fixed mask model ROM (can no longer be modified)
      • Prom programmable read Memory (written by the user, but only allowed to be programmed once)
      • EPROM erasable Programmable read-only memory (can be erased by ultraviolet irradiation)
      • E2prom erasable Programmable read-only memory (the contents can be erased by electricity)

Secondary storage (HDD)

Description: A disk made of magnetic material on both sides of an aluminum disc

Advantages: small size, light weight, good dustproof, high reliability, large storage capacity, fast access, but most of them fixed in the host box, it is inconvenient to carry, the price is higher than the floppy disk

Performance Indicators : Speed, overclocking performance, cache, single disk capacity, transmission mode, calorific value, capacity, average wait time

Hard Drive composition diagram:

Attention:

The first magnetic area of the entire disk is particularly important because he records important information about the entire disk! The first magnetic area of the disk is a major record of two important information, namely:

    • Main boot Record area (Master boot Record, MBR): Where the boot manager can be installed, there are 446 bytes
      <MBR is important because when the system starts it will actively read the contents of this chunk, so that the system will know where your program is placed and how it should be started >
    • Split tables (partition Table): Record the state of the entire hard disk partition, with a bytes

Disk partitioning table (partition table):

Cut the hard drive partition with reference to the magnetic column number! In the bytes capacity of the partition table, there are four groups of records, each record area records the starting and ending magnetic column number of the section. If you look at the hard drive in a long bar and then look at the magnetic column in a straight line, then the record section of the bytes is a bit like the icon below:

We assume that the hard disk has only 400 magnetic columns, a total of four split slots, the fourth slot is located in the range of the No. 301 to No. 400 magnetic column.

Since the partition table is only a bytes, can only hold up to four records of the split, the four divided records are called the main (Primary) or extended (Extended) slot. According to the above diagram and description, we can get a few key information:

    • In fact, the so-called "split" is only for the bytes of the partition table to configure it!
    • The default partition table of the hard disk can only write four sets of split information < main split and extended allocation can have up to four (hard disk limit) >
    • These four sets of split information we call Primary (Primary) or extended (Extended) split slots
    • Extended allocations can have at most one (operating system limit)
    • A logical partition is a split slot that is continuously cut out by an extended allocation, and all logical splits will be deleted if the extended allocation is destroyed
    • After being able to be formatted, the partition slot for data access is divided into the main partition and the logical division. Extended allocations cannot be formatted
    • The smallest unit of a split slot is a magnetic column (cylinder)
    • The number of logical partitions varies according to the operating system, in Linux systems, the IDE hard disk has a maximum of 59 logical partitions (number 5th to 63rd), the SATA hard disk has 11 logical partitions (5th to 15th number)
    • When the system is written to disk, it must refer to the partition table in order to process the data for a partition slot.

Summarize:

    • Sector (Sector) is the smallest physical storage unit, each sector is a bytes;
    • The sector is composed of a circle, that is, the magnetic column (Cylinder), the magnetic column is the smallest unit of the split slot (partition);
    • The first sector is the most important: (1) The main boot area (Master boot record, MBR) and the partition table (partition tables), where the MBR occupies 446 bytes, and partition table occupies a bytes.
Input/output devices

Input device

Classification:

    • Character: keyboard
    • Graphics: mouse, joystick, stylus
    • Analog: Speech, Analog-to-digital conversion
    • Images: cameras, scanners, fax machines
    • Optical reading: Optical marker reader, optical character reading machine

Keyboard classification (with interface type):

    • of the Ps∕2 interface
    • of the USB interface
    • of wireless

Mouse classification:

    • Ps∕2 interface, USB interface (with interface type)
    • Mechanical mouse, photoelectric mouse (in-house construction)
    • Two-button mouse, three-button mouse (number of keys)

Voice input device: main part: input, analog-to-digital converter, speech recognizer

Output device

Printer:

    • Classification:
      • Hit printer
        • Principle: The use of mechanical action to combat ' font ' so that ribbons and printing paper collided
        • Category: Movable type printing, dot matrix printing
        • Features: simple structure, low price
      • Non-hitting printer
        • Principle: Printing characters in a variety of physical or chemical ways
        • Category: Laser printers, inkjet printing
        • Features: fast speed, high quality, no noise, but high price
    • Key Performance indicators: resolution, interface type, print speed

Display:

    • Display resolution: Number of rows and columns on screen glazing
    • Category: Cathode ray tube display;  Liquid crystal display; Plasma display
    • Main technical indicators: pixel, resolution, screen size, refresh frequency, dot pitch, pixel color

Input interface and control mode

Input interface:

    • Data transfer: Serial port;  Parallel port;  program-type interface; DMA Type interface
    • Versatility: Universal interface; Dedicated interface
    • Function selection: programmable interface; Non-programmable interface

Input/Output control mode:

    • Program Query method:
    • Interrupt control mode:
    • Direct Memory Access Mode
    • Input/Output Processor mode
Computer's time-scale system

Timing control Mode:

Synchronous control mode:

    • Define the operation time divided into many clock cycles, periodic length fixed, one-step operation per time period, each page operation should be completed within the specified clock cycle
    • Advantages and Disadvantages
      • Advantages: The timing relation is simple, the control component is easy to be concentrated in structure and easy to design
      • Cons: Not economical in the use of time schedules
    • In the synchronous control mode, there is a unified clock signal, a variety of micro-operations are in the synchronization of this clock information is completed, said the clock signal is the computer frequency, its cycle is called the clock cycle, said to complete a basic operation of the time required for the machine cycle

Asynchronous control mode:

    • Define each operation according to its needs to choose a different time, not constrained by the unified clock cycle, the cohesion between the steps and the information exchange between the parts, the way to take a response
    • Advantages and Disadvantages
      • Advantages: Time is compact, can be divided according to different parts, the actual demand for equipment to allocate time
      • Disadvantage: is the actual asynchronous response required control is more complex

Three-stage time-scale system:

    • Instruction Cycle
    • Machine cycle
    • Clock cycle

Image display:

Instruction period Formula:

instruction cycle = Clock cycle * Number of t required to compose a mechanical cycle * number of M required to form a instruction period

Principles of computer composition

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.