The basic information storage unit in the MIX computer is the byte, which stores positive values in the range 0-63 . Note that a MIX byte can be then represented as 6 bits, instead of the common 8 bits for a regular byte. Unless otherwise stated, we shall use the word byte to refer to a MIX 6-bit byte.
A MIX word is defined as a set of 5 bytes plus a sign. The bytes within a word are numbered from 1 to 5, being byte number one the most significant one. The sign is denoted by index 0. Graphically,
----------------------------------------------- | 0 | 1 | 2 | 3 | 4 | 5 | ----------------------------------------------- | +/- | byte | byte | byte | byte | byte | -----------------------------------------------
Sample MIX words are ‘- 12 00 11 01 63’ and ‘+ 12 11 34 43 00’.
You can refer to subfields within a word using a field
specification or fspec of the form “(L:R)”, where
L denotes the first byte, and R the last byte of the
When L is zero, the subfield includes the word’s
sign. An fspec can also be represented as a single value
F = 8*L + R (thus the fspec ‘(1:3)’, denoting the first
three bytes of a word, is represented by the integer 11).
The MIX computer stores information in registers, that can store either a word or two bytes and sign (see below), and memory cells, each one containing a word. Specifically, the MIX computer has 4000 memory cells with addresses 0 to 3999 (i.e., two bytes are enough to address a memory cell) and the following registers:
A register. General purpose register holding a word. Usually its contents serves as the operand of arithmetic and storing instructions.
X register. General purpose register holding a word. Often it acts as an extension or a replacement of ‘rA’.
J (jump) register. This register stores positive two-byte values, usually representing a jump address.
Index registers. These six registers can store a signed two-byte value. Their contents are used as indexing values for the computation of effective memory addresses.
In addition, the MIX computer contains:
nruns from 0 to 20. In Knuth’s definition,
u7are magnetic tape units,
15are disks and drums,
u16is a card reader,
u17is a card writer,
u18is a line printer and,
u19is a typewriter terminal, and
u20, a paper tape. Our implementation maps these devices to disk files, except for
u19, which represents the standard output.
As noted above, the MIX computer communicates with the external world by a set of input-output devices which can be “connected” to it. The computer interchanges information using blocks of words whose length depends on the device at hand (see Devices). These words are interpreted by the device either as binary information (for devices 0-16), or as representing printable characters (devices 17-20). In the last case, each MIX byte is mapped onto a character according to the following table:
The value 0 represents a whitespace. The characters
# correspond to symbols not representable as ASCII characters
(uppercase delta, sigma and gamma, respectively), and byte values 56-63
have no associated character.
Finally, the MIX computer features a virtual CPU which controls the above components, and which is able to execute a rich set of instructions (constituting its machine language, similar to those commonly found in real CPUs), including arithmetic, logical, storing, comparison and jump instructions. Being a typical von Neumann computer, the MIX CPU fetches binary instructions from memory sequentially (unless a jump instruction is found), and stores the address of the next instruction to be executed in an internal register called location counter (also known as program counter in other architectures).
The next section, See MIX instruction set, gives a complete description of the available MIX binary instructions.