Cheatography
https://cheatography.com
This cheat sheet goes over computer architecture
This is a draft cheat sheet. It is a work in progress and is not finished yet.
CPU Components
Arithmetic Logic Unit (ALU): Responsible for carrying out Arithmetic calculations & Making logical decisions |
Control Unit: Responsible for sending signals to how data moves around the CPU & Coordinates the CPU operations |
Cache: Provides fast access to frequently used instructions & data Information written to cache is retrieved quicker then information written to RAM |
Clock: An electronic unit that synchronises related components by generating pulses at a constant rate |
Registers: Tiny, super fast pieces of on-board memory inside the CPU Each has a very specific purpose |
Program Counter: Holds the address in memory which data or an instruction needs to be read from or written to |
Memory Data Register: Holds either data or an instruction which has been fetched from memory of is about to be written back to memory |
Memory Address Register: Holds either data or an instruction which has been fetched from memory of is about to be written back to memory |
Accumulator: Set of general purpose registers |
Buses: Collection of wires through which data & instructions are transmitted from one component to another |
Address bus: Unidirectional Carries the addresses which data needs to be written to or read from |
Data bus: Bidirectional Carries the actual data or instructions |
Control bus: Bidirectional Carries command & control signals telling components when they should be receiving reads or writes etc. |
|
|
Fetch Decode Execute
Computer: An electronic device which takes input, processes data & delivers output |
Simple Example: Input - 5 Process - Multiply by 2 Output - 10 |
Complex Example: Input - Buttons on controller Process - Conversion in the console Output - Update to a monitor, sound out of a speaker or vibration feedback through a controller |
In order to process data a computer follows a set of instructions known as a computer program in addition their are 2 critical components that allow this to happen RAM: Stores the programs & CPU: Carries out instructions |
Fetch Stage: Fetches the next instruction from RAM & Brings it back to the CPU |
Decode Stage: Inspects the instruction & works out what it is that needs doing |
Execute Stage: Carries out the instruction which could involve many thing such as going back to RAM to grab some data, performing a calculation or storing information back into main memory |
Clock speed: Amount of cycles per second measured in Hertz e.g. 3GHz = 3 billion cycles per second |
|
|
Von Neuman & Harvard Architectures
Von Neuman Architecture |
Harvard Architectures |
Instruction & data are shared/stored with the same memory space/format |
Instructions & data are stored in separate memory units |
Each have the same set of buses (System Bus) |
Each having their own set of buses |
A single control unit or processor follows a linear fetch, decode, execute cycle |
Reading & writing data can be done at the same time as fetching an instruction |
One instruction at a time |
Used by RISC processers |
Registers are used as fast access to instruction & data |
---------------------- |
Alternative Architecture
Parallel Processing: Single Instruction on Multiple Data (SIMD) |
Multiple Instructions on Multiple Data (MIMD) Using multiple cores |
Distributed computing: Each computer on the network takes part in the problem |
|