Re: A83: Re: I am new


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

Re: A83: Re: I am new




Smiths wrote:
> 
> How do you give a number a negative??

You can interpret a byte or word however you want.  What you have stored
in memory is not a number; it's just a series of bits.  The context will
tell you whether or not the number is signed - usually negative numbers
are indicated with the left most bit set.  I believe the Z80/ROM uses
two's-complement encoding in such a context.

This is not unique to the Z80 or TI-83.  It's applicable to any
architecture I know of.

-- 
John Kugelman.  kugelman@mnsinc.com

I believe we can change anything.
I believe in my dream.
    - Joe Satriani


References: