View Single Post
  #13   Spotlight this post!  
Unread 10-02-2007, 21:28
TimCraig TimCraig is offline
Registered User
AKA: Tim Craig
no team
 
Join Date: Aug 2004
Rookie Year: 2003
Location: San Jose, CA
Posts: 221
TimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to behold
Re: Negatives in Binary

Quote:
Originally Posted by something View Post
A signed 4-bit value would only be able to represent values from 4 to -4. Check out two's complement on wikipedia for more info on binary representations of negative numbers.
Actually, 4 bits provides 16 possible combinations of 0 and 1 so it can represent 0 to 15 as an unsigned integer or -8 to +7 as a signed integer.
(unsigned integer in this case being a mathematical term rather than the C type).

Yes, typically computers represent signed integers as two's complement so negative numbers have the high bit set.
Reply With Quote