© 2009 prentice-hall, inc. 1. 2 technology in action chapter 9 behind the scenes: a closer look at...

33
© 2009 Prentice-Hall, Inc. 1

Upload: marvin-cross

Post on 11-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 1

Page 2: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 2

Technology in ActionTechnology in Action

Chapter 9Chapter 9

Behind the Scenes: Behind the Scenes: A Closer Look at System HardwareA Closer Look at System Hardware

Page 3: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 3

Chapter Topics Chapter Topics

• Computer switchesComputer switches

• Binary number systemBinary number system

• Inside the CPUInside the CPU

• Cache memoryCache memory

• Types of RAMTypes of RAM

• Computer busesComputer buses

• Creating faster CPUsCreating faster CPUs

Page 4: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 4

Binary LanguageBinary Language

• Computers work in binary languageComputers work in binary language• Consists of two numbers: 0 and 1Consists of two numbers: 0 and 1• Everything a computer does is broken Everything a computer does is broken

down into a series of 0s and 1sdown into a series of 0s and 1s• Switches: Devices inside the Switches: Devices inside the

computer that can be flipped between computer that can be flipped between these two states: 1 or 0, on or offthese two states: 1 or 0, on or off

Page 5: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 5

SwitchesSwitches

• Nonmechanical Nonmechanical devices in computers devices in computers that open and close that open and close circuitscircuits

• Types of electrical Types of electrical switches:switches:– Vacuum tubesVacuum tubes– Transistors:Transistors:

• Semiconductors Semiconductors

– Integrated circuitsIntegrated circuits

Vacuum Tube

Transistors

Integrated Circuits

Page 6: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 6

• The on/off state of a switch represents one The on/off state of a switch represents one bit of databit of data

• Bit (binary digit)Bit (binary digit)– On = 1On = 1– Off = 0Off = 0

OFF

0

Switches Representing DataSwitches Representing Data

ON

1

01

OR = 1 bit

Page 7: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 7

The Binary Number SystemThe Binary Number System

• Describes a number as powers of 2Describes a number as powers of 2• Also referred to as base 2 numbering Also referred to as base 2 numbering

systemsystem• Used to represent Used to represent everyevery piece of data piece of data

stored in a computer: all of the numbers, stored in a computer: all of the numbers, letters, and instructionsletters, and instructions

Page 8: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 8

The Binary Number SystemThe Binary Number System

• Number systems are organized ways to represent Number systems are organized ways to represent numbersnumbers

• Each number in one system has a corresponding Each number in one system has a corresponding number in another.number in another.

01011001 = 89 Binary Base 10

1282x64

642x32

322x16

162x8

82x4

42x2

22x1

1

Binary 0 1 0 1 1 0 0 1

Base 10

0 + 64 + 0 + 16 + 8 + 0 + 0 + 1 = 89

Page 9: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 9

Representing Letters and SymbolsRepresenting Letters and Symbols

• American Standard Code for Information American Standard Code for Information Interchange (ASCII)Interchange (ASCII)– 8 bits = 1 byte = alphanumeric character or symbol8 bits = 1 byte = alphanumeric character or symbol– 256 different combinations256 different combinations

• UnicodeUnicode– 16 bits equal 1 byte16 bits equal 1 byte– 65,000 different combinations, used for all 65,000 different combinations, used for all

languageslanguages

Page 10: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 11

The CPU: The CPU: Processing Digital InformationProcessing Digital Information

• The CPU is the brains of The CPU is the brains of the computerthe computer

• Different types of CPUsDifferent types of CPUs– Intel and AMD chips: Used in Intel and AMD chips: Used in

most Windows-based PCsmost Windows-based PCs– Apple systems use different Apple systems use different

CPU designCPU design

• Differentiating CPUsDifferentiating CPUs– Processing powerProcessing power– Clock speed and cacheClock speed and cache

Page 11: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 12

Processors on the Market Processors on the Market

Page 12: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 13

The CPU Machine CycleThe CPU Machine Cycle

• FetchFetch– The program’s binary code is “fetched” from its The program’s binary code is “fetched” from its

temporary location in RAM and moved to the CPUtemporary location in RAM and moved to the CPU

• DecodeDecode– The program’s binary code is decoded into commands The program’s binary code is decoded into commands

that the CPU understandsthat the CPU understands

• ExecuteExecute– The ALU performs the calculationsThe ALU performs the calculations

• StoreStore– The results are stored in the registersThe results are stored in the registers

Page 13: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 14

The System ClockThe System Clock

• Located on the motherboardLocated on the motherboard

• Controls the CPU’s processing cyclesControls the CPU’s processing cycles

• Clock cycleClock cycle– Pulse or tick Pulse or tick

• Clock speedClock speed– Number of pulses per secondNumber of pulses per second– Measured in hertz (Hz)Measured in hertz (Hz)

Page 14: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 15

The Control UnitThe Control Unit

• Manages the switches inside the CPUManages the switches inside the CPU• Is programmed by CPU designers to Is programmed by CPU designers to

remember the sequence of processing remember the sequence of processing stages for that CPU stages for that CPU

• Moves each switch to its correct setting Moves each switch to its correct setting (on or off) (on or off)

• Then performs the work of that stageThen performs the work of that stage

Page 15: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 16

The Arithmetic Logic Unit (ALU)The Arithmetic Logic Unit (ALU)

• Part of the CPU designed to perform Part of the CPU designed to perform mathematical operations (addition, subtraction, mathematical operations (addition, subtraction, multiplication, division, etc.)multiplication, division, etc.)

• Also performs logical OR, AND, and NOT Also performs logical OR, AND, and NOT operationsoperations

• Is fed data from the CPU registersIs fed data from the CPU registers– Word size: Number of bits a computer can work with Word size: Number of bits a computer can work with

at a timeat a time

Page 16: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 17

Cache MemoryCache Memory

• Small amount of Small amount of memory located on the memory located on the CPU chip or near itCPU chip or near it

• Stores recent or Stores recent or frequently used frequently used instructions and datainstructions and data

• Used for quick access Used for quick access by the CPUby the CPU

• Different levels of cacheDifferent levels of cache

Page 17: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 18

RAM: The Next Level of RAM: The Next Level of Temporary StorageTemporary Storage

• Volatile: When you turn off your computer, Volatile: When you turn off your computer, the data is erasedthe data is erased

• Several kinds of RAM existSeveral kinds of RAM exist• Each type of RAM has a different designEach type of RAM has a different design

– Some types work at much faster speeds Some types work at much faster speeds – Some transfer data more quicklySome transfer data more quickly

Page 18: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 19

Types of RAM: DRAMTypes of RAM: DRAM

• Cheapest and most basic type of RAM Cheapest and most basic type of RAM • Loses its electrical charge, needs to be Loses its electrical charge, needs to be

refreshedrefreshed• Many types of DRAMMany types of DRAM

– SDRAM: Synchronous DRAMSDRAM: Synchronous DRAM– DDR SDRAM: Double data rate SDRAMDDR SDRAM: Double data rate SDRAM

Page 19: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 20

Types of RAM: SRAMTypes of RAM: SRAM

• Static RAM (SRAM)Static RAM (SRAM)– Does not lose its electrical chargeDoes not lose its electrical charge– Faster than DRAMFaster than DRAM– More expensive than DRAMMore expensive than DRAM– Used only in locations like cache Used only in locations like cache

memorymemory

Page 20: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 21

• BusBus– Electrical pathway used to move data between Electrical pathway used to move data between

componentscomponents– Local bus or front side bus (FSB): Connects the CPU Local bus or front side bus (FSB): Connects the CPU

with the memorywith the memory– Expansion bus: Connects the CPU with peripheral Expansion bus: Connects the CPU with peripheral

devicesdevices

Buses: The CPU’s Data HighwayBuses: The CPU’s Data Highway

01100010

0111001101001000

00100111

Page 21: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 22

Bus PerformanceBus Performance• Bus clock speedBus clock speed

– Rate of speed data moves from one location to anotherRate of speed data moves from one location to another– Measured in MHz (millions of clock cycles per second)Measured in MHz (millions of clock cycles per second)

• Bus widthBus width– The number of bits of data moved on a bus at any one The number of bits of data moved on a bus at any one

timetime– Measured in bitsMeasured in bits

• 16 bits16 bits• 32 bits32 bits

Page 22: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 23

Types of Expansion BusesTypes of Expansion Buses• ISA and EISAISA and EISA

– Found on older computersFound on older computers– Connect mouse, modem, and sound cardConnect mouse, modem, and sound card

• PCIPCI– Faster than ISA and EISAFaster than ISA and EISA– Found on modern computersFound on modern computers– Connects network, modem, and sound cardsConnects network, modem, and sound cards

• AGPAGP– Used for three-dimensional graphicsUsed for three-dimensional graphics– Connects the graphics card and memoryConnects the graphics card and memory

Page 23: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 24

Making Computers FasterMaking Computers Faster• Pipelining: The CPU processes more than Pipelining: The CPU processes more than

one instruction at a timeone instruction at a time

Fetch Decode Execute

Store

Fetch Decode Execute

Store

Instruction 1

Instruction 2

Nonpipelined CPU

Fetch Decode Execute

Store

Fetch Decode Execute

Store

Fetch Decode Execute

Store

Fetch Decode Execute

Store

Instruction 1

Instruction 2

Instruction 3

Instruction 4

Pipelined CPU

Page 24: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 25

Making Computers FasterMaking Computers Faster• Specialized instructions for handling Specialized instructions for handling

– MultimediaMultimedia– GraphicsGraphics

Page 25: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 26

Making Computers FasterMaking Computers Faster

• Dual processingDual processing– Two CPUs on the same systemTwo CPUs on the same system– Each processor shares the workloadEach processor shares the workload

• Multi-core processingMulti-core processing• HyperthreadingHyperthreading• Parallel processingParallel processing

– Network of computersNetwork of computers– Each computer works on a portion of the Each computer works on a portion of the

problem simultaneouslyproblem simultaneously

Page 26: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 27

Chapter 9 Summary QuestionsChapter 9 Summary Questions

• What is a switch and how does it work in a What is a switch and how does it work in a computer?computer?

Page 27: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 28

Chapter 9 Summary QuestionsChapter 9 Summary Questions

• What is the binary number system, and What is the binary number system, and what role does it play in computer system?what role does it play in computer system?

Page 28: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 29

Chapter 9 Summary QuestionsChapter 9 Summary Questions

• What is inside the CPU, and how do these What is inside the CPU, and how do these components operate?components operate?

Page 29: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 30

Chapter 9 Summary QuestionsChapter 9 Summary Questions

• How does a CPU process data and How does a CPU process data and instructions?instructions?

Page 30: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 31

Chapter 9 Summary QuestionsChapter 9 Summary Questions

• What is cache memory?What is cache memory?

Page 31: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 32

Chapter 9 Summary QuestionsChapter 9 Summary Questions

• What types of RAM are there?What types of RAM are there?

Page 32: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 33

Chapter 9 Summary QuestionsChapter 9 Summary Questions

• What is a bus, and how does it function in What is a bus, and how does it function in a computer system?a computer system?

Page 33: © 2009 Prentice-Hall, Inc. 1. 2 Technology in Action Chapter 9 Behind the Scenes: A Closer Look at System Hardware

© 2009 Prentice-Hall, Inc. 34

Chapter 9 Summary QuestionsChapter 9 Summary Questions

• How do manufacturers make CPUs so that How do manufacturers make CPUs so that they run faster?they run faster?