Presentation is loading. Please wait.

Presentation is loading. Please wait.

1Copyright © Prentice Hall 2000 The Central Processing Unit Chapter 3 What Goes on Inside the Computer.

Similar presentations


Presentation on theme: "1Copyright © Prentice Hall 2000 The Central Processing Unit Chapter 3 What Goes on Inside the Computer."— Presentation transcript:

1 1Copyright © Prentice Hall 2000 The Central Processing Unit Chapter 3 What Goes on Inside the Computer

2 2Copyright © Prentice Hall 2000 Functions of Computer Systems Recall that there are four main functions of computer systems: InputProcessing Output Secondary Storage

3 3Copyright © Prentice Hall 2000 Processing In this chapter, we will focus on the central processing unit (CPU) in more detail. Input Processing Output Secondary Storage

4 4Copyright © Prentice Hall 2000 The CPU The CPU interacts closely with memory (primary storage). CPU Memory Memory, however, is not part of the CPU.

5 5Copyright © Prentice Hall 2000 Parts of the CPU The CPU consists of a variety of parts including: Control Unit ALU Registers Control unit Control unit Arithmetic/logic unit (ALU) Arithmetic/logic unit (ALU) Registers Registers

6 6Copyright © Prentice Hall 2000 The Control Unit… directs the other parts of the computer system to execute stored program instructions. The control unit communicates with the ALU and memory. Control Unit

7 7Copyright © Prentice Hall 2000 The Arithmetic/Logic Unit (ALU)… performs mathematical operations as well as logical operations. ALU

8 8Copyright © Prentice Hall 2000 Mathematical Operations The ALU can perform four kinds of mathematical calculations: addition addition subtraction subtraction multiplication multiplication division division

9 9Copyright © Prentice Hall 2000 Logical Operations The ALU can perform logical operations. Logical operations can test for these conditions: Equal-to (=)Equal-to (=) Less-than (<)Less-than (<) Greater-than (>)Greater-than (>)

10 10Copyright © Prentice Hall 2000 Equal-to Condition In a test for this condition, the ALU compares two values to determine if they are equal. If= Then =

11 11Copyright © Prentice Hall 2000 Less-than Condition In a test for this condition, the ALU compares values to determine if one value is less than another. If= Then <

12 12Copyright © Prentice Hall 2000 Greater-than Condition In a test for this condition, the ALU compares values to determine if one value is greater than another. If= Then >

13 13Copyright © Prentice Hall 2000 Registers… are temporary storage areas for data or instructions. Registers Data held temporarily in registers can be accessed at greater speeds than data stored in memory.

14 14Copyright © Prentice Hall 2000 Memory (Primary Storage) Memory is the part of the computer that stores data and program instructions for processing. CPU Memory

15 15Copyright © Prentice Hall 2000 Memory… is also referred to as RAM (random- access memory). CPU Memory RAM is temporary, finite, and more expensive than secondary storage.

16 16Copyright © Prentice Hall 2000 Executing Program Instructions Before the CPU can execute a program, program instructions and data must be placed into memory from an input device or storage device. Input Processing Secondary Storage

17 17Copyright © Prentice Hall 2000 Executing Program Instructions Once the necessary data and instructions are in memory, the CPU performs the following steps for each instruction: CPU Memory Fetching Fetching Decoding Decoding Executing Executing Storing Storing

18 18Copyright © Prentice Hall 2000 Control Unit ALU Registers Fetching Instructions The control unit fetches (gets) the instruction from memory. Memory

19 19Copyright © Prentice Hall 2000 Decoding Instructions The control unit decodes the instruction and directs that the necessary data be moved from memory to the ALU. Control Unit ALU Registers Memory

20 20Copyright © Prentice Hall 2000 Executing Arithmetic/Logic Operations The ALU performs the arithmetic or logical operation on the data. Control Unit ALU Registers Memory

21 21Copyright © Prentice Hall 2000 Storing Results The ALU stores the result of its operation on the data in memory or in a register. Control Unit ALU Registers Memory

22 22Copyright © Prentice Hall 2000 Executing Program Instructions Eventually, the control unit sends the results in memory to an ou t put device or secondary storage. Output Secondary Storage Control Unit ALU Registers Memory

23 23Copyright © Prentice Hall 2000 Instruction Time The time it takes to fetch an instruction and decode it is called instruction time. Memory Control Unit + Memory Control Unit ALU

24 24Copyright © Prentice Hall 2000 Execution Time The time it takes to execute an ALU operation and then store the result is called execution time. + ALU Memory ALU Registers

25 25Copyright © Prentice Hall 2000 Machine Cycle The combination of I-time and E-time is called the machine cycle. E- time Machine Cycle I- time

26 26Copyright © Prentice Hall 2000 Control Unit Memory Locations and Addresses The control unit can find data and instructions because each location in memory has an address. Memory

27 27Copyright © Prentice Hall 2000 Storage Locations Each location in memory is identified by an address. Memory Each location has a unique address.

28 28Copyright © Prentice Hall 2000 Symbolic Addresses The choice of the location in memory is arbitrary. Memory 17 364 Pat $ % Addresses can only hold one number or word.

29 29Copyright © Prentice Hall 2000 Data Representation The system in which all computer data is represented and manipulated is called the binary system.

30 30Copyright © Prentice Hall 2000 Binary System The binary system has only two digits to represent all values. This corresponds to the two states of a computer’s electrical system —on and off.

31 31Copyright © Prentice Hall 2000 Off/On Switches The computer can represent data by constructing combinations of off or on switches. offon or

32 32Copyright © Prentice Hall 2000 Zero or One? The binary system can also be represented by the digits zero and one. 01or Zero (off) and one (on) make up the two digits in the binary system.

33 33Copyright © Prentice Hall 2000 The Bit Each 0 or 1 in the binary system is called a bit. one bit two bits three bits

34 34Copyright © Prentice Hall 2000 The Byte A group of 8 bits is called a byte. 00000111

35 35Copyright © Prentice Hall 2000 One Character of Data Each byte represents one character of data (a letter, digit, or special character). 00000111 J =

36 36Copyright © Prentice Hall 2000 Storing Bytes Storage and memory capacity is expressed in the number of bytes they can hold: 1 kilobyte = 2 10 or 1024 bytes 1 megabyte = 2 20 or 1,048,576 bytes 1 gigabyte = 2 30 or 1,073,741,824 bytes

37 37Copyright © Prentice Hall 2000 Computer Word A computer word is defined as the number of bits that constitute a common unit of data.

38 38Copyright © Prentice Hall 2000 Computer Word Length Word length varies by computer. For example: 8 bits = 1 byte = one word length 64 bits = 8 bytes = one word length

39 39Copyright © Prentice Hall 2000 Coding the Computer A code for determining which group of bits represent which characters on a keyboard is called ASCII.

40 40Copyright © Prentice Hall 2000 ASCII ASCII has been adopted, as the standard, by the U.S. government and is found in a variety of computers. 00000111 J = ASCII-8 codeKeyboard character

41 41Copyright © Prentice Hall 2000 Inside the Computer The flat board within the personal computer that holds the computer circuitry is the motherboard.

42 42Copyright © Prentice Hall 2000 The Motherboard The motherboard includes: MicroprocessorMicroprocessor Memory componentsMemory components

43 43Copyright © Prentice Hall 2000 The Microprocessor… is the CPU of the personal computer. It looks like a computer chip. The microprocessor contains tiny electronic switches (transistors).

44 44Copyright © Prentice Hall 2000 Microprocessor Switches If electric current passes through a transistor, the switch is on. If no current can pass, the switch is off. A combination of transistors can stand for a combination of bits.

45 45Copyright © Prentice Hall 2000 Memory… components are also chips. This form of semiconductor memory stores data in binary form (off/on or zero/one). Storage can be temporary (RAM) or permanent (ROM).

46 46Copyright © Prentice Hall 2000 RAM… means random-access memory. RAM chips can be accessed easily and fast—regardless of where the data is stored. RAM is usually volatile storage in that if the power is shut off, the contents are lost.

47 47Copyright © Prentice Hall 2000 ROM… is read-only memory. ROM chips contain programs and data that are permanently etched on the chip. The contents do not disappear when the power is turned off.

48 48Copyright © Prentice Hall 2000 Computer Speed and Power Speed and power are determined by: Microprocessor speedMicroprocessor speed Bus linesBus lines CacheCache Flash memoryFlash memory RISCRISC Parallel processingParallel processing

49 49Copyright © Prentice Hall 2000 Microprocessor Speeds Microprocessor speeds can be measured in a variety of ways: MegahertzMegahertz MIPSMIPS MegaflopsMegaflops

50 50Copyright © Prentice Hall 2000 Megahertz One measure of microprocessor speed is megahertz (MHz) which is one million machine cycles per second.

51 51Copyright © Prentice Hall 2000 MIPS Another measure of microprocessor speed is MIPS which is one million instructions per second.

52 52Copyright © Prentice Hall 2000 Megaflops Megaflops, or one million floating- point operations per second, is still another measure of microprocessor speed.

53 53Copyright © Prentice Hall 2000 Bus Lines A bus line is a set of parallel electrical paths. A bus is like a mode of transportation for data.

54 54Copyright © Prentice Hall 2000 Bus Width The amount of data that can be carried at one time is bus width (wider = more data).

55 55Copyright © Prentice Hall 2000 Cache Cache is a relatively small block of very fast memory. The data and instructions stored in cache are those that are most recently or most frequently used. Cache speeds up the internal transfer of data and software instructions.

56 56Copyright © Prentice Hall 2000 Flash Memory Accessing data and instructions from within the CPU is fast but not when it comes from a secondary storage device. Flash memory is nonvolatile (like secondary storage) but allows fast access (like RAM).

57 57Copyright © Prentice Hall 2000 RISC New RISC computers have chips with fewer instructions as a means of making them run faster. Older, slower machines have chips (called CISC) with instructions that are seldom or never used.

58 58Copyright © Prentice Hall 2000 Parallel Processing Using several processors at the same time (in parallel) greatly increases processing speed. When parallel processing, the computer can be starting other tasks before the sequence of fetch- decode-execute-store is complete.

59 59Copyright © Prentice Hall 2000 Conclusion Regardless of the design and processing strategy of a computer, its goal is the same: to turn raw data into useful information.


Download ppt "1Copyright © Prentice Hall 2000 The Central Processing Unit Chapter 3 What Goes on Inside the Computer."

Similar presentations


Ads by Google