Thread: PBASIC sucks
View Single Post
  #22   Spotlight this post!  
Unread 21-01-2003, 21:48
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
It all depends on what you define as first and last. I was assuming the normal left-to-right reading order. I probably should have said you get the 16 least-significant bits and loose the most significant.

Negatives in binary: two's complement. Basically, invert everything, add 1. For example, to find -1, take 00000001, invert the bits (11111110) and add 1 (11111111). This can either be interpreted as 255 or -1.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php