Re: A86: 2 questions


[Prev][Next][Index][Thread]

Re: A86: 2 questions



In a message dated 97-11-23 14:42:47 EST, you write:

> 
>  How does IntTest (the prog posted yesterday), or any other interrupt
>  program provide the LSB?

not entirely sure what the question is, but from what I interperet it as, it
doesn't.  The data bus gets "random" LSB and then uses (i think) the i
register as the MSB, and then jumps to the location specified by the word
there (which, if all 257 bytes were E2 or something, would always be E2E2)

>  
>  Can someone explain negative numbers in detail especially one's and two's
>  complements?
>  

Negative #'s in binary always have the MSB set (1), and then are subtracted
from 0.  In this way, -1 would be 0000-1, and by decrementing 0000 1 time,
you get FFFF, which is -1.  -2 would thus be FFFE, and -3 would be FFFD,
etc...

The Two's Complement does this process for you.  The first step is to
decrement the number.  (i.e. 0006 would become 0005)  Then, negate all the
bits (0005 would be FFFA, because 0=0000, and F=1111, so 0 becomes F, and
5=0101, so 1010 would be the NOT of 5, which is A).  Therefore, the Two's
Complement of 6 is NOT(6-1), which is FFFA (try adding 6 to it to get 0).  An
alternate method is to negate the number (0006->FFF9) and then incrementing
it (FFF9->FFFA).

The One's Complement (I think, not entirely sure, someone tell me if I'm
wrong) is just the negation of all the bits (1234->FEDC), which is NOT the
negative of the original number (it's one off in some direction).

>  Andres Garcia
>  ---------------------
>  mail: xrigel@q-net.net
>  

~Steve