Thread: Inverse Trig
View Single Post
  #4   Spotlight this post!  
Unread 02-03-2002, 17:34
Ameya's Avatar
Ameya Ameya is offline
Freelance Goon
FRC #0293 (SPIKE Robotics)
Team Role: Alumni
 
Join Date: May 2001
Rookie Year: 2000
Location: Pennington, NJ
Posts: 67
Ameya is on a distinguished road
Send a message via ICQ to Ameya Send a message via AIM to Ameya
Quote:
Originally posted by Skabana159
Third, that word is an unsigned integer. It is in a format that I do not completely understand called the two's complement. Someone else will have to tell you what this means because I really have no idea. It will be a positive integer, but there is some way to tell if it is a negative value.
In two's complement, the first bit of a number represents the opposite of what it normally would. So, in a two's complement byte, 10000000 would represent -128 instead of +128. All of the other bits count as positive values.

Another example:

10000001 in two's complement is 1 + -128 = -127, while as an unsigned integer it would be 1 + 128 = 129.
__________________
Ameya Agaskar
Team 293 alumnus

Last edited by Ameya : 02-03-2002 at 17:38.