unit 1.1

Cards (127)

  • Overview of main internal components of a processor and the buses that connect them to main memory
    1. Gather input via variety of devices
    2. Central processing unit works out what it needs to do
    3. Interacts with main memory reading and writing information
    4. Produces output in the form of visuals, sound, or vibration feedback
  • Control unit
    Responsible for coordinating all the activities of the processor, directs the flow of data between the CPU and other devices, accepts and decodes instructions, handles their execution, and stores results
  • Program counter
    Holds the address of the next instruction in memory which needs to be executed
  • Memory address register
    Holds the address of the memory location from which data or instruction is to be fetched or which data is to be written
  • Memory data register
    Temporarily stores any data which is read from or is about to be written to main memory
  • Current instruction register
    Holds the current instruction actually being executed, containing an op code and an operand
  • Arithmetic logic unit (ALU)

    Performs arithmetic and logical operations on data
  • Accumulator
    One of the general purpose registers that modern CPUs have, used to temporarily hold the results of calculations
  • General purpose registers
    • The more general purpose registers a processor has, the faster it will operate as accessing them is much quicker than reading or writing from main memory
  • Address bus

    Unidirectional bus that carries the memory addresses identifying where data needs to be read from or written to
  • Data bus
    Bidirectional bus that carries the actual binary data being transmitted around the CPU
  • Control bus

    Bidirectional bus that carries command and control signals to and from every other component on the CPU
  • Assembly code
    Low-level language that has a direct one-to-one relationship with the processor architecture, using short 3-4 letter mnemonics
  • Decode unit
    Prepares the execution of an instruction by looking up the binary operation code in its table
  • Status register
    Contains information about various states inside the processor, with individual bits that can be read or written to
  • Clock
    Synchronizes related components by generating pulses at a constant rate, measured in Hertz
  • Interrupt register
    Checked by the CPU to see if an interrupt is awaiting processing, triggering an interrupt service routine
  • Cache
    Small area of memory located close to the CPU that provides fast access to frequently used instructions and data
  • Fetch to code execute cycle

    The process a computer uses to fetch instructions, decode them, and then execute them in a continuous repetitive cycle billions of times a second
  • Computer
    • An electronic device that takes an input, processes data, and delivers output
  • Computer program

    A set of instructions that a computer follows to carry out its function
  • Components of a computer
    • Memory that stores the program
    • Central processing unit (processor) that carries out the instructions
  • Fetch stage
    1. The program counter is checked to get the address of the next instruction
    2. The address is copied into the memory address register
    3. The address is sent along the address bus to main memory
    4. The control unit sends a read signal along the control bus to main memory
    5. The content stored in the memory address is sent along the data bus to the memory data register
    6. The data in the memory data register is copied into the current instruction register
  • Decode stage

    The instruction in the current instruction register is decoded to determine the operation (opcode) and the operand
  • Execute stage
    1. The address specified by the operand is sent to the memory address register
    2. The control unit sends a read signal along the control bus
    3. The content stored at the memory location is sent along the data bus to the memory data register
    4. The content of the memory data register is copied to the accumulator (a general purpose register)
  • The program counter is incremented after each instruction is fetched
  • Branch

    When a program doesn't follow a strict sequential order, but jumps around memory based on certain conditions
  • Branch operation
    1. The opcode in the current instruction register indicates a branch
    2. The program counter is replaced with the contents of the operand in the current instruction register
  • The simple program executed the following steps:
    1. Loaded the contents of memory location 0101 into the accumulator
    2. Added the contents of memory location 0110 to the accumulator
    3. Stored the result in memory location 0111
    4. Outputted the contents of the accumulator
  • Factors affecting the performance of the CPU
    • Clock speed
    • Number of cores
    • Cache size
  • Clock speed
    The number of instruction cycles per second the CPU can execute, measured in Hertz
  • Modern CPUs operate in multiple gigahertz, with one gigahertz representing one billion operations per second</b>
  • Cache

    Temporary storage of instructions and data that have been read from and written to main memory
  • Purpose of cache
    • To avoid getting instructions and data from main memory as much as possible, since it costs time
    • The more instructions and data stored in the local cache, the more efficient the CPU will be
  • CPU cores
    Complete copies of a CPU, allowing multiple programs to run simultaneously
  • The more cores a CPU has, the more communication needs to take place between them to keep everything in sync, which costs time and efficiency
  • Many programs are not designed to make maximum use of multiple cores
  • Chip multi-processor
    A single physical chip containing multiple CPU cores
  • Offloading tasks to specialized processors
    • Improves the overall performance of the main CPU
    • Examples: graphics cards, sound cards
  • Pipelining
    A technique used in processors to improve efficiency by overlapping the different stages of instruction processing (fetch, decode, execute)