Section 1.3.1, pp 126 – 127, TAOCP vol 1, 3rd Ed.
… Each field specification (L:R) is actually represented inside the machine by the single number
; notice that the number fits easily in one byte.
What’s with the ? Most people would’ve figured this out in about 3 seconds, but not me :)
Each byte in MIX is 6 bits long. Each word is 5 bytes long, and has a sign bit. MIX lets you work on part of each word – hence the (L:R) notation to specify which part of the word you want to work with. (0:5) refers to the entire word, (0:0) the sign bit, (1:5) the “unsigned” part of the word, (5:5) the LSB, and so on.
Which gives us . Each of
and
then require 3 bits to represent – and can fit nicely side by side in a 6-bit MIX byte. The
packs L and R into a MIX byte – shift
by 3 bits, and slap on
into the remaining 3 bits. Unpacking them is just as easy.
That’s that with the .