First, get the value stored in memory (address = $2) and put it into $5. - PowerPoint PPT Presentation

slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
First, get the value stored in memory (address = $2) and put it into $5. PowerPoint Presentation
Download Presentation
First, get the value stored in memory (address = $2) and put it into $5.

play fullscreen
1 / 6
First, get the value stored in memory (address = $2) and put it into $5.
66 Views
Download Presentation
lorand
Download Presentation

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

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

  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

  3. Second, add the value stored in $9 to $5, and put the result in $5. 5 5 9 0 $5 0 1 $5 $9 X X 0 0 (arith.) 1 0 0 1

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

  5. Add $5 to 82 (temporary result in $1) 1 5 X 1 82 $5 0 1 $1 X X 0 0 (arith.) 1 0 0 1

  6. Write $1 to M[$9] (temporary result in $1) X 9 1 0 X $9 1 0 $1 $1 X X 0 X 0 X 1 1