CS AS CPU Architecture + Assembly + Bit Manip.

Cards (43)

  • Von Neumann model

    Main principles:
    • a CPU
    • a processor able to access memory directly
    • computer memories that could store programs & data
    • stored programs made up of instructions that could be executed in sequential order
  • Components of the CPU
    • Arithmetic Logic Unit (ALU)
    • Accumulator (Acc)
    • Control Unit (CU)
    • System Clock
    • Immediate Access Store (IAS)
    • Registers
    • Current Instruction Register (CIR)
    • Index Register (IX)
    • Memory Address Register (MAR)
    • Memory Data/Buffer Register (MDR/MBR)
    • Program Counter (PC)
    • Status Register (SR)
  • Address bus
    Carries addresses throughout computer system, unidirectional from CPU to memory only
  • Data bus
    Carries data throughout computer system, bidirectional
  • Control bus
    Carries signals from CU to all other computer components, bidirectional
  • System clock
    Synchronizes each cycle which synchronizes all computer operations
  • Increasing clock speed increases processing speed of computer
  • Cache memory
    • Stores frequently used instructions & data that need to be accessed faster
    • Volatile storage using SRAM
    • No refreshing needed so faster access times
    • Processor first reads cache memory, then main memory
  • Cores
    • One core made up of ALU, CU, and registers
    • Using more cores alleviates need to continually increase clock speeds
    • Increasing number of cores doesn't necessarily increase computer performance
  • USB port
    • USB is an asynchronous, serial data transmission method
    • Computer auto detects when a device is present due to signal change in voltage level on data signal wires in cable
    • Device auto recognised and appropriate device driver loaded up so computer and device can communicate
  • Pros of USB
    • Device plugged into computer auto detected
    • Drivers and software loaded
    • Industry standard, widely supported
    • Maximum cable length 5m
  • Cons of USB
    • Connectors only fit one way, prevents incorrect connections
    • Old USB standards (1.0) may not be supported
    • Maximum cable length 5m
  • HDMI port
    • Allows both audio and video output from computer to HDMI-enabled device
    • Supports high-definition signals
    • Replaced VGA (Video Graphics Array) analogue system
    • Offers anti-piracy protection using HDCP (High-bandwidth Digital Content Protection)
  • Pros of HDMI
    • Common standard, easy to use
    • Allows very fast data transfer rate
    • Improved security
    • Supports modern digital systems
  • Cons of HDMI
    • Easy to break connection by moving device; not very robust
    • Limited cable length, can degrade signal
  • VGA port
    • Supports 640x480 screens
    • Supports up to 60 Hz refresh rates
    • Supports only 16 colours, 256 colours supported only with 800x600 screens
    • Analogue technology
  • Pros of VGA
    • Simpler technology
    • Only one standard-compatible
    • Easy to split signal and connect number of devices from one source
    • Connection very secure
  • Cons of VGA
    • Outdated analogue technology
    • Easy to bend pins when making connection
    • Cables must be very high grade to ensure good undistorted signal
  • To execute a set of instructions
    1. Processor first fetches data & instructions from memory & in cache Registers
    2. Both address and data busses are used in this process
    3. Each instruction then needs to be decoded before being executed
  • Robust
    Strong & healthy
  • VGA Port
    Video Graphics Array
  • VGA
    • Supports 640x480 screens
    • Supports up to 60 Hz refresh rates
    • Supports only 16 colours
    • 256 colours supported only with 800x400 screens
  • VGA
    Analogue technology
  • PROS of VGA
    • Simpler technology
    • Only one standard-compatible
    • Easy to split signal and connect number of devices from one source
    • Connection very secure
  • CONS of VGA
    • Outdated analogue technology
    • Easy to bend pins when making connections
    • Cables must be very high grade to ensure good undistorted signal
  • To execute a set of instructions
    1. Processor first fetches data & instructions from memory
    2. Instruction is decoded before being executed
    3. Next instruction fetched from memory address currently stored in PC
    4. Instruction is stored in the CIR
    5. PC is incremented
    6. Instruction is decoded
    7. Processor executes decoded instruction as set of control signals to appropriate system components
  • Processor possesses decoded instruction as set of control signals to appropriate system components
  • Fetch
    1. Contents of PC copied into MAR
    2. Data stored at address in MAR copied into MDR
    3. Contents of MDR copied into CIR
  • Interrupt
    1. Interrupt is a signal sent from device or program to processor
    2. Processor will temporarily stop what it's doing
    3. Interrupts can be caused by various events
    4. Based on the priority of the interrupt, the processor either services it or ignores it
    5. When an interrupt is serviced, status of current task being run is saved
  • Interrupts allow computers to multitask
  • Machine code
    Binary code that the CPU only understands
  • Opcode
    Identifies operation to be carried out by CPU
  • Operand
    Identifies data to be used by opcode
  • Assembler
    1. Translates each assembly language instruction into machine code
    2. Checks syntax to ensure only valid machine code instructions are used
    3. Single pass assembler puts machine code instructions straight to computer memory to be executed
    4. Two pass assembler produces complete program in machine code that can be stored and executed at a later stage
  • Steps in two-pass assembler

    • Read assembly program one line at a time
    • Ignore anything not required, like comments
    • Allocate memory address for each piece of code
    • Check that opcode is in instruction set
    • Add any new labels to symbol table with address
    • Place address of labeled instruction in symbol table
    • Generate direct code, including opcode & operand, from symbol table generated in Pass 1
    • Save or load program
  • Data movement instructions
    • LDM, LDD, LDI, LDX, LDR, MOV, STO, END
  • I/O instructions
    • IN, OUT
  • Arithmetic operation instructions
    • ADD, SUB, INC, DEC
  • Jump instructions
    • JMP, JPZ, JPN, END
  • Jump
    Change PC to address specified, so the next instruction to be executed is the one stored at the specified address