Exercise · Volume 1 · 1.3.1-12
Exercise 1.3.1-12
not stated yet in Lean solution written
| Rating | 10 |
|---|---|
| Kind | K3, find a value: compute a number, a set or a closed form from the written solution |
| Section | Section 1.3.1 of Volume 1. Companion chapter: Description of MIX |
The task
Find one instruction that doubles rI3.
The exact wording is in your copy of the book.
Hints
Open one hint at a time. Try the exercise again after each.
Hint 1
The instruction INC3 adds the address , and is the address plus the contents of the index register.
Solution
Show the solution
INC3 0,3. The address is and the index is , so . The instruction adds to rI3. So the new rI3 is , if this value fits in two bytes.
Check
python3: for the values of rI3 the sums rI3 + rI3 are .
Remarks
The same trick INCA 0,1 adds rI1 to rA.
This solution is drafted, and a person has not reviewed it yet. The source.
In Lean
not stated yet The exercise is not stated in Lean yet.
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.