Unit 1- Computer Science

Subdecks (4)

Cards (50)

  • Purpose of the CPU:
    • The CPU processes instructions
    • When you run a program, it is the CPU which runs the instructions
    • It is often thought of as being the ‘brains’ of the computer
    • A CPU simply runs one simple instruction at a time
    • It carries out billions of instructions per second
  • Stored program concept:
    • Before 1943, early computers stored data in memory but not the program
    • In 1943-44, the stored-program computer concept was introduced by von Neumann and colleagues
  • Von Neumann architecture:
    • Program instructions and data are stored in the same memory
    • The CPU accesses both instructions and data from the same RAM
  • Components of the CPU:
    • The CPU has two major components: Control Unit and Arithmetic-Logic Unit (ALU)
    • Registers are used to carry out operations
    • Registers are very fast memory locations in the CPU
    • Cache is located on the CPU, slower to access than registers but faster than RAM
  • Registers in the CPU:
    • Program Counter (PC) holds the address of the next instruction to be executed
    • Memory Address Register (MAR) holds the memory address of the current instruction and data
    • Memory Data Register (MDR) holds the actual instruction and fetched data
    • Accumulator holds the result of an instruction before transferring to memory
  • Control Unit:
    • Coordinates and controls all activities within the CPU
    • Decodes and executes instructions
    • Directs timing and control of other CPU parts
  • Arithmetic Logic Unit:
    • Where arithmetic and logical operations are done
    • Performs operations like AND, OR, and NOT
  • Processor architecture:
    • ACC (Accumulator) temporarily stores arithmetic results
    • ALU (Arithmetic Logic Unit) performs calculations and logic expressions
    • MDR (Memory Data Register) stores data to be sent/received from memory
    • PC (Program Counter) points to the next instruction
    • MAR (Memory Address Register) stores the address of the instruction to be executed
  • FDE cycle
    • Fetch: next instruction and data fetched from main memory
    • Decode: instruction decoded
    • Execute: instruction is executed
    • Process is repeated