6
Problem 1 - Add $9 to the value stored in memory (address = $2) and put the result into $5. $5 = $9 + M[$2]

First, get the value stored in memory (address = $2) and put it into $5

  • Upload
    lorand

  • View
    17

  • Download
    1

Embed Size (px)

DESCRIPTION

Problem 1 - Add $9 to the value stored in memory (address = $2) and put the result into $5. $5 = $9 + M[$2]. First, get the value stored in memory (address = $2) and put it into $5. 5 2 X 0. X. $2. 0. 1. $5. X X 1. X. M[$2]. 0. X. 0 1. - PowerPoint PPT Presentation

Citation preview

Page 1: First, get the value stored in memory (address = $2) and put it into $5

Problem 1 - Add $9 to the value stored in memory (address = $2) and put the result into $5. $5 = $9 + M[$2]

Page 2: First, get the value stored in memory (address = $2) and put it into $5

First, get the value stored in memory (address = $2) and put it into $5. 5 2 X 0 X

X

0

10

X

X 1

0 1

$5

$2

X

M[$2]

Memr'/w

X(5 bit)

Y(5 bit)

Z(5 bit)

RFrwe

asl(2 bit)

a'/s ALUen

ld en st en imen

im va(32 bit)

0 2 X 5 1 0 X 0 1 0 0 X

Page 3: First, get the value stored in memory (address = $2) and put it into $5

Second, add the value stored in $9 to $5, and put the result in $5. 5 5 9 0

0 (arith.)

1

10

X

X 0

0 1

$5

$5

0

$9

Memr'/w

X(5 bit)

Y(5 bit)

Z(5 bit)

RFrwe

asl(2 bit)

a'/s ALUen

ld en st en imen

im va(32 bit)

0 2 X 5 1 0 X 0 1 0 0 X0 5 9 5 1 0 0 1 0 0 0 X

Page 4: First, get the value stored in memory (address = $2) and put it into $5

Problem 2 - Add $5 to 82 and stored the result in memory (address in $9). M[$9] = $5 + 82

Page 5: First, get the value stored in memory (address = $2) and put it into $5

Add $5 to 82 (temporary result in $1)

1 5 X 1

82

0 (arith.)

1

10

X

X 0

0 1

$1

$5

Memr'/w

X(5 bit)

Y(5 bit)

Z(5 bit)

rwe asl(2)

a'/s en ld en st en imen

im va(32 bit)

0 5 X 1 1 0 0 1 0 0 1 82

0

Page 6: First, get the value stored in memory (address = $2) and put it into $5

Write $1 to M[$9] (temporary result in $1)

X 9 1 0 X

X

0

01

X

X 0

1 1

$1

$9

$1

Memr'/w

X(5 bit)

Y(5 bit)

Z(5 bit)

rwe asl(2)

a'/s en ld en st en imen

im va(32 bit)

0 5 X 1 1 0 0 1 0 0 1 821 9 1 X 0 X X 0 0 1 0 X

X