The CPU Flashcards
What is a computer
A machine that processes data
Hardware
Physical stuff that makes up a computer
e.g. motherboard, CPU
Software
Programs/applications that a computer system runs
e.g. Video game
What is an embedded system
Computers built into other devices
e.g. dishwashers, microwaves, TVs
dedicated for one single task -> more efficient than general purpose computer
What are embedded systems used for
Used as control systems -> monitor + control machinery to get desired result
e.g. in a dishwasher it could control the water pumps, thermostat, various dishwasher cycles
CPU
brain of the computer system
processes data + instructions to make system work
3 main parts of CPU
ALU (Arithmetic Logic Unit)
CU (Control Unit)
Cache
4 Registers
Temporarily hold small bits of data needed for the CPU
Program Counter
Memory address register (MAR)
Memory data register (MDR)
Accumulator
Program Counter
Holds memory address of the instruction for each cycle
Accumulator
Stores intermediate results of calculations in the ALU
Memory Address Register (MAR)
holds any memory address about to be used by the CPU. The address may lead to some data or CPU instructions
Memory Data Register (MDR)
holds the actual data or instruction
may have been fetched from memory or waiting to be written to memory
Memory
Holds program instructions + program data
Fetch - Execute Cycle
FETCH
- Copies memory address from program counter to MAR
- Copies instruction from MAR to MDR
- Increments the Program counter to the address of the next instruction (ready for next cycle)
Fetch - Execute Cycle
DECODE
- Instruction in MDR is decoded by the CU