I am currently reading the Art of Computer Programming by Donald Knuth, volume 1, 3rd edition and cannot understand the way the substraction operator works in MIXAL(specifically example 2 from page 132).

SUB 1000
[-][1234][0][0][9] rA before
[-][2000][150][0] Cell 1000
[+][ 766][149][?] rA after
Given the fact that the byte length can have different sizes (depending on the architecture) and the fact that MIX wants to be appliable to all architectures, the value under 9 and 0 will depend on the number of bits in a byte.
I did not understand this(isn't -9-0=-9)?
Why 0--150=149?
Does the substraction operator work from left to right? I mean first substract from the first element the coresponding one and so on?
Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.