BLOGGER TEMPLATES AND TWITTER BACKGROUNDS »

Saturday, 15 December 2012

MIPS, INTRO / R-TYPE


INTRODUCTION
l  MIPS have a small number of ways that is computes addresses in memory.
l  It can be address of an instruction or a data.
l  Instruction format means how an instruction is put together.
l  Addressing mode means how to determine the address of an operand.

INTRUCTION FORMATS
A.      Register type
l  Do not require :
1.        An immediate value
2.        Target offset
3.        Memory address displacement
4.        Memory address to specify an operand
l  Include arithmetic and logic with all operand in registers, shift instructions, and register direct jump instructions(jal and jr).
l  All are type instructions use opcode 000000.
bits
6
5
5
5
5
6
Instructions syntax
Operation code (op)
Source register specifier (rs)
Target register specifier (rt)
Destination register specifier (rd)
Shift amount (shamt)
Function field (funct)

Example : 
add  $t0 , $s1 , $s2
0
$s1
$s2
$t0
0
add

0
17
18
8
0
32

000000
10001
10010
01000
00000
100000
 by CHONG CAI NING 
B031210080

0 comments: