ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Computer Architecture
    COMP3147
    Progress0 / 24 topics
    Topics
    1. Digital Hardware Design: Transistors and Digital logic2. Hardware description languages (Verilog)3. Instruction Set Architecture: Instruction types and mixes4. Addressing modes5. RISC vs. CISC architectures6. Exceptions in instruction sets7. Scalar Pipelines: Data dependencies8. Static scheduling9. Pipeline performance analysis10. VLIW Pipelines: Local scheduling11. Loop unrolling and Software pipelining12. Trace scheduling13. Deferred exceptions and Predicated execution14. IA64 architecture15. Dynamic Pipelines: Dynamical scheduling16. Register renaming17. Speculative execution18. Trace cache19. Thread-Level Parallelism: Cache coherency20. Sequential consistency21. Multithreading22. Symmetric multiprocessing23. Transactional memory24. Data-Level Parallelism: GPU programming
    COMP3147›Instruction Set Architecture: Instruction types and mixes
    Computer ArchitectureTopic 3 of 24

    Instruction Set Architecture: Instruction types and mixes

    4 minread
    705words
    Beginnerlevel

    Instruction Set Architecture (ISA): Instruction Types and Mixes

    The Instruction Set Architecture (ISA) is the interface between hardware and software. It defines how the processor understands and executes instructions.


    1. What is Instruction Set Architecture (ISA)?

    Definition

    Instruction Set Architecture (ISA) is the formal specification of the instructions supported by a CPU, including the data types, registers, memory architecture, addressing modes, instruction formats, and behavior of each instruction.

    It acts as a contract between software and hardware.

    Examples of ISAs:

    • RISC-V
    • ARM
    • x86
    • MIPS
    • PowerPC

    2. Instruction Types (Categories of Instructions)

    Instructions in an ISA are grouped based on the kind of operation they perform. These categories help in understanding how programs behave and how hardware should be optimized.

    The major instruction types are:


    1. Data Transfer Instructions

    Definition

    These instructions move data between memory, registers, and I/O devices.

    Examples:

    • Load (LD) – Copy data from memory → register
    • Store (ST) – Copy data from register → memory
    • Move (MOV) – Register ← Register
    • Push/Pop – Stack operations

    These instructions often dominate program execution.


    2. Arithmetic Instructions

    Definition

    Instructions that perform mathematical operations on data.

    Examples:

    • Add (ADD)
    • Subtract (SUB)
    • Multiply (MUL)
    • Divide (DIV)
    • Increment/Decrement (INC/DEC)

    Used heavily in numerical and scientific computations.


    3. Logical Instructions

    Definition

    Instructions that perform bitwise logical operations.

    Examples:

    • AND
    • OR
    • NOT
    • XOR
    • SHIFT LEFT/RIGHT (logical or arithmetic)

    Logical instructions are widely used in:

    • Masking operations
    • Data manipulation
    • Condition checking

    4. Control Flow Instructions

    Definition

    Instructions that alter the sequence of execution in a program.

    Examples:

    • Jumps (JMP)
    • Branches (BEQ, BNE, BGT, etc.)
    • Function calls (CALL, BL)
    • Returns (RET)
    • Conditional branches

    These instructions are crucial for loops, decision-making, and function calls.


    5. Input/Output (I/O) Instructions

    Definition

    Instructions used for communication between processor and external devices.

    Examples:

    • IN
    • OUT
    • Port read/write
    • Memory-mapped I/O accesses

    Modern ISAs often integrate I/O with load/store instructions.


    6. Floating-Point Instructions

    Definition

    Instructions designed to perform operations on floating-point numbers using a floating-point unit (FPU).

    Examples:

    • FP Add/Subtract
    • FP Multiply/Divide
    • FP Compare

    Used in simulations, graphics, scientific computing.


    7. Special Purpose Instructions

    These include:

    • System calls (SYSCALL)
    • Interrupt handling instructions
    • Cache control (flush, invalidate)
    • SIMD instructions (MMX, SSE, AVX)
    • Bit manipulation

    These instructions support advanced OS and performance features.


    3. Instruction Mix

    Definition

    The instruction mix refers to the percentage distribution of different instruction types executed in a particular program or workload.

    It tells us:

    • Which instructions are used more frequently
    • How the CPU should allocate resources
    • What hardware optimizations matter most

    Importance of Instruction Mix

    Understanding instruction mix helps in:

    • Designing efficient pipelines
    • Optimizing performance
    • Improving compiler behavior
    • Balancing CPU resources for typical workloads

    Example: If 50% of instructions are loads, the CPU should have:

    • Faster memory system
    • Multiple load/store units

    Typical Instruction Mix in Real Programs

    Although exact proportions vary across applications, a generalized “typical mix” is often:

    Instruction Type Typical Percentage
    Data Transfer 30–50%
    Arithmetic/Logical 20–30%
    Control Flow 10–20%
    Floating-Point 5–10% (high in scientific apps)
    Other/Special 5–10%

    Key point: Load/Store instructions are the most frequently executed.


    Instruction Mix Example

    Consider a program with the following instruction counts:

    • 500 Loads/Stores
    • 300 Arithmetic/Logical
    • 150 Branches
    • 50 Floating-point

    Total = 1000 instructions

    The instruction mix will be:

    • Loads/Stores: 50%
    • Arithmetic/Logical: 30%
    • Branches: 15%
    • Floating-point: 5%

    This example illustrates how engineers analyze workloads.


    Why Instruction Mix Matters in Computer Architecture

    1. Pipeline Design

      • Need branch prediction if many branches
      • Need powerful ALUs if arithmetic-heavy
    2. Parallel Execution Units

      • More load/store units for load-heavy programs
    3. Power Optimization

      • Know which parts of the chip are active most
    4. Compiler Optimizations

      • Compilers reorder instructions to balance load
    5. Performance Modeling

      • CPI (Cycles Per Instruction) depends on the mix

    4. Instruction Frequency and Performance

    Instruction mix interacts with performance metrics like:

    • CPI (Cycles Per Instruction)
    • IPC (Instructions Per Cycle)
    • Execution time

    If branch instructions are frequent, branch mispredictions will significantly affect performance.

    Thus, architects analyze the mix to design efficient CPUs.


    Summary (Exam-Friendly Points)

    • ISA defines the set of instructions and architectural features of a CPU.
    • Instruction types include data transfer, arithmetic, logical, control flow, I/O, floating-point, and special instructions.
    • Instruction mix is the distribution of different instruction types in a program.
    • Instruction mix helps in designing efficient processors and optimizing performance.
    • Typical mixes show load/store instructions dominate execution frequency.

    Previous topic 2
    Hardware description languages (Verilog)
    Next topic 4
    Addressing modes

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time4 min
      Word count705
      Code examples0
      DifficultyBeginner