Signedness

Updated: 04/26/2017 by Computer Hope

In computer science, the signedness of a data type indicates whether or not a variable of that type can be a negative number. Specifically:

  • If a numeric variable is "unsigned," it can represent only a positive number or zero.
  • If a numeric variable is "signed," it can also represent a negative number because one of the bits of data is dedicated to representing "positive" or "negative".

For instance, a signed eight-bit numeric type can represent the numbers -127 through 127; seven of the bits are used for the binary representation of zero (0000000) through 127 (1111111), and one of the bits represents whether the number is positive or negative. By contrast, an unsigned eight-bit type may represent the numbers 0 (00000000) through 255 (11111111).

Data type, Programming terms