2.3 Hardware Flashcards
what us a cpu
an electronic device that takes input, processes the data and produces an output
what is a microprocessor
the terms microprocessor and cpu and interchangeable, you usually find them as an integrated circuit on a single microship
what are the components in a CPU (9)
Control Unit
Program Counter
Memory Adress Registers
Memory data register
Arithmetic logic unit
Accumulator
Current Instruction register
cache
decode unit
what is the role of a control unit
coordinates all cpu activities
direct flow of data between cpu and other components ie RAM in both directions so full duplex
coordinates and communicates with all parts of the cpu, all 9 parts
what is the role of the program counter
holds the adress of the next instruction to execute or the adress to jump to, the control unit copies the adress from the PC into the MAR, if the contents of that location is an instruction it goes to the CIR and if its data then it goes to the MDR
what is the role of the MAR
the memory address register stores the address of the memory location where data is to be fetched or written to
sends adress to random access memory down the adress buss which is one direction, to the RAM,
what is the role of the MDR
used to temporarily store one item of data to be fetched or written to memory, all data from main memory must travel down the data bus and pass through the MDR
what is the role of the current instruction register
holds the current instruction to be register, if the MDR is holding an instruction its copied to the CIR
what is the ALU
arithmetic logic unit, does arithmetic operations on fixed and floating point numbers like add substract mutiply and divide, along with binary shift bitwise operations and boolean logic operations so AND OR NOT XOR and comparison
what is the accumulator
of of many general purpose registers in modern CPUS which stores control info and data such as the data produces by the ALU and its calculations for temporary and super quick retrieval
what are the buses between the CPU and main memory RAM
adress bus
control bus
data bus
what does the adress bus do
its uni directional, from the processor to RAM, responsible for carrying memory adresses that identify where data needs to be fetched from which location or written to which location
what does the data bus
bi directional, responsible for carrying the 1s and 0s which make up the information
what does control bus do
bi directional, responsible for carrying control and command signals from and to every component of the cpu, so sends signals to control how data moves around the CPU
what is fixed program computer
a computer where the program is not changeable without rewiring or redesigning and can only perform tasks which it is programmed to do, fo example a calculator
what is a stored program computer
a computer where the program is changeable without rewriring or redesigning so it can perform different tasks rather than one specific task
who is Jon Von Neuman
a mathematicitian and physicist who described the first ever design for modern computers which had stored programming
what is von neuman architecture
a computer consisting of a CPU with a control unit, ALU, a register consisting of a program counter/ MDR/ MAR/ Accumulator, a clock and a cache
what does a clock do
provides a pulse at a constant rate to syncronise components
what is a cache
a small amount of temporay memory making it easier for the computer to fetch data that is commonly used, so it stories copies of data and instructions so its easier to fetch from rather than from RAM
descibe a fetch-decode-execute cycle in a von neuman computer (5)
- the program counter is checked, which is holding the memory adress for the next instruction
- holds the memory adress of the data that needs to be fetched or written to and is brought to the MAR
- the memory data register holds the data adress, while the control unit now decodes and figures out what to do with the data
- the adres in the program counter is now incremented by one, now pointing to the next instruction
- now depending on the data, if can either be executed in the CIR, or written back to RAM, or the control unit jumps to another instruction
describe a full fetch decode execute cycle in a normal computer (8)
Fetch
- the program counter is check for the next address of the instruction
- the memory address is copied into the MDR
- the control unit sends a read signal down the control bus to the main memory
- the main memory now knows that the data needs to be read so it sends the data down the data bus to the MAR
- the program counters address is now incrementedso it points to the next instruction
- the contents of the MAR are now copied to the instruction register (IR or CIR)
Decode
- the instruction register now sends the instruction to the decode unit where the instruction is decoded
Execute
- The instruction is carried out based on the data recieved, this could be fetching new data, writing to main memory, being copied into the ALU due to it being a logical/ arithmatic instruction
what factors affect the speed and performance of a computer
the clock speed
the cache size
the amount of cores
how does the clockspeed affect perfomance
the clockspeed dictates how many cycles are executed persecond, so GHz would be 1 giga hertz per second, so a billion instructions executed per second, the higher the clockspeed, the higher the amount of instructions, the faster the performance