ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCOMP3147Instruction Set Archit…
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    COMP3147

    Computer Architecture

    Progress0 / 24 done
    Topics24
    1Transistors and Digital logic2Hardware description languages (Verilog)
    3Instruction types and mixes4Addressing modes5RISC vs. CISC architectures6Exceptions in instruction sets
    7Data dependencies8Static scheduling9Pipeline performance analysis
    10Local scheduling11Loop unrolling and Software pipelining12Trace scheduling13Deferred exceptions and Predicated execution14IA64 architecture
    15Dynamical scheduling16Register renaming17Speculative execution18Trace cache
    19Cache coherency20Sequential consistency21Multithreading22Symmetric multiprocessing23Transactional memory
    24GPU programming
    4 min read
    Topic 3 of 24
    Topic Study Note Illustration
    03

    Instruction Set Architecture: 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 .

    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 view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    4mremaining
    705words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Computer Architecture