Computer Architecture and Peripherals
Computer Architecture and Peripherals
Instruction Sets
Unit 4 Instruction Sets
• Characteristics and Functions-machine instruction
characteristics
• Types of operands
• Characteristics of Instruction set
• Instruction format of different microprocessors
• Reduced instruction set computer (RISC).
• Complex Instruction Set Computer (CISC)
• Comparison of RISC and CISC parallel processing.
11/08/2024 05:12 PM 2
Instruction Sets
• An instruction set is a collection of instructions or
commands that a computer processor can
understand and execute.
• These instructions are represented as binary codes
that are stored in memory and are fetched by the
processor to perform a specific operation.
• Each instruction in the instruction set represents a
specific operation that the processor can perform,
such as arithmetic operations, logical operations,
memory operations, and control operations.
11/08/2024 05:12 PM 3
Instruction Sets
• The instruction set architecture (ISA) defines the
specifications and formats of the instructions in the
set, including the number of operands, the size of the
operands, and the order of execution.
• The instruction set is a fundamental component of a
computer's architecture and determines the type
and range of operations that the processor can
perform.
11/08/2024 05:12 PM 4
Elements of an Instruction
Each instruction must have elements that contain the information
required by the CPU for execution. These elements are as follows.
• Operation code: Specifies the operation to be performed (e.g.,
ADD, I/O). The operation is specified by a binary code, known as
the operation code, or opcode.
• Source operand reference: The operation may involve one or
more source operands, that is, operands that are inputs for the
operation.
• Result operand reference: The operation may produce a result.
• Next instruction reference: This tells the CPU where to fetch the
next instruction after the execution of this instruction is complete.
Cont..
The next instruction to be fetched is in main memory or, in the case of a
virtual memory system, in either main memory or secondary memory (disk).
In most cases, the next instruction to be fetched immediately follows the
current instruction. In those cases, there is no explicit reference to the next
instruction.
Source and result operands can be in one of three areas:
• CPU register: With rare exceptions, a CPU contains one or more registers
then each register is assigned a unique number, and the instruction must
• I/O device: The instruction must specify (the I/O module and device for
the operation. If memory mapped I/O is used, this is just another main or
Types of Operands
• 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.
• Opcodes specify the operation for specific instructions, and an address determines the registers
• Operands are definite elements of computer instruction that show what information is to be
1. Addresses
2. Numbers
3. Characters
4. Logical data
1. Addresses:
• Addresses are nothing but a form of data. Here some calculations
must be performed on the operand reference in an instruction,
which is to determine the physical address of an instruction.
2. Numbers:
• All machine languages include numeric data types. Even in non-
numeric data processing, numbers are needed to act as counters,
field widths, etc. An important difference between numbers used in
ordinary mathematics and numbers stored in a computer is that the
latter is limited. Thus, the programmer is faced with understanding
the consequences of rounding, overflow and underflow.
3. Characters:
• A common form of data is text or character strings. While textual
data are most convenient for humans. But computers work in
binary. So, all characters, whether letters, punctuation or digits, are
stored as binary numbers. All of the characters that a computer can
use are called character sets. Here are the two common standards,
such as:
• Unicode
4. Logical data
• Normally, each word or other addressable unit (byte, half-word, and so on)
unit consisting of 1-bit items of data, each item having the value 0 or 1.
When data are viewed this way, they are considered to be logical data.
• The Boolean data can only represent two values: true or false. Although
only two values are possible, they are rarely implemented as a single binary
true. Boolean data refers to the logical structure of how the language is
• 1. Addressing Mode
• The data is represented in the instruction format with the help of addressing mode
• The data can either be stored in the memory of a computer or it can be located in the register
of the CPU
• The operation code gives instructions to the processor to perform the specific Operation
• 3. OPERAND
• It is the part of the instruction format that specifies the data or the address of the data
• Depending upon the processor of the computer the instruction format contains zero to three
For example, the instruction
ADD R, Y
• (R <--R + Y ) may mean add the value contained in data
location Y to the contents of register R.
• In this example, Y refers to the address of a location in
memory, and R refers to a particular register.
• Note that the operation is performed on the contents of
a location, not on its address.
Format Of Instruction
• The set of instructions that manages the operation codes is called
the format of instruction.
• The design of bits in instruction is supported by the format of
instruction.
• The length of instruction is generally preserved in multiples of
character, which is 8 bits.
• The instruction format determines the behavior and complexity of
instruction.
• Depending upon the number of addresses, the format of
instruction is of variable length.
Types of instruction format include:
• Zero(0) Address Instruction format
• One(1) Address Instruction format
• Two(2) Address Instruction format
• Three(3) Address Instruction format
1. Zero(0) Address Instruction format
• The instruction format in which there is no address
field is called zero address instruction
• In zero address instruction format, stacks are used
• In zero order instruction format, there is no operand
Example:
• Assembly language instruction – PUSH A, PUSH B etc.
• Stack transfer operation – TOS <- A, TOS <- B etc.
2. One(1) Address Instruction format
• The instruction format in which the instruction uses only one address field
is called the one address instruction format
Example:
• This type of instruction format is the most commonly used instruction format
• As in one address instruction format, the result is stored in the accumulator only,
but in two addresses instruction format the result can be stored in different
locations
Example:
Example:
• 1. Data transfer instructions: These instructions move data between memory and
instructions include ADD (addition), SUB (subtraction), MUL (multiplication), and DIV
• The type and number of instructions included in an instruction set depend on the
application.
Types of Operation in Instruction Set
An instruction set architecture (ISA) may support different types of operations,
depending on the intended application and the architecture of the processor. Here
registers or memory. Examples include logical AND, logical OR, logical XOR, and
logical NOT.
instructions.
numbers.
Functions of Instruction Set
The instruction set architecture (ISA) is a critical component of a computer system,
and the functions of an instruction set are to define the capabilities and behavior of
the processor. Here are some of the primary functions of an instruction set:
• Define the instruction format: The instruction set defines the format of
instructions, including the opcode (operation code) and any operands required for
the instruction. This allows the processor to decode and execute instructions
correctly.
• Define the instruction set encoding: The instruction set also defines the encoding
format. This includes the number of bits used for each part of the instruction and
the meaning and behavior of each instruction. This includes the types of
the processor.
characteristics of an ISA:
• Word size: The word size defines the number of bits used to represent data
in the processor's registers and memory. Common word sizes include 8-bit,
used for each part of the instruction and the order in which the bits are
Characteristics of Instruction set
• Number of registers: The number of registers available to the processor can
affect its performance and capabilities. More registers can reduce the need
define how the processor accesses memory to fetch or store operands for
byte word are stored in memory. Little-endian systems store the least
significant byte first, while big-endian systems store the most significant
Characteristics of Instruction set
• Instruction format: The instruction format defines the structure of
specific tasks.
ISA Classification
• Complex Instruction Set Computer(CISC)
• Reduced Instruction Set Computer(RISC)
11/08/2024 05:12 PM 32
Reduced Instruction Set Architecture (RISC)
time than RISC processors, so they have a larger user base and
Disadvantages of CISC
1.Slower execution: CISC processors take longer to execute instructions
because they have more complex instructions and need more time to
decode them.
Can perform only Register to Register Can perform REG to REG or REG to MEM
Arithmetic operations or MEM to MEM
An instruction fit in one word. Instructions are larger than the size of
one word
The number of instructions are less as The number of instructions are more
compared to CISC. as compared to RISC.
RISC CISC
Here, Addressing modes are less. Here, Addressing modes are more.