Recall: mechanical representation of a computer

The Computer (= the CPU) can execute 3 types of instructions

The basic types of instructions that the CPU (= computer) can execute are:

  1. Data moving (copying) instructions:

      • Transfer (= copy) data between a (general purpose) register and 1,2 or 4 memory bytes

  2. Arithmethic/logic/shift instructions:

      • Performs an arithmethic/logic/shift operation on some operands in registers and store the result in a register

  3. Branching instructions:

      • Updates the program counter causing the program execution to "jump/branch" (out-of-order program flow !)

Note:   for brevity, from now on "register" means: general purpose register (unless stated otherwise) !

Reduced Instruction Set Computers - (RISC)

  • A Reduced Instruction Set computer (CPU) is

      • A computer that only has the 3 basic types instructions

        (I.e.: move data, arithmetic/logic operation and branching)

  • RISC processors usually have fixed size instruction length

  • The ARM processor that we will study in CS255 is a RISC (Reduced Instruction Set Computer)
    ARM's Instruction length = 4 bytes each

  • Devices that use the ARM processor:

      • (All) cellphones, (all) tablets

      • The new Apple M1 line of PCs and desktops

Complex Instruction Set Computers - (CISC)

  • CISC computers (CPU) provide additional more complex instructions that execute 2 (or more) basic instructions

    Example: a single CISC instruction can add data stored in memory by executing:

      1. A move data instruction that fetch the data from memory into a register followed by
      2. An add instruction that add the fetched data with another register

  • CISC processors usually have variable size instruction lengths

      • Some CISC instructions uses 2 bytes
      • Some other CISC instructions will use 4 bytes           
      • Yet other CISC instructions will use 6 bytes
      • Etc, etc

  • The INTEL x86 processor is a CISC