1.1.1

Cards (16)

  • What does the CPU do?
    Processes instructions and data
  • What is the fetch-decode-execute cycle briefly?
    ·       The CPU fetches instructions or data from the main memory and brings them back to the CPU
    ·       It then decodes the instructions to figure out what it needs to do
    ·       It then executes the instruction. This could be -
    ·       Going back to the main memory and grabbing some data
    ·       Performing a calculation
    ·       Storing information back into the main memory
  • In the Von Neumann architecture program instructions and the data the programs are using are both stored in the same memory unit. The CPU accesses both instructions and data from the same RAM .
  • Registers are small amounts of high-speed memory contained within the CPU. They temporarily hold tiny bits of data
  • Cache is a small amount of high speed random access memory (RAM) built directly within the CPU. However, it is slower to access than the registers. It stores regularly used data so that the CPU can access it quickly. There are different levels of cache.
  • The control unit coordinates and controls all of the activities taking place within the CPU:
    • Fetches, decodes and executes the instructions
    • Controls the flow of data inside the CPU(to registers, ALU, cache) and outside the CPU(to main memory and i/o devices)
    • Receives signals from the system clock
  • The ALU has two main functions:
    • Performs arithmetic calculations (+, -, /, * etc.) and logical operations (AND, OR, NOT).
    • It acts as a gateway between primary memory and secondary storage. Data transferred between them passes through the ALU.
    • Contains the accumulator register
  • The main components of the CPU are the Control Unit, the Arithmetic Logic Unit, the Registers and the Cache
  • What are the 4 registers?
    Program counter (PC)
    Memory address register (MAR)
    Memory data register (MDR)
    Accumulator (ACC)
  • The Program Counter holds the address of the next instruction to be executed. The Program Counter is incremented (increased by 1) as soon as that instruction has been fetched
  • The accumulator (ACC) is where arithmetic and logic results are temporarily stored
  • The MAR knows where to look in RAM (the address) of the piece of data or program to be fetched from memory
  • The MDR keeps hold of data until it’s ready to be used by the CPU (the data or instruction)
  • Fetch with registers
    1. Copy memory address from the PC to the MAR
    2. Increment the PC ready for next cycle
    3. MAR locates address and requires MDR to transport
  • Decode with registers
    The instruction in the MDR is decoded by the CU. The CU may then prepare for the next step
    .E.g. Loading values into the MAR or MDR
  • Execute with registers
    The instruction is performed. This could be:
    Loading data from memory
    Write data to memory
    Do a calculation or logic operation and hold it in the ACC
    Change the address in the PC
    Halt the program