3rd the cpu
-
Upload
dianna-manalo -
Category
Technology
-
view
399 -
download
0
Transcript of 3rd the cpu
![Page 1: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/1.jpg)
The Central Processing Unit:What Goes on Inside the Computer
![Page 2: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/2.jpg)
Objectives
• Identify the components of the central processing unit and how they work together and interact with memory
• Describe how program instructions are executed by the computer
• Explain how data is represented in the computer
• Describe how the computer finds instructions and data
• Describe the components of a microcomputer system unit’s motherboard
• List the measures of computer processing speed and explain the approaches that increase speed
![Page 3: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/3.jpg)
Contents
• The CPU
• Types of Storage
• Executing Programs
• Finding Data in Memory
• The System Unit
• Microprocessor
• Semiconductor Memory
• Bus Line
• Speed and Power
![Page 4: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/4.jpg)
The CPU
![Page 5: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/5.jpg)
The CPU
• Converts data into information
• Control center
• Set of electronic circuitry that executes stored program instructions
• Two parts– Control Unit (CU)– Arithmetic Logic Unit (ALU)
![Page 6: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/6.jpg)
Control Unit CU
• Part of the hardware that is in-charge
• Directs the computer system to execute stored program instructions
• Communicates with other parts of the hardware
![Page 7: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/7.jpg)
Arithmetic / Logic UnitALU
Performs arithmetic operations
Performs logical operations
![Page 8: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/8.jpg)
Arithmetic Operations
Addition
Subtraction
Multiplication
Division
![Page 9: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/9.jpg)
Logical Operations
• Evaluates conditions
• Makes comparisons
• Can compare– Numbers– Letters– Special characters
![Page 10: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/10.jpg)
Registers
Special-purpose
High-speed
Temporary storage
Located inside CPU
Instruction register
Holds instruction currently being executed
Data register
Holds data waiting to be processed
Holds results from processing
![Page 11: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/11.jpg)
Types of Storage
• Secondary– Data that will eventually be used– Long-term
• Memory– Data that will be used in the near future– Temporary– Faster access than storage
• Registers– Data immediately related to the operation being
executed– Faster access than memory
![Page 12: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/12.jpg)
Measuring Storage Capacity
KB – kilobyte• 1024 bytes• Some diskettes• Cache memory
MB – megabyte• Million bytes• RAM
GB – gigabyte• Billion bytes• Hard disks• CDs and DVDs
TB – terabytes• Trillion bytes• Large hard disks
![Page 13: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/13.jpg)
MemoryMany Names
Primary storage
Primary memory
Main storage
Internal storage
Main memory
![Page 14: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/14.jpg)
Main Types of Memory
RAMRandom Access Memory
ROMRead Only Memory
![Page 15: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/15.jpg)
RAM
• Requires current to retain values
• Volatile
• Data and instructions can be read and modified
• Users typically refer to this type of memory
![Page 16: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/16.jpg)
What’s in RAM?
• Operating System
• Program currently running
• Data needed by the program
• Intermediate results waiting to be output
![Page 17: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/17.jpg)
ROM
• Non-volatile
• Instructions for booting the computer
• Data and instructions can be read, but not modified
• Instructions are typically recorded at factory
![Page 18: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/18.jpg)
Executing Programs• CU gets an instruction and places it in memory
• CU decodes the instruction
• CU notifies the appropriate part of hardware to take action
• Control is transferred to the appropriate part of hardware
• Task is performed
• Control is returned to the CU
![Page 19: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/19.jpg)
Machine Cycle
I-time
• CU fetches an instruction from memory and puts it into a register
• CU decodes the instruction and determines the memory location of the data required
![Page 20: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/20.jpg)
Machine Cycle
E-time
• Execution– CU moves the data from memory to registers in
the ALU– ALU is given control and executes the instruction– Control returns to the CU
• CU stores the result of the operation in memory or in a register
![Page 21: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/21.jpg)
System Clock
• System clock produces pulses at a fixed rate
• Each pulse is one Machine Cycle
• One program instruction may actually be several instructions to the CPU
• Each CPU instruction will take one pulse
• CPU has an instruction set – instructions that it can understand and process
![Page 22: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/22.jpg)
Finding Data in Memory
• Each location in memory has a unique address– Address never changes– Contents may change
• Memory location can hold one instruction or piece of data
• Programmers use symbolic names
![Page 23: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/23.jpg)
Data RepresentationOn/Off
Binary number system is used to represent the state
of the circuit
![Page 24: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/24.jpg)
Bits, Bytes, Words
• BIT– Binary DigIT– On/off circuit– 1 or 0
• BYTE– 8 bits– Store one alphanumeric character
• WORD– Size of the register– Number of BITS that the CPU processes as a unit
![Page 25: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/25.jpg)
Coding Schemes• ASCII
– Uses one 8 bit byte– 28 = 256 possible combinations or characters– Virtually all PCs and many larger computers
• Unicode– Uses two 8 bit bytes (16 bits)– 216 = 65,536 possible combinations or characters– Supports characters for all the world’s languages– Downward-compatible with ASCII
![Page 26: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/26.jpg)
The System UnitThe Black Box
• Houses electronic components– Motherboard – Storage devices– Connections
• Some Apple Macintosh models have system unit inside monitor
![Page 27: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/27.jpg)
The System UnitThe Black Box
Motherboard
• Microprocessor chip
• Memory chips
• Connections to other parts of the hardware
• Additional chips may be added – math coprocessor
![Page 28: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/28.jpg)
The System UnitThe Black Box
Storage Devices
Hard drive
Floppy drive
CD-ROM drive
DVD-ROM drive
![Page 29: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/29.jpg)
Microprocessor
• CPU etched on a chip
• Chip size is ¼ x ¼ inch
• Composed of silicon
• Contains millions of transistors– Electronic switches that can allow current to pass
through
![Page 30: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/30.jpg)
Microprocessor Components
• Control Unit – CU
• Arithmetic / Logic Unit – ALU
• Registers
• System clock
![Page 31: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/31.jpg)
Building a Better Microprocessor
• Computers imprint circuitry onto microchips– Cheaper– Faster
• Perform functions of other hardware– Math coprocessor is now part of
microprocessor– Multimedia instructions are now part of
microprocessor
![Page 32: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/32.jpg)
Building a Better Microprocessor
• The faster the computer runs
• The cheaper it is to make
• The more reliable it is
The more functions that are combined on a microprocessor:
![Page 33: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/33.jpg)
Types of Microprocessors
Intel
• Pentium
• Celeron
• Xeon and Itanium
Intel-compatible
• Cyrix
• AMD
![Page 34: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/34.jpg)
Types of Microprocessors
• PowerPC– Cooperative efforts of Apple, IBM, and
Motorola– Used in Apple Macintosh family of PCs– Found in servers and embedded systems
• Alpha– Manufactured by Compaq– High-end servers and workstations
![Page 35: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/35.jpg)
Semiconductor Memory
• Reliable
• Compact
• Low cost
• Low power usage
• Mass-produced economically
• Volatile
• Monolithic– All circuits together constitute an inseparable unit of storage
![Page 36: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/36.jpg)
Semiconductor MemoryCMOS
• Complementary metal oxide semiconductor
• Uses little electricity
• Used in PC to store hardware settings that are needed to boot the computer
• Retains information with current from battery
![Page 37: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/37.jpg)
RAM
• Keeps the instructions and data for current program
• Data in memory can be accessed randomly
• Easy and speedy access
• Volatile
• Erased
• Written over
![Page 38: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/38.jpg)
Types of RAM
SRAM
• Retains contents as long as power is maintained
• Faster than DRAM
![Page 39: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/39.jpg)
Types of RAM
DRAM• Must be constantly refreshed
• Used for most PC memory because of size and cost
• SDRAM – faster type of DRAM
• Rambus DRAM– Faster than SDRAM– Expensive
![Page 40: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/40.jpg)
Adding RAM
• Purchase memory modules that are packaged on circuit boards
• SIMMS – Chips on one side
• DIMMS – Chips on both sides
• Maximum amount of RAM that can be installed is based upon the motherboard design
![Page 41: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/41.jpg)
ROM
• Programs and data that are permanently recorded at the factory
• Read
• Use
• Cannot be changed by the user
• Stores boot routine that is activated when computer is turned on
• Nonvolatile
![Page 42: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/42.jpg)
PROM
• Programmable ROM
• ROM burner can change instructions on some ROM chips
![Page 43: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/43.jpg)
Bus Line
• Paths that transport electrical signals
• System bus– Transports data between the CPU and memory
• Bus width– Number of bits of data that can be carried at a
time– Normally the same as the CPUs word size
• Speed measured in MHz
![Page 44: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/44.jpg)
Bus Line
CPU can support a greater number and variety of instructions
CPU can support a greater number and variety of instructions
Larger bus width = More powerful computer
CPU can transfer more data at a time = Faster computer
CPU can reference larger memory
addresses= More memory
available
![Page 45: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/45.jpg)
Expansion Buses
• Connect the motherboard to expansion slots
• Plug expansion boards into slots– interface cards– adapter cards
• Provides for external connectors / ports– Serial– Parallel
![Page 46: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/46.jpg)
Expansion Buses
![Page 47: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/47.jpg)
PC Buses and Ports
ISA Slow-speed devices like mouse, modem
PCI High-speed devices like hard disks and network cards
AGP Connects memory and graphics card for faster video performance
USB Supports “daisy-chaining” eliminating the need for multiple expansion cards; hot-swappable
IEEE 1394 (FireWire)
High-speed bus connecting video equipment to the computer
PC Card Credit card sized PC card devices normally found on laptops
![Page 48: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/48.jpg)
Speed and Power
What makes a computer fast?• Microprocessor speed
• Bus line size
• Availability of cache
• Flash memory
• RISC computers
• Parallel processing
![Page 49: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/49.jpg)
Computer Processing Speed
Time to execute an instruction
• Millisecond
• Microsecond
• Nanosecond– Modern computers
• Picosecond– In the future
![Page 50: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/50.jpg)
Microprocessor Speed
• Clock speed– Megahertz (MHz) – Gigahertz (GHz)
• Number of instructions per second– Millions of Instructions Per Second (MIPS)
• Performance of complex mathematical operations – One million floating-point operations per second
(Megaflop )
![Page 51: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/51.jpg)
Cache
• Small block of very fast temporary memory
• Speed up data transfer
• Instructions and data used most frequently or most recently
![Page 52: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/52.jpg)
Cache
Step 1Processor requests data or
instructions
Step 2Go to address in main
memory and read
Step 3Transfer to main CPU and cache
Next processor request• Look first at cache• Go to memory
PROCESSOR
R
A
M
Cache
![Page 53: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/53.jpg)
Types of Cache
• Internal cache– Level 1 (L1)– Built into microprocessor– Up to 128KB
• External cache– Level 2 (L2)– Separate chips– 256KB or 512 KB– SRAM technology– Cheaper and slower than L1– Faster and more expensive than memory
![Page 54: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/54.jpg)
Flash Memory
• Nonvolatile RAM
• Used in– Cellular phones– Digital cameras– Digital music recorders– PDAs
![Page 55: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/55.jpg)
Instruction Sets
• CISC Technology– Complex Instruction Set Computing– Conventional computers– Many of the instructions are not used
• RISC Technology– Reduced Instruction Set Computing– Small subset of instructions– Increases speed– Programs with few complex instructions
• Graphics• Engineering
![Page 56: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/56.jpg)
Types of Processing
• Serial processing– Execute one instruction at a time– Fetch, decode, execute, store
• Parallel Processing– Multiple processors used at the same time– Can perform trillions of floating-point instructions
per second (teraflops)– Ex: network servers, supercomputers
![Page 57: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/57.jpg)
Types of Processing
• Pipelining– Instruction’s action need not be complete before
the next begins– Fetch instruction 1, begin to decode and fetch
instruction 2
![Page 58: 3rd the cpu](https://reader034.fdocuments.net/reader034/viewer/2022052505/555ece8dd8b42af67f8b5637/html5/thumbnails/58.jpg)