taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.3.1-5

Exercise 1.3.1-5

not stated yet in Lean solution written

Rating10
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.3.1 of Volume 1. Companion chapter: Description of MIX

The task

Write the symbolic form of the word of formula (6) when the machine reads that word as an instruction.

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 format is ± AA I F C\pm\, AA\, I\, F\, C. Read the five fields of the word of (6) in that order.

Hint 2

Look up the operation code in Table 1 of Section 1.3.1 and see what the normal field is.

Solution

Show the solution

The word of (6) is − 80 3 5 4-\ 80\ 3\ 5\ 4. The address is −80-80, the index is 33, the field is 5=(0:5)5 = (0:5) and the operation code is 44. Code 44 is DIV. Its normal field is (0:5)(0:5), so the field is not written, and the symbolic form is DIV -80,3. The longer form DIV -80,3(0:5) has the same meaning.

Check

Compute the field: F=8L+R=8⋅0+5=5F = 8L + R = 8 \cdot 0 + 5 = 5 for (0:5)(0:5). The python test 8*0+5 == 5 holds.

Remarks

Compare the table in the section: each symbolic line is converted to a word by the same rules in reverse.

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.