CSIC instruction set - x86
CSIC instruction set - x86
CSIC instruction set - x86
ORGANIZATION AND
SOFTWARE SYSTEMS
SESSION
Prepared By: Prof. 7
Lucy J Gudino
BITS Pilani Instructor: Pradeep H K
Pilani Campus
CISC Instruction Set
(Intel x86 as an
example)
BITS Pilani
Pilani Campus
Today’s Session
• 3 addresses
– Result, Operand 1, Operand 2
– c = a + b; add c, a, b
– May be a forth - next instruction (usually
implicit)
– Needs very long words to hold everything
• 2 addresses
– One address doubles as operand and result
– a = a + b : add a, b
– Reduces length of instruction
– The original value of a is lost.
• 1 address
– Implicit second address
– Usually a register (accumulator)
– Common on early machines
• 0 (zero) addresses
– All addresses implicit
– Uses a stack
– e.g. c = a + b
push a
push b
add
pop c
BITS Pilani, Pilani Campus
Example
• Operation repertoire
– How many ops?
– What can they do?
– How complex are they?
• Data types
• Instruction formats
– Length of op code field
– Number of addresses
• Registers
– Number of CPU registers available
– Which operations can be performed on which
registers?
• Addressing modes BITS Pilani, Pilani Campus
Instruction set Design Decisions
• Operation repertoire
– How many ops?
– What can they do?
– How complex are they?
• Data types
• Instruction formats
– Length of op code field
– Number of addresses
• Registers
– Number of CPU registers available
– Which operations can be performed on which
registers?
BITS Pilani, Pilani Campus
Types of Operand
• Machine instructions operate on data
• General categories of data
• Addresses
• Numbers
• Binary integer or binary fixed point, floating
point, decimal
• Characters
• ASCII etc.
• Logical Data Binary Representation
• Bits or flags 32 16 8 4 2 1
1 0 0 1 0 0
• Packed Decimal
• 36 : 0011 0110
BITS Pilani, Pilani Campus
Byte Ordering
10101101
10101101 Logical
Logical left
left shift
shift (3 10101101=>
bits)
(3 bits) 01101000
10101101
10101101 Arithmetic
Arithmetic right
right shift 10101101=>
shift (3 bits)
(3 bits) 11110101
10101101
10101101 Arithmetic
Arithmetic left
left shift
shift (3 10101101=>
(3 bits)
bits) 11101000
10101101
10101101 Right
Right rotate
rotate (3 bits) 10101101=>
(3 bits) 10110101
10101101
10101101 Left
Left rotate
rotate (3 bits) 10101101=>
(3 bits) 01101101
(1101)2 to ( ? )10 = 1 * 23 + 1 * 2 2 + 0 * 2 1 + 1 * 2 0
=1*8 +1*4 +0*2 +1*1
=8+4+1
= 13
Address space tells you how many distinct locations there are
Addressability tells you how many bits are stored in each location.
OR