Components of a Computer Flashcards
Arithmetic Logic Unit
The ALU (Arithmetic and Logic Unit) completes all of the arithmetical and logical operations.
Arithmetical operations include all mathematical operations such as addition and subtraction on fixed or floating point numbers.
Logical operations include Boolean logic operations such as AND, OR, NOT, and XOR.
Control Unit
The Control Unit is the component of the processor which directs the operations of the CPU.
I has the following jobs:
- Controlling and coordinating the activities of the CPU
- Managing the flow of data between the CPU and other devices
- Accepting the next instruction
- Decoding instructions
- Storing the resulting data back in memory
Registers
Registers are small memory cells that operate at a very high speeds and are used to hold data temporarily.
Program Counter
Holds the address of the next instruction to
be executed.
Memory Address register (MAR)
Holds the address of a location that is to be
read from or written to.
Memory Data register (MDR)
Temporarily stores data that has been read or data that needs to be written.
Current instruction register
Holds the current instruction being executed, divided up into operand and opcode.
Accumulator
stores the result of calculations made by the ALU
Interrupt register
generates and detects interrupts
Buses
Buses are a set of parallel wires which connect two or more components inside the CPU.
Address Bus
This is the bus used to transmit the memory addresses specifying where data is to be sent to or retrieved from.
Data Bus
A bi-directional path for moving data and instructions between system components
Control Bus
A bi-directional bus to transmit command signals from the control unit to other parts of the processor
system bus
collective term for address, data and control bus
fetch decode execute cycle
The fetch-decode-execute cycle is the sequence of operations that are completed in order to execute an instruction.
Fetch phase:
- Address from the PC is copied to the MAR
- Instruction held at that address is copied to MDR by the data bus
- Simultaneously, the contents of the PC are increased by 1
- The value held in the MDR is copied to the CIR
Decode phase:
- The contents of CIR are split into operand and opcode
Execute phase:
- The decoded instruction is executed
Fetch
- The address of the next instruction is copied from the PC to the MAR
- The fetch signal is sent across the control bus. The contents of the MAR are transferred across the address bus.
- Instruction held at that address is copied to MDR by the data bus and the value held in the MDR is copied to the CIR.
- the PC increments by 1
Decode
The contents of the CIR are sent to the CU and divided. The operand contains the data or the address of the data upon which the operation is to be performed. The opcode specifies the type of instruction to be executed.
Execute
The appropriate instruction/ opcode is carried out on the data/ operand
program branch reason
occurs due to an if statement, function, procedure call or loop.
program branch result
the next instruction held in the PC is not carried out
Clock speed
Indicates the number of instructions the CPU can process per second.
The clock speed is determined by the system clock. This is an electronic device which generates signals, switching between 0 and 1. All processor activities begin on a clock pulse, and each CPU operation starts as the clock changes from 0 to 1. The clock speed is the time taken for one clock cycle to complete.
Clock speed Unit
Hertz (usually gigahertz)
Positives of increasing clock speed
you can carry out more instructions in a given time; improved performance
Negatives of increasing clock speed
more heat generated meaning computers must be cooled (either with heat sync/fan or water/oil cooling)
Cache memory
Special high speed memory used by a computer. Stores frequently used data and instructions.
Instructions fetched from main memory are copied to the cache, so if required again, they can be accessed quicker. As cache fills up, unused instructions are replaced.
Positives of increasing cache size
less time fetching data; improved performance
A computer with a larger cache is faster because it takes less time to retrieve information from its own memory than if it had to go back and fetch it from remote storage devices like hard drives and RAM.
negative of increasing cache size
expensive
Multiple cores
Multiple CPUs working on a single computer
positives of multiple cores
A core is an independent processor that is able to run its own fetch-execute cycle.
A computer with multiple cores can complete more than one fetch-execute cycle at any given time.
A computer with dual cores can theoretically complete tasks twice as fast as a computer with a single core.
negatives of multiple cores
However, not all programs are able to utilise multiple cores efficiently as they have not been designed to do so, so it is not always possible to make use of multiple cores
Von neumann architechture
This architecture includes the basic components of the computer and processor (single control unit, ALU, registers and memory units) in which a shared memory and shared data bus is used for both data and instructions.
Von Neumann architecture is built on the stored program concept.
Harvard architecture
- has physically separate memories for instructions and data more commonly used with embedded processors. This is useful for when memories have different characteristics i.e. instructions may be read only, while data may be read-write.
- instructions and data are each served by their own buses
Physically separate memories also allows you to optimise the size of individual memory cells and their buses depending on your needs, i.e. the instruction memory can be designed to be larger so a larger word size can be used for instructions.
Parallel processing
Parallel processing is a method in computing of running two or more processors (CPUs) to handle separate parts of an overall task. Breaking up different parts of a task among multiple processors or cores will help reduce the amount of time to run a program as multi core CPUs are able to distribute the workload across multiple CPU cores.
SIMD
(parallel processing, single instruction multiple data) a single processor carries out an instruction on multiple data
MIMD
the MIMD (Multiple Instruction Multiple Data) computer architectures can execute several instructions on multiple data streams.
pipelining
overlapping stages in the fetch-execute cycle.
fetching the next instruction while the first instruction is being decoded
Helps to reduce parts of the processor such as the ALU from being idle.
distributed computing
A form of parallel processing system which spreads the load/problem over multiple computer systems.
A single job is split up into several tasks and each of these is run on a separate computer, coordinated by the operating system in such a way that it appears to be a single system.
pipelining advantages
improves efficiency
pipelining disadvantages
only good if you can predict subsequent instructions. If the wrong instruction is fetched for example if the program branches to a different instruction, it has to be thrown away wasting time.
RISC
reduced instruction set computing. Small Instruction set where each instruction is performed in one clock cycle.
CISC
Complex instruction set computing, large number of instruction each taking multiple machine cycles to carry out.
RISC advantages
- Cheaper to design as smaller in size and requires less silicon.
- Consume less power which means it does not get as hot.
- Easy to install pipelining due to instructions being executed in order and at the same time (single machine cycle) which increases CPU performance.
- Requires less complex hardware which leaves space for more registers and cache.
- Fewer transistors needed means less power and cheaper
- Only takes a single clock cycle
RISC Disadvantages
- For a basic task more code needed (not as many instructions)
- Because there are more lines of code, more RAM is needed to store the assembly level instructions.
- The compiler has to do more work to translate high level code into machine code
GPU
The Graphical processing unit is a form of co-processor.
used for rendering graphics and carrying out a single instruction on multiple pieces of data
Co-processor
a processor designed for specific purposes which can carry out specialised tasks more quickly than a regular microprocessor. execute concurrently with the main CPU
CPU vs GPU
CPUs excel at doing complex instructions on small data sets whereas GPUs excel at simple manipulations to much larger data sets