An Instruction Set

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

An instruction set, or instruction set architecture (ISA), is the part of the computer architecture related

to programming, including the native data types, instructions, registers,addressing modes, memory
architecture, interrupt and exception handling, and external I/O. An ISA includes a specification of the
set of opcodes (machine language), and the native commands implemented by a particular processor.

computer architecture is a set of rules and methods that describe the functionality, organization, and
implementation of computer systems.

computer architecture involves instruction set architecture design, microarchitecture design, logic
design.

ISA serves as the interface between software and hardware.

ISA supports the machine language data types .

Some virtual machines that support bytecode as their ISA such as Smalltalk, the Java virtual machine,
and Microsoft's Common Language Runtime, implement this by translating the bytecode for commonly
used code paths into native machine code.

Bytecode, also termed portable code or p-code, is a form of instruction set designed for efficient
execution by a software interpreter. Unlike human-readable source code, bytecodes are compact
numeric codes, constants, and references (normally numeric addresses) that encode the result of
compiler parsing and semantic analysis of things like type, scope, and nesting depths of program
objects. They thus allow much better performance than interpreting source code directly.
Other type of ISA

Other types include very long instruction word (VLIW) architectures, and the closely related
long instruction word (LIW) and explicitly parallel instruction computing (EPIC) architectures.
These architectures seek to exploit instruction-level parallelism with less hardware than RISC
and CISC by making the compiler responsible for instruction issue and scheduling.

Architectures with even less complexity have been studied, such as the minimal instruction set
computer (MISC) and one instruction set computer (OISC). These are theoretically important
types, but have not been commercialized.

Instruction types

Examples of operations common to many instruction sets include:

Data handling and memory operations

 Set a register to a fixed constant value.


 Copy data from a memory location to a register, or vice versa (a machine instruction is
often called move; however, the term is misleading). Used to store the contents of a
register, result of a computation, or to retrieve stored data to perform a computation on it
later. Often called load and store operations.
 Read and write data from hardware devices.

Arithmetic and logic operations

 Add, subtract, multiply, or divide the values of two registers, placing the result in a
register, possibly setting one or more condition codes in a status register.
o increment, decrement in some ISAs, saving operand fetch in trivial cases.
 Perform bitwise operations, e.g., taking the conjunction and disjunction of corresponding
bits in a pair of registers, taking the negation of each bit in a register.
 Compare two values in registers (for example, to see if one is less, or if they are equal).
 Floating-point instructions for arithmetic on floating-point numbers.

Control flow operations

 Branch to another location in the program and execute instructions there.((Branch (or
branching, branched) may also refer to the act of switching execution to a different instruction
sequence as a result of executing a branch instruction.)
 Conditionally branch to another location if a certain condition holds.
 Indirectly branch to another location.
 Call another block of code, while saving the location of the next instruction as a point to
return to.

Coprocessor(A coprocessor is a computer processor used to supplement the functions of the primary
processor (the CPU).) instructions
 Load/store data to and from a coprocessor, or exchanging with CPU registers.
 Perform coprocessor operations.

Complex instructions

Processors may include "complex" instructions in their instruction set.

A single "complex" instruction does something that may take many instructions on other
computers.] Such instructions that take multiple steps, control multiple
functional units, or otherwise appear on a larger scale than the bulk of simple instructions
implemented by the given processor. Some examples of "complex" instructions include:

 transferring multiple registers to or from memory (especially the stack) at once


 moving large blocks of memory (e.g. string copy or DMA transfer)
 complicated integer and floating-point arithmetic (e.g. square root, or transcendental
functions such as logarithm, sine, cosine, etc.)
 SIMD(Single instruction, multiple data (SIMD),It describes computers with multiple processing
elements that perform the same operation on multiple data points simultaneously.)
instructions, a single instruction performing an operation on many homogeneous values
in parallel, possibly in dedicated SIMD registers
 performing an atomic test-and-set(In computer science, the test-and-set instruction is an
instruction used to write 1 (set) to a memory location and return its old value as a single atomic
(i.e., non-interruptible) operation.) instruction or other read-modify-write atomic instruction
 instructions that perform ALU operations with an operand from memory rather than a
register.

Complex instructions are more common in CISC instruction sets than in RISC instruction sets,
but RISC instruction sets may include them as well. RISC instruction sets generally do not
include ALU operations with memory operands, or instructions to move large blocks of memory,
but most RISC instruction sets include SIMD or vector instructions that perform the same
arithmetic operation on multiple pieces of data at the same time. SIMD instructions have the
ability of manipulating large vectors and matrices in minimal time. SIMD instructions allow easy
parallelization of algorithms commonly involved in sound, image, and video processing.

=====================================================================

You might also like