Go to Post Teamwork gracious professionalism robots = FIRST Robotics - Bcahn836 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #25   Spotlight this post!  
Unread 21-01-2003, 23:46
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
"Using a similar program, you can find that -32768 is actually represented as 4294934528, which is 11111111111111111000000000000000."

Note: I said short int, short ints are 16 bits. I do it in short ints, because that's what i'm use to, and I don't feel like writing 32 zeros.

from my experiences when i was 13 or so working on my C server i used short ints.

V this is my experience with them

32767
Before: 0111111111111111

32767 health + 1 health
After: 1000000000000000
-32768 poor guy

Ex: 1111111111111111
-1

-1 + 1
Result: 00000000 00000000
0

Oh, lol, I didn't realize i put
"11111111 11111111 = -32768"
I'm on 6 hours of sleep for 3 days pardon me. Didn't go sleep saturday night.

I don't see the point of the inverse and add 1 you were doing.
__________________
R
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Obscure PBASIC for RoboEmu rbayer Programming 1 28-03-2003 23:57
PBasic 2.5 vs. 2.0 Anthony Kesich Programming 6 09-02-2003 22:06
RoboEmu v.1a (another PBASIC emulator) rbayer Programming 0 07-07-2002 00:45
emulationFIRST (aka PBasic emulator) Matt Leese Programming 5 30-06-2002 12:06
Another PBASIC Question Ian W. Programming 4 31-01-2002 21:36


All times are GMT -5. The time now is 11:21.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi