How do you calculate the additive inverse of a binary number?

1 Answer
May 20, 2017

Take the #1#'s complement and add #1#

Explanation:

The exact form depends on the word size you are using for your binary numbers.

A #1#'s complement is formed by flipping every bit - i.e. apply the "not" operator to every bit.

For example, with a #32# bit word, the #1#'s complement of #10100# is:

#1111# #1111# #1111# #1111# #1111# #1111# #1110# #1011#

Then add #1# to get:

#1111# #1111# #1111# #1111# #1111# #1111# #1110# #1100#