CPU 1.1 Flashcards
what is a computer
a machine that takes data, processes it and outputs it
what does CPU stand for
-central processing unit
purpose of the CPU
-to fetch, decode and execute instructions
-take an input, process data and produce an output
what is hardware
-the physical parts that makes up your computer system
what is software
-software is the programs or applications that a computer system runs
what are embedded systems
a computer system with a single function, inside a larger mechanical unit
examples of embedded systems
washing machines, dishwasher
benefits of embedded systems
-far smaller than general computers
-cheaper to produce
-more reliable than general computers
what is the control unit
-sends signals to control how data moves around the CPU and to other parts of the computer system
-decodes instructions, allowing for the fetch decode execute cycle
what is the arithmetic logic unit
-performs arithmetic operations
examples of what the ALU does
-completes simple addition and subtraction, compares the size of numbers and can do multiplications and divisions using repeated addition and subtraction
-performs logic operations and binary shifts
where is the accumulator
in the ALU
what is the cache and how does the CPU use it
-very small, very fast memory in the CPU
-stores frequently used data and instructions so the CPU can access it quickly the next time it is needed.
-CPU can access data stored in the cache much faster than if retrieved from RAM
what happens when the CPU requests data
-When the CPU requests data, it checks the cache first to see if the data is there. If not, it will fetch it from the RAM
what are the different levels of caches
L1, L2 and L3.
-L1 is the quickest but has the lowest capacity
-L2 is slower than L1 but can hold more
-L3 is slower than L2 but can hold more
what is von neumann architecture
-it describes a system where the CPU runs programs stored in memory. Programs consist of instructions and data when are stored in the memory addresses
what is the program counter
-it holds the memory address of the next instruction to be executed in memory
what is the accumulator
-it stores intermediate results of calculations in the ALU
what is the MAR
-the memory address register holds any memory address about to be used by the CPU. The address might point to data or a CPU instruction
what is the MDR
-the memory data register holds the actual data or instruction. This may have been fetched from memory, or be waiting to be written to memory
what is the fetch stage
-copy memory address from the program counter to the MAR
-instruction is fetch from the memory/ the address in the MAR
-copy the instruction stored in the MAR address to the MDR
-increment the program counter to point to the address of the next instruction, ready for the next cycle
what happens at the decode stage
-the instruction in the MDR is decoded by the CPU. The CU may then prepare for the next step(e.g. by loading values into the MAR or MDR
what happens at the execute stage
-the instruction is performed
This could be:
-loading data from memory
-writing data to memory
-doing a calculation or logic operation (using the ALU)
-changing the address in the PC, or halt the program
what factors affect CPU performance
-clock speed
-number of cores
-cache size