Professional Documents
Culture Documents
Instruction Sets:
Characteristics and Functions
Taken from William Stallings Computer Organization and Architecture 8th Edition
Types of Operations
Byte Ordering
Instruction set
Collection of the instructions of a computer.
May include:
Source operands: specify where operands come from.
void main(){
int a,b,c; main: 0567
c = a+b;} ADD c,a,b
design decision.
More addresses
Fewer addresses
More complex instructions
Less complex instructions
More registers
More instructions per program
Inter-register operations
Faster fetch/execution of
are quicker
instructions
Fewer instructions per program
Data Transfer
I/O
Arithmetic
System Control
Logical
Transfer of Control
Conversion
PUSH source
POP destination
DEC destination
CPU
CPU
CX 192 CX 191
MUL source
Source: can be register or memory location
CPU
CPU
BX 96
0 96 AX 960(03C0H)
03H C0H
AX 10
0 10
4/10/2016 MEQUANENT ARGAW, DMU 16
LOGICAL
CPU CPU
BX 96(60H)
BX 96 (60H)
CX 32(20H)
CX 191(BFH)
Skip instructions
Procedure:
CX=CX-32;
e.g. SUB CX, 32
Sub();
CALL sub
sub: Void sub()
MOV BX, 10 {
RET BX=10;
}
Let sub indicates the address 204
CPU Memory
BX 10 200 SUB CX,32
CX 0 201 CALL sub
202
PC 202 203
(IP)
204 MOV BX,10
205 RET
What order do we read numbers that occupy more than one byte?
184 12 78
185 34 56
186 56 34
186 78 12
The system on the left has the most significant byte in the
lowest address which is called big-endian.
The system on the right has the most significant byte in the
highest address which is called little-endian.
2) Do you assign the lowest bit number to the bytes least significant bit?
The choice of big- or little-endian bit ordering within a byte is not always
consistent with big- or little-endian ordering of bytes within a multibyte
scalar. The programmer needs to be concerned with these issues when
manipulating individual bits.
Another area of concern is when data are transmitted over a bit-serial line.
The designer must make certain that incoming bits are handled properly.
4/10/2016 MEQUANENT ARGAW, DMU 36