Lecture8 - What is a CPU? Central Processing Unit The brain...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 What is a CPU? • Central Processing Unit • The “brain” of the computer • What does it do? – Fetches, Decodes, AND Executes instructions • What are Instructions? – commands to a computer A CPU has multiple regions • Control Unit – decodes instructions and relays orders to rest of CPU • Arithmetic Logic Unit – performs basic mathematical operations •CPU M emo ry – Registers
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 What are Registers? • Memory for executing binary instructions • All variables used to execute an instruction must be loaded into Registers • Accessing/Changing data in Registers is very fast – Why? • CPUs have very small Register memory – MIPS uses 32 Registers • Registers each hold 1 word • The memory of the computer will deliver 1 word at a time –So? • the wider the word, the greater the processing power – Why? • more data can be processed each step • CPU Instructions are word sized
Background image of page 2
3 So how much memory is that? • For MIPS Registers: – 32 registers X – 32 bits per register _______________ – 1024 bits (256 bytes) • Hmm, that doesn’t seem like much What is Cache? • A memory block in the CPU • It duplicates part of memory in RAM – still much smaller than RAM – Ex: Intel Core 2 has 8 MB of cache • Why does it do this? – cache can be accessed faster than RAM • How does it do this? – when a program executes, parts are loaded into cache – when memory is addressed, cache is checked first • if found it’s called a cache “hit” • for cache misses, parts of cache might need to be replaced
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Registers vs. Cache • Registers: – is very small – can be directly accessed by developer code • we can load data into them • we can get data from them • we can specify which registers to use (they have names) • Cache – is slightly bigger – is used managed automatically by the CPU – developers don’t directly instruct the CPU to use cache memory Memory Comparisons CPU Registers CPU Cache RAM (main memory) Hard Disk faster more space
Background image of page 4
What is an instruction set? • Part of a system’s Architecture Instructions : the words used to command a computer Instruction set : a computer’s vocabulary • Different computers may use different instruction sets • NOTE: CPUs are hard-wired with: – an instruction set – an implementation of each type of available instruction Common Operations • What types of things must all Instruction Sets be able to do? – load data from memory addresses – write data to memory addresses – add/subtract/multiply/divide numbers – conditional branching –e tc
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 23

Lecture8 - What is a CPU? Central Processing Unit The brain...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online