Go to Post Whether we realize it or not, we've all been touched by the works of Dr. Kamen - through his TED talks, through his research and scores of publications in pediatric oncology, or perhaps more directly through his daughter. What an incredible life, what an incredible legacy. - Taylor [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
  #9   Spotlight this post!  
Unread 29-01-2004, 22:19
Random Dude Random Dude is offline
Oregon State Head FTA
AKA: Chris
no team (Oregon Robotics Tournament & Outreach Program)
 
Join Date: Aug 2002
Rookie Year: 1998
Location: Oregon
Posts: 142
Random Dude will become famous soon enoughRandom Dude will become famous soon enough
Re: tank drive

Quote:
Originally Posted by Astronouth7303
so 5 = 00000101 and -5 = !5 + 1 = 11111011
Or did I mis-read that?

I'm just curious, so one has a vague idea what happens if you pass a signed to a unsigned.
Well, if you do something like this


unsigned char u_char;
signed char s_char;

.....

u_char = s_char;



The maping will be as follows:

s_char >= 0 : u_char = s_char
s_char <0 : u_char = 256 - s_char


Hope that answers your question... (Note I'm speaking in terms of this micro and this compiler, YMMV on other systems...)
 


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
1 stick drive to 2 stick drive wayne 05 Programming 18 01-04-2004 16:41
Rookie team drive tream idea Max Lobovsky Technical Discussion 18 21-01-2004 03:36
2-wheel versus 4-wheel drive Ben Mitchell Technical Discussion 23 07-11-2003 00:50
Direct drive or Chain? Suneet Technical Discussion 32 27-03-2003 23:00
Quad- 1/2 track drive system Ben Mitchell Technical Discussion 24 30-01-2002 11:55


All times are GMT -5. The time now is 10:40.

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