What is CPU ?
CPU stands for Central Processing Unit, and it’s the main component of a computer that controls the flow of data and instructions. It also called as brain of a computer that is responsible for executing instructions and performing calculations.

Computer Instruction
- A computer instruction is a binary code that determines the micro operations in a sequence for a computer.
- They are saved in the memory along with the information. Each computer has its specific group of instructions.
- They can be categorized into two elements as Operation codes (Opcodes) and Address

Basic Format of Instruction in CPU
The general size of an instruction is 16 bits
First 12 bits (0-11) are required to define the address
Next 3 bits (12-14) specify operation code (OPCODE)
Last and the leftmost bit defines the addressing mode (I)
If I = 0-> Direct address
If I = 1 -> Indirect address

Components of instructions in a CPU
- Opcode (Operation Code)
- Operand(s)
- Address
- Addressing Mode
- Instruction Length
- Flags
- Control Signals
Opcode (Operation Code)
- The opcode is a binary code that represents the operation to be executed by the CPU.
- It specifies the type of operation, such as arithmetic, logic, data transfer, or control operation.
- Each opcode corresponds to a specific instruction or operation supported by the CPU architecture.
Operand(s)
- An operand is a value or data item that is operated on by an instruction.
- Operands can be constants, variables, register values, or memory addresses.
- Some instructions may have one or more operands, which provide the data to be operated on or specify the memory locations where data is stored.
- Operands can be immediate values (constants embedded within the instruction), register values, or memory addresses.
Address
- An address refers to a specific location in memory where data or instructions are stored.
- Addresses are typically numerical values that uniquely identify each memory location within the system.
- Addresses are used to access or reference data or instructions during program execution.
- In CPU instructions, addresses are often used to specify the location of operands or data in memory that need to be accessed or manipulated.
Addressing Mode:
The addressing mode specifies how the operands of an instruction are interpreted and accessed.
Common addressing modes include:
- Immediate: Operand value is directly specified within the instruction.
- Register: Operand value is stored in a CPU register.
- Direct: Operand value is located at a specific memory address.
- Indirect: Operand value is located at the memory address stored in another memory location.
Instruction Length
- The instruction length indicates the number of bits or bytes required to encode the entire instruction.
- Different CPU architectures may have fixed-length or variable-length instructions
Flags
- Flags are status indicators or condition code bits that reflect the outcome of an instruction’s execution.
- Common flags include zero flag (Z), carry flag (C), sign flag (S), overflow flag (V), etc.
- Flags are typically set or cleared based on the result of arithmetic or logical operations, and they influence subsequent instructions or control flow
Control Signals
Control signals are internal signals generated by the CPU to control various stages of instruction execution, such as instruction fetch, instruction decode, operand fetch, execution, and result write-back.
Control signals coordinate the operation of different functional units within the CPU, such as the instruction decoder, ALU (Arithmetic Logic Unit), register file, and memory interface.
Memory Reference Instructions
In Memory reference instruction:
- First 12 bits(0-I I) specify an address.
- Next 3 bits specify operation code (opcode)(000-110)
- Left most bit specify the addressing mode I
| = 0 for direct address
| = 1 for indirect address

Register Reference Instructions
In Register Reference Instruction:
- First 12 bits(0-11) specify specify the register operation.
- The next three bits equals to 111 specify opcode.
- The last mode bit of the instruction is 0

I/O Reference Instructions
In I/O Reference Instruction:
- First 12 bits (0-11) specify the I/O operation.
- The next three bits equals to 111 specify opcode.
- The last mode bit of the instruction is 1.

Download Notes & Worksheets :
Download Notes | Click here |
Download Worksheet | Click here |
Leave a Reply