Go to Post Earlier today, I finally saw a copy of the [WFA] essay that was submitted by my team (there will be a separate reckoning later with all those that kept this a secret from me). The narrative overwhelmed me. - dlavery [more]
Home
Go Back   Chief Delphi > Other > Math and Science
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-01-2007, 23:06
Noah Kleinberg Noah Kleinberg is offline
Registered User
FRC #0395 (2TrainRobotics)
Team Role: Driver
 
Join Date: Jan 2006
Rookie Year: 2006
Location: New York
Posts: 196
Noah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to behold
Send a message via AIM to Noah Kleinberg
Re: Negatives in Binary

Quote:
Originally Posted by Phalanx View Post
In essence yes.
For a one byte field the value can be 0-255 if unsigned, or between -127 to +127 if signed.

255 = 1111 1111 (unsigned)
127 = 0111 1111 (unsigned)

-127 = 1111 1111 (signed)
+127 = 0111 1111 (signed)

Again it is about how your code wishes to deal with the field as a signed or unsigned value.
I think that in most cases (maybe it's different in fortran?), the value -127 would be represented by "1000 0001", using two's complement, which is the most common way to represent negative numbers. It's calculated by changing each 1 to a 0 and each 0 to a 1, and then adding 1 to the resulting number (read the wikipedia article linked above for more information...)
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2007, 23:12
Phalanx's Avatar
Phalanx Phalanx is offline
Formerly Team 1089 (Mercury)
AKA: Michael Reffler
FRC #5431 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 1999
Location: Lewisville, TX (previously NJ)
Posts: 384
Phalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond repute
Re: Negatives in Binary

No, it doesn't matter what the language is, the representation is identical.

Fortran, Cobol, C, PL/1, Pascal, APL, ect... it's all the same internally.
__________________
Don't just ask the experts, become one!
Leadership is not about ability. It's about responsibility!
Diagonally Parked in a Parallel Universe. It's okay we do Quantum Physics


Reply With Quote
  #3   Spotlight this post!  
Unread 15-01-2007, 00:24
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: Negatives in Binary

The posts in this thread have so many errors that I am not
going to try and correct them all. I would suggest that you
download and read Chapter 6 of
http://srvhsrobotics.org/eugenebrooks/IntroCProg.pdf

There are 10 kinds of people in the world, those who
understand binary, and those who don't...

Have fun,
Eugene
Reply With Quote
  #4   Spotlight this post!  
Unread 10-02-2007, 15:18
sdexp's Avatar
sdexp sdexp is offline
Imploding Piston
AKA: Sumit Dutta
FRC #1111 (Powerhawks)
Team Role: Leadership
 
Join Date: Jan 2005
Rookie Year: 2003
Location: MD
Posts: 28
sdexp is on a distinguished road
Send a message via MSN to sdexp
Re: Negatives in Binary

1111 = our team number = 15

100000000 = 256
10000000 = 128
__________________
.: Sumit Dutta :.

2004RobotExcitement * 2004RobotQuality = 2005RobotExcitement * 2005RobotQuality = 2006RobotExcitement * 2006RobotQuality = 2007RobotExcitement * 2007RobotQuality
Due to Conservation of Madness

South River High School Robotics
Team 1111
Powerhawks

Last edited by sdexp : 10-02-2007 at 15:20.
Reply With Quote
Reply


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
Refrain from the negatives Arefin Bari General Forum 19 10-05-2006 22:43
Reading binary data from a file and writing it in VB complete Programming 1 02-01-2006 21:21
binary in C sciguy125 Programming 9 13-11-2005 22:12
Binary in Rose is Rose MisterX Chit-Chat 8 11-02-2004 18:26
delphi: binary sort archiver 2000 0 24-06-2002 00:30


All times are GMT -5. The time now is 07:49.

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