structure and role of processor and its components

Cards (51)

  • What is the ALU?
    Arithmetic Logic Unit
  • What is the CU?
    Control unit
  • What does the ALU Do?
    Performs arithmetic and logical operations.
  • What does the CU do?
    Supervises the FDE cycle and sends/ receives control signals and decodes each instruction
  • What is the clock?
    The clock generates timing signals which is used to synchronise all the tasks in the FDE cycle
  • What is the clock speed?
    How many times the FDE cycle is done per second measured in Hertz (HZ)
  • What are general purpose registers?
    Registres that are used to temporarily store data in the processor
  • What are all the Dedicated registers?
    Program counter (PC)
    Current instruction register (CIR)
    Memory address register (MAR)
    Memory buffer register (MBR)
    Status register (SR)
  • What is the PC register?
    Program Counter which stores the address of the next instruction and increments after every FDE cycle
  • What is the CIR register?
    Current instruction register which stores the instruction currently being executed
  • What is the MAR register?
    Memory address register which stores the address of the data/instruction currently being fetched
  • What is the MBR register?
    Memory buffer register which stores the data that is currently being fetched from memory
  • What is the SR register?
    Status register which stores the current state and flags of the processor/calculation like negative or overflow errors
  • What does the FDE cycle stand for?
    Fetch Decode Execute cycle.
  • What happens in the first step of FDE?
    Fetch:
    1. contents of PC copied to MAR
    2. PC incremented
    3. address bus transfers the contents of MAR to main memory
    4. data at the given memory location transferred CPU from data bus
    5. fetched data stored in the MBR
    6. data transferred to CIR
  • What happens in the second step of FDE?
    Decode:
    The contents of the CIR are decoded by the control unit (CU)
  • What happens in the third step of FDE?
    Execute the instruction that was fetched
  • What are the 2 parts of a command in assmebly code?
    Opcode and Operand
  • What is the opcode?
    Describes what operation is to be carried out (like addition or subtraction)
  • What is the operand?
    Just a piece of data that can be used
  • What is an instruction set?
    A set of commands that a computer's processor can execute. These often differ slightly between processors which is why low level languages can be processor dependent
  • What is an addressing mode?
    Describes whether the operand is an immediate value or the address of a value
  • What is immediate addressing?
    When the operand contains the number for example:
    ADD R1, R2, #3
    The operand is denoted by #3 and # means immediate therefore the operand is just 3
  • What is Direct addressing?
    When the operand contains the address instead of a number eg:
    ADD R1, R2, R3
    The operand is denoted by R3 and instead of being a value, it is an address and the operand is stored in R3
  • What does ADD do in assembly language?
    An example is:
    ADD R0, R1, R2
    This adds the values from R1 and R2 and stores the output into R0
  • What does LDR do in assembly language?
    Load, Fetch a value from memory into a register in the processor
    LDR R0, 100
    This will store data from the memory location 100 into the register 0
  • What does STR do in assembly language?
    store - Copy a value from a register and save it in memory:
    STR R2, 103
    This will store data from the register 2 to the memory location 103
  • What does MOV do in assembly language?
    Moves a value from one register to another:
  • What does SUB do in assembly language?
    SUB R5, R1 #2
    subtracts the value 2 from R1 and stores it into R5
  • In assembly language, the compare and branch operations allow to create selection (if statements) and iteration (loops)
  • The syntax for compare and branch go as follows:
    CMP R3, R5
    B EQ same
    B diff
    First you have to compare 2 values,
    Then Branch (B) with a comparative operation like equal to (EQ)
    with the branch you also have a name of the branch which is where the branch goes to after
    Finally you can have a default branch after
  • The 4 different branches in assembly language are?
    EQ - equal to
    NE - not equal to
    GT - greater than
    LT - less than
  • You can also do bitwise logic in assmebly language like AND, OR, NOT for example:
    AND R0, R1, R2 will do the AND operation on R1 and R2 and store the result into R0
  • Logical shifts in assembly language:
    LSR and LSL will logically shift a binary number right or left with a given value for example:
    LSR R3, R2, #1 will logically shift the value in R2 to the right by 1 and store it into R3
  • In the FDE Cycle there is sometimes a check for interrupts like a division by 0
    When an interrupt happens, the execution must be paused,
    The current state of the CPU and registers are saved on a stack
    The source of interrupt is identified
    The Interrupt service routine (ISR) is called
    The state of processor is restored from the stack
  • What is the ISR?
    The interrupt service routine is a software routine which will take an interrupt and determine the course of action
  • What are all the factors of processor performance?
    Number of Cores,
    Cache memory,
    Clock speed,
    Word length,
    Address bus width,
    data bus width
  • How does the number of cores affect performance?
    With more cores, the CPU can run multiple FDE cycles simultaneously therefore can carry out more instructions at a time increasing performance
  • Why does the number of cores not always increase performance perfectly?
    Because some programs/tasks can not be run in parallel and some tasks require results from other instructions therefore have to wait therefore 4 cores does not mean 4 times faster peformance
  • What is cache memory?
    A small amount of memory located on the CPU which stores frequently used instructions and data