Module#2 ISA
Module#2 ISA
When the data space in the cell = 8 bits then the corresponding address space is When the data space in the cell = word length of CPU then the
called as Byte Address. corresponding address space is called as Word Address.
Based on this data storage i.e. Bytewise storage, the memory chip configuration Based on this data storage i.e. Word wise storage, the memory chip configuration
is named as Byte Addressable Memory. is named as Word Addressable Memory.
For eg. : 64K X 8 chip has 16 bit Address and cell size = 8 bits (1 Byte) which For eg. : For a 16-bit CPU, 64K X 16 chip has 16 bit Address & cell size = 16 bits
means that in this chip, data is stored byte by byte. (Word Length of CPU) which means that in this chip, data is stored word by word.
Big-Endian and Little-Endian
Endianness: Ordering /Sequencing of bytes of a word of digital data into the computer memory.
Little and Big endian are two ways of storing multibyte data-types ( int , float, etc).
1) Big-Endian: Lower byte-addresses are used for the most significant bytes of the word or − In this scheme, high-order byte
is stored on the starting address (A) and low-order byte is stored on the next address (A + 1).
2) Little-Endian: Lower byte-addresses are used for the least significant bytes of the word or In this scheme, low-order byte is
stored on the starting address (A) and high-order byte is stored on the next address (A + 1).
• Consider a 32-bit integer (in hex): 0x12345678 which consists of 4 bytes: 12, 34, 56, and 78.
Hence this integer will occupy 4 bytes in memory.
Assume, we store it at memory address starting 1000. On little-endian, memory will look like
Address Value
1000 78
1001 56
1002 34
1003 12
On big-endian, memory will look like
Address Value
1000 12
1001 34
1002 56
1003 78
• A view of the memory and the register structure , types of data
supported and the ALU operations visible to the programmer is
called the ISA.
• An Instruction is an information that is required by the processor
to execute certain operations such as addition, subtraction, etc.
• The collection of all the Instructions supported by the ISA is
known as the Instruction set of the processor.
Instruction • Elements of an Instruction:
and Operation code
Source operand(s) address
Instruction Destination operand address
Sequencing Next address field
The Source and Destination operands may be :
1. Main or Virtual memory addresses
2. Processor Register
3. I/O device
4. Immediate value
A computer must have instructions capable
of performing 4 types of operations:
Instruction 1) Data transfers between the memory and
and the registers (MOV, PUSH, POP, XCHG).
2) Arithmetic and logic operations on data
Instruction (ADD, SUB, MUL, DIV, AND, OR, NOT).
Sequencing 3) Program sequencing and control (CALL.RET,
LOOP, INT).
(Contd.) 4) I/0 transfers (IN, OUT).
Register Transfer Notation:
The information transformed from one register to another register is
represented in symbolic form by replacement operator.
Assembly Language Register Transfer Meaning
Instruction Notation
Add R1,R2 R2 [R1]+ [R2] Add the contents of register R1 with the
contents of R2 and place the result in R2
Example: X = (A+B)*(C+D)
Addressing Modes
• It refers to the way in which the operand of an
instruction is specified.
• It specifies a rule for interpreting or modifying
the address field of the instruction before the
operand is executed.
• Addressing modes for 8086 instructions are
divided into two categories:
1) Addressing modes for data
2) Addressing modes for branch
• The 8086 memory addressing modes provide
flexible access to memory, allowing you to easily
access variables, arrays, records, pointers, and other
complex data types.
• The key to good assembly language programming
is the proper use of memory addressing modes.
• Immediate addressing mode (symbol
#):In this mode data is present in
address field of instruction .Designed
Addressing like one address instruction format.
Note:Limitation in the immediate mode
is that the range of constants are
modes restricted by size of address field.
(Contd.):
• Register mode: In register addressing
the operand is placed in one of 8 bit or
16 bit general purpose registers.
• The data is in the register that is
specified by the instruction.Here one
register reference is required to access
the data.
Addressing Modes(Contd.)
Register Indirect mode: In this addressing the operand’s offset is placed in any one of the registers.
• The effective address of the data is in the base register or an index register that is specified by the instruction.
Here two register reference is required to access the data.
Auto Indexed (increment mode): Effective address of the operand is the contents of a register specified in the instruction. After
accessing the operand, the contents of this register are automatically incremented to point to the next consecutive memory
location.(R1)+.
Here one register reference,one memory reference and one ALU operation is required to access the data.
Example: