Download presentation
Presentation is loading. Please wait.
Published byCecily Horton Modified over 8 years ago
1
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 1 CPU The Central Processing Unit
2
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 2 Computer Diagram Bus Memory Peripheral Storage Disk Tape CD/DVD Network HCI Keyboard Display Pointers Cache CPU
3
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 3 How the Pieces Connect n The CPU connects to all other pieces of the computer through the Bus n Memory is short term storage n Peripherals (such as disk) are used for long term storage n The bus is a group of communication lines between the CPU and other pieces
4
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 4 CPU and Cache n The CPU has increased in speed much faster than anything else n The cache is a short term memory that keeps recently used items n It keeps the CPU busy and off the bus
5
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 5 Two Principal Sections of CPU n Arithmetic/Logic Unit –Performs arithmetic (addition, subtraction, multiplication and division) –Compares two items of data to determine if equal, or which is larger (works on numbers or letters) called a logic operation n Control Unit –Directs the flow of electronic traffic (coordinates computer's operation)
6
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 6 Control Unit n Controls ALU and Memory n Fetches and decodes instructions n Directs data transfers n Has the ALU do operations n Contains two important registers: –Program Counter (PC) –Instruction Register (IR)
7
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 7 Registers n Special temporary storage locations that act as high-speed staging (loading) areas n Part of the CPU, not main memory n Usually under direction of the control unit n Several types are available n Each has a different purpose n Some are accessible to programmer
8
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 8 CPU Control Unit Registers Arithmetic Logic Unit Registers
9
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 9 Register Types n Program Counter n Instruction Register n Status n Accumulator n Address n Segment n Index n General purpose n Stack Pointer n Floating point
10
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 10 The IBM 360/370 n 16 General Purpose 32 bit –All integer arithmetic –Indexing (except R0) –Even/Odd pairs for 64 bit n Program Status Word –Program counter and status register n 8 Floating point registers n Lots of inaccessible registers
11
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 11 Intel 8080 n An 8 bit processor with 16 bit address space (64K) –Itself an extension of 8008 and 4040 n Four 16 bit registers each partitioned into a High and Low 8 bit n AX (AL and AH) does most of arithmetic n BX is the Base register n CX is Count register n DX is Data register –Connects to AX for double length n Stack Pointer
12
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 12 Intel 8086 n Four 16 bit general purpose (AX-DX) –AX evolved from accumulator n Pointer and index –Stack Pointer (SP) –Base Pointer (BP) –Source Index (SI) n Segment –Code Segment –Stack Segment –Data Segment –Extra Segment
13
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 13 8086 Segments Code Segment Data Segment Stack Segment Stack Pointer Code Data Stack 1 M 64K
14
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 14 Intel 80386 through Pentiums n Serious attempt to maintain upward compatibility –Each model adds capabilities n Register sizes increase to 32 bit n AX becomes low order 16 bits of the 32 bit EAX n The maximum addressable memory increases n Virtual memory has hardware support
15
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 15 Memory n Also called "main memory" or Primary (internal) storage n Closely associated with CPU but physically separated n Holds or stores –Data and program instructions awaiting processing –Intermediate results –Processed output (ready to be transmitted to secondary storage or output device
16
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 16 Memory Characteristics n Volatile –Loses value when power is removed n Has no history –Only the last value is retained n Always has a value –May be unknown n Each cell has a numbered address
17
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 17 How can a piece of data be retrieved from memory? n Control Unit finds instructions or data by the use of addresses n n Analogy - departmental mail boxes –Two things to note »One item only may be stored »Addresses are always numbers n n Tells where stored
18
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 18 Memory Commands n Memory interprets two commands: –Read and Write n Read requires an address –Returns the contents n Write requires an address and a value –Changes the address to contain the value n Unit is one byte (8 bits) –Several units may be ganged together –2, 4, 8 bytes
19
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 19 Memory Example 0 05 1 135 2 20 3 42 4 0 5 180
20
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 20 Memory n Short term storage of data occurs here n All data must be represented in memory n The organization of memory determines the data representation
21
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 21 Data Representation n Binary - number system with two states –Two states (On or Off) n Bits (BInary digiTS) each 0 or 1 n Organization (small to large) –Bit (individual 1 or 0) –Byte (made up of 7 or 8 bits and represents a character) –Word (how much a computer can handle at one time - multiple bytes)
22
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 22 Byte n Represents a single character of data n 7 or 8 bits (depending on code) n Used to indicate machines' storage capacity –Kilobyte (KB) - equal to 1024 bytes –Megabyte (MB) - equals 1024 2 bytes = 1,048,576 –Gigabyte (GB) - equals 1024 3 bytes –Terabyte (TB) - equals 1024 4 bytes –Petabyte (PB) - equals 1024 5 bytes
23
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 23 Word n The number of bits that constitutes a common unit of data n Length varies by computer –Common word lengths »16 bits(micros, 286 and before) »32 bits(Pentiums, Power PC, mainframes) »64 bits(newer AMD micros, supercomputers)
24
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 24 Digitization n Nothing can be processed by a computer unless it can be converted to digital representation n Graphics – pixels –Compression n Sounds – sampling n Music - MIDI n Characters – character codes
25
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 25 Character Codes n Mechanism to represent character data numerically n BCD n EBCDIC n ASCII n UNICODE
26
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 26 Machine Cycles n Series of operations involved in the execution of a single machine-level instruction n System clock - timing mechanism that governs transmission of instructions and data n Also known as Fetch-Execute Cycle n Made up of two parts: I-cycle and E-cycle n Microcode - mechanism to tailor the instruction set
27
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 27 Fetch-Execute cycle: I- cycle n Take program counter and fetch next instruction from memory n Decode the particular instruction n Increment program counter to point at next instruction n Fetch operands n This part called I-cycle or I-time
28
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 28 Fetch-Execute Cycle: E- cycle n Execute the instruction n Store results (if needed) n Go back to beginning and do it again n This is called the E-cycle or E-time
29
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 29 Machine Instructions n Arithmetic n Comparison n Input and Output n Jumps
30
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 30 Processing Speeds of cycle times n Milliseconds –Thousandths of a second n Microseconds –Millionths of a second n Nanoseconds –Billionths of a second n Picoseconds –Trillionths of a second
31
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 31 Speed Ratings n Older micros rated in megahertz MHz –One MHz represents a million clock ticks per second »Original Apple ran at 1 MHz »Original IBM PC ran at 4.77 MHz –Today - 2000 to 4500 »2000 MHz is 2 GHz n In mainframes rated in mips –One mip equals million instructions per second n In supercomputers rates in mflops –One mflop equals million floating-point operations per second
32
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 32 Instruction Format n There are various components in each machine language instruction n Operation code –Defines which instruction n Operands –May be implied –Register –Immediate data –Memory location n Other things –Masks or flags –Lengths
33
Copyright 1995-2005 Suzanne Tomlinson and Curt Hill 33 Instructions sizes n Instructions may be multiple sizes or single sizes n Single size –Easier to interpret –Wastes bits n Multiple sizes –More complicated CPU design –Better packing in memory
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.