MIX (fictional computer)
MIX is a fictional, ideal computer, which Donald E. Knuth uses to illustrate algorithms in his book The Art of Computer Programming . The MIX model computer will later be replaced by the MMIX , a more modern and expanded version.
MIX is an abstract Von Neumann computer . It uses the assembler language MIXAL (MIX-Assembler-Language).
MIX structure
A MIX computer basically consists of the following components:
- Arithmetic register (rA)
- Extension register (rX)
- Index register (rI)
- Jump register (rJ)
- Memory (4000 cells with 1 MIX word each)
MIX byte
In contrast to today's understanding, a MIX byte consists of 6 bits . It can therefore represent 64 different states (0..63). Knuth in his book: “Since 1975 or so, the word 'byte' has come to mean a sequence of precisely eight binary digits, capable of representing numbers of 0 to 255. […] When we speak of bytes in connection with MIX , we shall confine ourselves to the former sense of the word, harking back to the days when bytes were not yet standardized. "
MIX word
The content of a MIX memory cell is called a MIX word . It consists of five MIX bytes and a sign byte. The possible range of numbers is therefore limited to ± (64 5 −1) = ± 1,073,741,823.
Memory of the MIX computer
A MIX computer has 4000 memory cells, each with one MIX word. Two MIX bytes (64 2 = 4096) are therefore sufficient to address a memory cell . All addresses> 3999 are undefined. So-called “field specifiers” (L: R) are used to address individual parts of a MIX word. These can be represented with a MIX byte by multiplying the left limit L by 8 and then adding the right limit R. A field specifier of (0: 0) would address the sign, a field specifier of (1: 5) addresses the first entire memory cell without the sign.
Flags
MIX uses four flags to perform conditional jumps.
- O flag: Overflow , is set as soon as a calculation exceeds the maximum value of a MIX word.
- L flag: Less , is set if the corresponding number is smaller than its comparison number.
- E flag: Equal , is set if the corresponding number is equal to the comparison number.
- G flag: Greater , is set if the corresponding number is greater than its comparison number.
Web links
- Dan's MIX Simulator and MIXAL Compiler (English, archive.org)
- GNU MIX Development Kit (MDK) (English)
Footnotes
- ^ Donald E. Knuth: The Art of Computer Programming. P. 125.