1 / 14

The CPU

The CPU. The Central Presentation Unit Main Memory and Addresses Address bus and Address Space Data Bus Control Bus The Instructions set Mnemonics Opcodes Operands . Central Processing Unit. Arithmetic Logical Unit. Accumulator. Control Unit. Program Counter. Input Unit.

verda
Télécharger la présentation

The CPU

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The CPU The Central Presentation Unit Main Memory and Addresses Address bus and Address Space Data Bus Control Bus The Instructions set Mnemonics Opcodes Operands

  2. Central Processing Unit Arithmetic Logical Unit Accumulator Control Unit Program Counter Input Unit Output Unit Instruction Register Central Memory ROM RAM Control Bus Backing Storage Data Bus

  3. Main Memory • Main Memory is where most of the results are temporarily stored; • Main memory is much faster than the hard disk • Each byte is stored in location in the main memory and each location has an address, this way the CPU can store and retrieve information very easily

  4. Addresses • Since each location in Main Memory has an address, the address has to be specified and saved • When data is required back, the CPU will read this data by calling its address • When the CPU writes information to the Main Memory two things have to be supplied • the address section – address bus • the data section. - data bus • However, these two still pass from the same bus, they just pass from different sections along the same bus.

  5. Address Bus and Space • The address bus allows the CPU to address different locations in Main Memory • The maximum number of available addresses is determined by the width of the address bus. • An address bus is made up of tiny copper strips from which the information passes. The more strips there are the more addresses there will be. • For example if the address bus has 9 strips the maximum number of addresses would be 29 = 512

  6. Data Bus • The data bus structure is very similar to the address bus • It is used to allow the transfer of data to and from the CPU • The largest amount of data passed at a single time is called the word length this specifies how much data can pass at one go • The word length is measured in 8, 16, 32 and even 64 bits • The larger the word length the faster the CPU will work

  7. Control Bus • The control bus is a two way line that controls the operations and the data flow between the memory unit, the arithmetic logic unit, and other computer peripherals.

  8. The Instruction Set • The instruction set is the complete collection of instructions which are used by the CPU • These instructions will be written in machine-code or assembly language (we will go into these later) • The instruction set is part of the design of a CPU hence the machine code of different types of computers is rarely compatible.

  9. Mnemonics • If programming was to be carried out in binary, it would be very difficult to write a complete program using just 1s and 0s • Instead of remembering the binary code used for each function, mnemonics are used. • Mnemonics is a word which can be easily remembered as it resembles the English language • For example adding a number 0001 ADD

  10. Example • Lets say we wish to add the number 9 • Mnemonics: • Binary: ADD 5 Opcode Operand 0001 1001

  11. Opcodes • Opcodeis short for operational code • An opcode is the mnemonic part of the instruction stating what is to be done

  12. Operands • Operand is the mathematical part of the instruction • An operand is the data upon which the opcode is to carry out the action

  13. Machine Code • Machine code is a system of codes understood by the computer. • Machine code is composed only of the two binary digits 0 and , assemble language uses mnemonics • Every CPU model has its own machine language, although • If CPU A understands the full language of CPU B it is said that Ais compatible with B, CPU B may not be compatible with CPU A, as A may know a few codes that B does not.

  14. Machine code… • The "words" of a machine language are called instructions; • Each instruction causes an action by the CPU, such as reading from a memory location • A program is a long list of instructions that are executed by a CPU • Instructions are patterns of bits, different patterns correspond to different commands to the machine. Humans use mnemonic codes to refer to the useful bit-patterns.

More Related