quarta-feira, 9 de novembro de 2011

RESPOSTA EXERCÍCIO

lw $t0,80(St1)

add St0, $s1, $t0

sw St0, 80($t1)

lw $t2, 80($t1)

add $t2,$s2,$t2

sw $t2,80($t1)

bne $s2, $s1, ELSE

add $t3, $s2, $s1

sw $t3, 80($t1)

j: L1

ELSE: bne $s2, $s1, L1

sub $t4, $s2, $s1

sw $t4, 80($t1)

L1: sub $s2, $s2, $s2 

 

op rs rt rd shamt funct
35 8 9 80
0 16 8 8 0 32
43 8 9 80
35 10 9 80

0

18

10

10

0

32

43

10

9

80

5

18

17

10

0

18

17

11

0

32

43

11

9

80

2

20

5

18

17

20

0

18

17

12

0

34

43

12

9

80

0

18

18

18

0

34

QUER GANHAR 1 PONTO NA P1? LEVE HOJE PARA A FACULDADE A TABELA COM O CÓDIGO BINÁRIO REFERENTE AOS VALORES DECIMAIS.

op

rs

rt

rd

shamt

funct

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESULTADO DO EXERCÍCIO

lw $t0,80(St1)
add St0, $s1, $t0
sw St0, 80($t1)
lw $t2, 80($t1)
add $t2,$s2,$t2
sw $t2,80($t1)
bne $s2, $s1, ELSE
add $t3, $s2, $s1
sw $t3, 80($t1)
j: L1
ELSE: bne $s2, $s1, L1
sub $t4, $s2, $s1
sw $t4, 80($t1)
L1: sub $s2, $s2, $s2