I have been reading Donald Knuth's The Art of Programming, Volume 1, in which MIX is used as the assembly language. In the section where Knuth talks about arithmetic operations in MIX, I didn't understand how the subtraction, multiplication and division operations are carried out.
For example, the text book has this:
register A has the following word code:
-| 1234 | 0 | 0 | 9
and a memory cell, say M, has the following word code:-| 2000 | 150 | 0
.
The book says on performing A-M the result is: +| 766 | 149|?
.
In MIX, the memory is split into words. Each word has the following:
The first field represents sign(+ or -)
The next two bytes hold the address.
The next byte represents Indexing while the fifth byte is for field specification.
The last byte is for opcode.
The book says on performing A-M the result is: +| 766 | 149|?
.
Can anyone help me with this?