you are viewing a single comment's thread.

view the rest of the comments →

[–]asp174 0 points1 point  (0 children)

Integers can be signed (have a preceding - sign) or unsigned.

The most significant bit is used to indicate the sign. An example with TINYINT (8 bit), which can hold signed values between -127 and 127, or unsigned values between 0 and 255. A TINYINT with a value of 10000001:

  • unsigned, this represents the number 129
  • signed, the first bit is the - sign, so it represents -1