Port-vax archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PDP-11 compat mode [was Re: New Vax - future directions :-)]
>>> borrowed from). So you *could* describe it as "(a) borrow into
>>> most significant bit (happened)".
>> That's a logically consistent point of view. But it requires that
>> the "most significant bit" text refer to this one-bit-wider
>> conceptual value formed by concatenating the complement of C with
>> the overt operand.
>> That's not how "most significant bit" works elsewhere in the
>> document, nor how it works in most other uses I've seen/heard of
>> such language.
> I'm not sure I follow. [...]
Okay. I know you too well to write think you just don't have a clear
grasp of binary subtraction, so the problem must lie elsewhere. Here's
my interpretation, where I'm using 8-bit values for expository ease.
Subtract 1 from 0xf0:
7 6 5 4 3 2 1 0 <-- bit numbers
1 1 1 1 0 0 0 0 <-- subtrahend
1 <-- minuend
----------------------
1 > 0, so there's a borrow out of bit 0 into bit 1. Bit 0 of the
result is then 1, with the borrow as yet unresolved:
1 1 1 1 0 0 0 x
1
----------------------
1
The same thing happens, with a borrow out of bit 1 into bit 2:
1 1 1 1 0 0 x x
1
----------------------
1 1
And again, with a borrow out of bit 2 into bit 3:
1 1 1 1 0 x x x
1
----------------------
1 1 1
One last borrow, out of bit 3 into bit 4:
1 1 1 1 x x x x
1
----------------------
1 1 1 1
At which point there are no more borrows - or, if you prefer, all
further borrows are zero - leading to
1 1 1 0 1 1 1 1
Yes, it makes perfect logical sense to speak of a borrow into the most
significant bit. But recording that borrow in the condition codes is
not useful, any more than recording the borrow from bit 6 to bit 7
(zero in the above example) is useful. It's the borrow _out of_ the
most significant bit that is the useful one.
Presumably this differs significantly from your interpretation. Does
the above help you figure out where we're going astray with respect to
one another?
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index