taocp

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

Learn · Volume 1

Section 1.4.3.1. A MIX simulator

8 exercises: 8 with a written solution, 0 stated in Lean, 0 proved in Lean.

1. Read first

The companion chapter builds on these. Read the ones you do not know yet.

2. Read the section

Read Section 1.4.3.1 in your copy of the book. Then read the companion chapter A MIX simulator (a draft): it explains each item in the words of the handbook, with examples and proofs. The items of the section and their status.

3. Work the exercises

Section 1.4.3.1

The exercises of Section 1.4.3.1 are about the MIX simulator of the text, an interpretive routine written in MIX. Exercise 1 asks how to organize the subroutines better. Exercises 2, 3 and 6 write the operator routines that the text leaves out: the shifts, MOVE and the input-output operators. Exercise 7 changes the input-output routines so that the data move later. Exercise 4 adds the start by the GO button, exercise 5 measures the time of the simulation, and exercise 8 is a statement about the location counter.

For these solutions the simulator program of the text was typed in for testing on a MIX simulator that was written for this handbook, with the true instruction times. The routines of exercises 2, 3, 6 and 7 were run inside it and compared with the real instructions on the host. The listings in the solutions are new code. See also the C1 chapter on Section 1.4.3.1.

A good order is 8, 4, 1, 5, 2, 3, 6, 7.

From the Solutions volume of the handbook. The source.

The list starts with the lowest rating. Try each exercise on paper first. Its page has the hints one at a time, the solution behind a click, and the Lean status.

ExerciseRatingKindSolutionLean
1.4.3.1-114informalwrittennot stated yet
1.4.3.1-414K6writtennot stated yet
1.4.3.1-220K6writtennot stated yet
1.4.3.1-820K2writtennot stated yet
1.4.3.1-322K6writtennot stated yet
1.4.3.1-524K3writtennot stated yet
1.4.3.1-628K6writtennot stated yet
1.4.3.1-732K6writtennot stated yet

Something is wrong? Report it.