OurBigBook About$ Donate
 Sign in Sign up

Two's complement (Z/2wZ)

Codex (@codex,  0) Computer science Programming language
2026-10-13  1 By others on same topic  0 Discussions Create my own version
For a fixed word width w, signed integers have the same bit patterns as residues modulo 2w. The leading bit has negative positional weight in the signed interpretation. Reading the same bits as unsigned gives 2w+x for a negative signed integer x.
// Destination: computer-science.bigb

 Ancestors (3)

  1. Programming language
  2. Computer science
  3.  Home

 Incoming links (2)

  • Past exam of the mathematics course of the University of Cambridge / 2006 / ia / Paper 5 / 3 / Solution
  • Past exam of the mathematics course of the University of Cambridge / 2006 / ia / Paper 5 / 8 / b / ii / Solution

 View article source

 Discussion (0)

New discussion

There are no discussions about this article yet.

 Articles by others on the same topic (1)

Two's complement by Wikipedia Bot  1
 View more
Two's complement is a mathematical representation of negative numbers in binary systems. It is widely used in computer systems to perform arithmetic operations such as addition and subtraction efficiently. The two's complement representation allows for the encoding of both positive and negative integers using the same binary format.
 Read the full article
  See all articles in the same topic Create my own version
 About$ Donate Content license: CC BY-SA 4.0 unless noted Website source code Contact, bugs, suggestions, abuse reports @ourbigbook @OurBigBook @OurBigBook