# What is MMIX?

> MMIX is the 64-bit RISC machine that replaces MIX in Knuth's newer TAOCP material. How it differs from MIX and where you meet it on the path.

**MMIX**: MMIX is a 64-bit RISC computer designed by Donald Knuth to replace MIX in The Art of Computer Programming.

**MMIX** is Knuth's modern replacement for [MIX](https://cracked.guide/glossary/mix): an imaginary 64-bit RISC computer with 256 general-purpose registers. It is described in Volume 1, Fascicle 1 (2005) and used for machine-level code in Volume 4A onward.

## How it differs from MIX

MIX looks like a 1960s machine: five-byte words, a sign bit, an accumulator, six small index registers. MMIX looks like a modern RISC chip: 64-bit words, **256 general registers**, 8-bit bytes, a load/store design and fixed-width instructions with three operands (`ADD $1,$2,$3`). Its name is the Roman numeral 2009, which Knuth chose as the average of the numbers of real RISC machines he considered.

Knuth has said MMIX will replace MIX in future editions of Volumes 1 to 3, but the current editions still use MIX.

## Where you meet it on the path

Volume 4A shows machine code in MMIX, mostly in [§7.1.3, Bitwise Tricks and Techniques](https://cracked.guide/guide/knuth-w105-0), where instructions like `MOR` and `MXOR` do whole-word bit shuffles. You do not need to write much MMIX to follow it. Reading the opening of Fascicle 1, or Knuth's MMIX page, is enough.

## Questions

### Should I learn MIX or MMIX first?

For Volumes 1 to 3 as printed today, MIX, because that is what the programs use. Pick up MMIX when you reach Volume 4A.

### Is there an MMIX simulator?

Yes. Knuth's own MMIXware package includes an assembler and simulator, and there are browser-based ones made by others.

---

Source: https://cracked.guide/glossary/mmix
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
