TAOCP 1.3.1: Description of MIX
Section 1.3.1 exercises: 26/26 solved.
Section 1.3.1. Description of MIX
Exercises from TAOCP Volume 1 Section 1.3.1: 26/26 solved.
| # | Rating | Category | Status | Time |
|---|---|---|---|---|
| 1 | [00] | immediate | verified | 3m18s |
| 2 | [02] | simple | verified | 35s |
| 3 | [02] | simple | verified | 44s |
| 4 | [00] | immediate | verified | 51s |
| 5 | [10] | simple | verified | 3m09s |
| 6 | [10] | simple | verified | 2m53s |
| 7 | [M15] | math-simple | verified | 9m36s |
| 8 | [15] | simple | verified | 5m21s |
| 9 | [15] | simple | solved | 4m04s |
| 10 | [15] | simple | verified | 51s |
| 11 | [15] | simple | verified | 3m05s |
| 12 | [10] | simple | verified | 5m27s |
| 13 | [10] | simple | solved | 10m12s |
| 14 | [20] | medium | solved | 5m10s |
| 15 | [10] | simple | verified | 36s |
| 16 | [20] | medium | verified | 3m35s |
| 17 | [26] | hard | verified | 1m55s |
| 18 | [22] | medium | verified | 1m39s |
| 19 | [14] | simple | verified | 1m05s |
| 20 | [20] | medium | verified | 1m39s |
| 21 | [24] | medium | solved | 8m43s |
| 22 | [28] | hard | solved | 2m49s |
| 23 | [27] | hard | verified | 5m07s |
| 24 | [21] | medium | verified | 1m22s |
| 25 | [30] | hard | verified | 1m30s |
| 26 | [32] | hard | solved | 2m21s |
TAOCP 1.3.1 Exercise 1
A MIX byte must be capable of representing at least $64$ distinct values and at most $100$ distinct values.
TAOCP 1.3.1 Exercise 2
Four adjacent bytes represent integers from $0$ through $16{,}777{,}215$ by the table in Section 1.
TAOCP 1.3.1 Exercise 3
The instruction format of a MIX word places the sign in position $0$, the address in bytes $1$–$2$, the index specification in byte $3$, the field specification in byte $4$, and the operation code in...
TAOCP 1.3.1 Exercise 4
The sign in the address field is part of the instruction encoding and is not constrained by the requirement on memory references.
TAOCP 1.3.1 Exercise 5
Let (6) be a MIX word written in its physical layout as (6):\quad \pm \; \text{AA} \; \text{I} \; \text{F} \; \text{C}, where AA is the address field, I the index field, F the field specification, and...
TAOCP 1.3.1 Exercise 6
**Solution to Exercise 1.
TAOCP 1.3.1 Exercise 7
Let $D$ be the signed integer formed from $(rA,rX)$, and let $m\neq 0$ be the signed integer in $M$.
TAOCP 1.3.1 Exercise 8
We are asked to analyze the effect of a change in the initial value of `rX` on the `DIV` instruction in the last example on page 133.
TAOCP 1.3.1 Exercise 9
Bài toán yêu cầu liệt kê **mọi toán tử MIX có thể ảnh hưởng đến overflow toggle**, tức là những lệnh có thể **đặt** (set) hoặc **xóa** (clear) overflow toggle theo đúng đặc tả của MIX.
TAOCP 1.3.1 Exercise 10
The comparison indicator $\mathrm{CI}$ takes one of the three values $\mathrm{LESS}$, $\mathrm{EQUAL}$, or $\mathrm{GREATER}$.
TAOCP 1.3.1 Exercise 11
The exercise asks for all MIX operators that can affect the setting of the index register $rI1$.
TAOCP 1.3.1 Exercise 12
The proposed solution fails because MMIX provides no arithmetic or shift instructions that operate directly on index registers $rI_0,\dots,rI_7$.
TAOCP 1.3.1 Exercise 13
For `JOV 1001`, if the overflow toggle is on, control transfers to location 1001 and the toggle is turned off.
TAOCP 1.3.1 Exercise 14
The correct notion is very strong: an instruction is equivalent to `NOP` only if, for every initial machine state, it leaves **all registers, memory, indicators, and control state unchanged**.
TAOCP 1.3.1 Exercise 15
In MIX, each alphanumeric character is represented by one byte, since a byte holds at least $64$ distinct values and is used for character coding in input-output operations.
TAOCP 1.3.1 Exercise 16
The previous solution failed because it imported an incorrect model of `MOVE` and then built optimality arguments on top of it.
TAOCP 1.3.1 Exercise 17
The proposal’s failure comes from two independent MIX semantics issues: (i) `MOVE` cannot broadcast from a single word, and (ii) index registers cannot be compared directly.
TAOCP 1.3.1 Exercise 18
Assume that all registers, toggles, and memory locations initially contain zero.
TAOCP 1.3.1 Exercise 19
The execution times given in Section 1.
TAOCP 1.3.1 Exercise 20
Let $H$ be the MIX word representing the halt instruction.
TAOCP 1.3.1 Exercise 21
**(a) Can the J-register ever be zero?
TAOCP 1.3.1 Exercise 22
The goal is to use the smallest possible number of MIX memory locations.
TAOCP 1.3.1 Exercise 23
We will construct fully **correct solutions** for Exercise 1.
TAOCP 1.3.1 Exercise 24
Let rA = + 0 a b c d, rX = + e f g h i.