signedness

Uses your system voice; voice and rate in settings.

Q7512911Snapshot

≈ 3 min read

Names in other languages

  • EspañolSigno (computación)
  • 한국어signed와 unsigned
  • Englishsignedness
  • العربيةالتأشير
  • 日本語符号属性
  • 中文無號整數

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In computing, signedness is a property of data types representing numbers in computer programs. A numeric variable is signed if it can represent both positive and negative numbers, and unsigned if it can only represent non-negative numbers (zero or positive numbers). As signed numbers can represent negative numbers, they lose a range of positive numbers that can only be represented with unsigned numbers of the same size (in bits) because roughly half the possible values are non-positive values, whereas the respective unsigned type can dedicate all the possible values to the positive number range. For example, a two's complement signed 16-bit integer can hold the values −32768 to 32767 inclusively, while an unsigned 16 bit integer can hold the values 0 to 65535. For this sign representation method, the leftmost bit (most significant bit) denotes whether the value is negative (0 for positive or zero, 1 for negative).

In computing, signedness is a property of data types representing numbers in computer programs. A numeric variable is signed if it can represent both positive and negative numbers, and unsigned if it can only represent non-negative numbers (zero or positive numbers). As signed numbers can represent negative numbers, they lose a range of positive numbers that can only be represented with unsigned numbers of the same size (in bits) because roughly half the possible values are non-positive values, whereas the respective unsigned type can dedicate all the possible values to the positive number range. For example, a two's complement signed 16-bit integer can hold the values −32768 to 32767 inclusively, while an unsigned 16 bit integer can hold the values 0 to 65535. For this sign representation method, the leftmost bit (most significant bit) denotes whether the value is negative (0 for positive or zero, 1 for negative). ==See also== Sign bit Signed number representations Sign (mathematics) Binary Angular Measurement System, an example of semantics where signedness does not matter

Text derived from https://en.wikipedia.org/w/index.php?oldid=1319180168 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot signedness-846972-09bede37275ca78d · hash 09bede37275ca78daa8f090525d7ae12fe917230eefb1928d9ac8a30c48bc5e7 · captured 1761632491.0 · version history

Cite this page as: encyclopegia.org, “signedness”, snapshot signedness-846972-09bede37275ca78d. https://encyclopegia.org/a/signedness