View Single Post
  #2   Spotlight this post!  
Unread 14-01-2007, 22:25
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

Yes, when the "high order" bit is on it is a negative number, but it doesn't have to be. It depends on your code and what you wish to do with the value or how you wish to treat it.

As for a given bit length it is always in terms of the field type. a byte = 8 bits with high bit as sign bit, a word = 16 bits again high bit is the sign bit, and so on.

I hope this helps.
__________________
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