Skip to main content
Second iteration. [(its = possessive, it's = "it is" or "it has". See for example <https://www.youtube.com/watch?v=8Gv0H-vPoDc&t=1m20s> and <https://www.wikihow.com/Use-Its-and-It%27s>.)]
Source Link
Peter Mortensen
  • 31k
  • 22
  • 111
  • 134

In simple terms, two's complement is a way to store negative numbers in computer memory. Whereas positive numbers are stored as a normal binary number.

Let's consider this example,

The computer uses the binary number system to represent any number.

x = 5;

This is represented as 0101.

x = -5;

When the computer encounters the - sign, it computes it'sits two's complement and stores it.

That is, 5 = 0101 and its two's complement is 1011.

The important rules the computer uses to process numbers are,

  1. If the first bit is 1 then it must be a negative number.
  2. If all the bits except first bit are 0 then it is a positive number, because there is no -0 in number system (1000 is not -0 instead it is positive 8).
  3. If all the bits are 0 then it is 0.
  4. Else it is a positive number.

In simple terms, two's complement is a way to store negative numbers in computer memory. Whereas positive numbers are stored as a normal binary number.

Let's consider this example,

The computer uses the binary number system to represent any number.

x = 5;

This is represented as 0101.

x = -5;

When the computer encounters the - sign, it computes it's two's complement and stores it.

That is, 5 = 0101 and its two's complement is 1011.

The important rules the computer uses to process numbers are,

  1. If the first bit is 1 then it must be a negative number.
  2. If all the bits except first bit are 0 then it is a positive number, because there is no -0 in number system (1000 is not -0 instead it is positive 8).
  3. If all the bits are 0 then it is 0.
  4. Else it is a positive number.

In simple terms, two's complement is a way to store negative numbers in computer memory. Whereas positive numbers are stored as a normal binary number.

Let's consider this example,

The computer uses the binary number system to represent any number.

x = 5;

This is represented as 0101.

x = -5;

When the computer encounters the - sign, it computes its two's complement and stores it.

That is, 5 = 0101 and its two's complement is 1011.

The important rules the computer uses to process numbers are,

  1. If the first bit is 1 then it must be a negative number.
  2. If all the bits except first bit are 0 then it is a positive number, because there is no -0 in number system (1000 is not -0 instead it is positive 8).
  3. If all the bits are 0 then it is 0.
  4. Else it is a positive number.
Active reading [<https://en.wikipedia.org/wiki/Computer> <https://en.wiktionary.org/wiki/memory#Noun> <https://en.wiktionary.org/wiki/number#Noun> <https://www.powerthesaurus.org/in_simple_terms/synonyms>]. Used more standard formatting (we have italics and bold on this platform). Expanded.
Source Link
Peter Mortensen
  • 31k
  • 22
  • 111
  • 134

In simple term 2's Complementterms, two's complement is a way to store negative numbernumbers in Computer Memorycomputer memory. Whereas Positive Numberspositive numbers are stored as Normal Binary Numbera normal binary number.

Let's consider this example,

ComputerThe computer uses the Binary Number Systembinary number system to represent any number.

x = 5;

This is represented as 01010101.

x = -5;

When the computer encoutersencounters the - sign, it computes it's 2'stwo's complement and stores it. i.e

That is, 5 = 0101 and it's 2'sits two's complement is 10111011.

ImportantThe important rules the computer uses to process numbers are,

  1. If the first bit is 1 then it must be a negativenegative number.
  2. If all the bits except first bit are 0 then it is a positive number because, because there is no -0 in number system.  (1000 is not -0 instead it is positive 8).
  3. If all the bits are 0 then it is 0.
  4. Else it is a positive numberpositive number.

In simple term 2's Complement is a way to store negative number in Computer Memory. Whereas Positive Numbers are stored as Normal Binary Number.

Let's consider this example,

Computer uses Binary Number System to represent any number.

x = 5;

This is represented as 0101.

x = -5;

When the computer encouters - sign, it computes it's 2's complement and stores it. i.e 5 = 0101 and it's 2's complement is 1011.

Important rules computer uses to process numbers are,

  1. If the first bit is 1 then it must be negative number.
  2. If all the bits except first bit are 0 then it is a positive number because there is no -0 in number system.(1000 is not -0 instead it is positive 8)
  3. If all the bits are 0 then it is 0.
  4. Else it is a positive number.

In simple terms, two's complement is a way to store negative numbers in computer memory. Whereas positive numbers are stored as a normal binary number.

Let's consider this example,

The computer uses the binary number system to represent any number.

x = 5;

This is represented as 0101.

x = -5;

When the computer encounters the - sign, it computes it's two's complement and stores it.

That is, 5 = 0101 and its two's complement is 1011.

The important rules the computer uses to process numbers are,

  1. If the first bit is 1 then it must be a negative number.
  2. If all the bits except first bit are 0 then it is a positive number, because there is no -0 in number system  (1000 is not -0 instead it is positive 8).
  3. If all the bits are 0 then it is 0.
  4. Else it is a positive number.
Source Link
Raghu
  • 470
  • 1
  • 5
  • 15

In simple term 2's Complement is a way to store negative number in Computer Memory. Whereas Positive Numbers are stored as Normal Binary Number.

Let's consider this example,

Computer uses Binary Number System to represent any number.

x = 5;

This is represented as 0101.

x = -5;

When the computer encouters - sign, it computes it's 2's complement and stores it. i.e 5 = 0101 and it's 2's complement is 1011.

Important rules computer uses to process numbers are,

  1. If the first bit is 1 then it must be negative number.
  2. If all the bits except first bit are 0 then it is a positive number because there is no -0 in number system.(1000 is not -0 instead it is positive 8)
  3. If all the bits are 0 then it is 0.
  4. Else it is a positive number.
Post Made Community Wiki by Raghu