1’s Complement Subtraction Explained with Examples

This article describes the complement arithmetic using 1’s complement binary subtraction. Complement arithmetic is a mathematical process used for subtraction. This operation includes two types of complements, namely 1’s complement and 2’s complement. Complement arithmetic is crucial in subtracting numbers using digital devices such as computers and calculators. The primary goal of complement arithmetic is to convert the subtraction process into addition.

In this article, we will learn how to find the 1’s and 2’s complement and how they are used to subtract numbers.

What is 1’s Complement?

The 1’s complement is a fundamental arithmetic operation that involves flipping the bits of a binary number. To obtain the 1’s complement of a binary number, all the 0 bits in the number are changed to 1, while all the 1 bits are changed to 0. This operation is crucial in digital circuits and computer science, enabling bitwise operations such as addition, subtraction, and logical operations.

For example, consider a binary number (100110111)2. Then, the 1’s complement of this binary number will be (011001000)2. From this example, it is clear that we can find the 1’s complement just by changing the 0 bits to 1 and 1 bits to 0 of the given number.

Subtraction using 1’s Complement Arithmetic

The step-by-step procedure of subtraction using 1’s complement arithmetic is given below:

Procedure for subtracting a smaller number from a larger number

  • Find the 1’s complement of the subtrahend, i.e. second number.
  • Add the 1’s complement of the subtrahend to the minuend (first number).
  • If an end-around carry is produced, add it to the least significant bit of the intermediate result, and the final result is positive.

Procedure for subtracting a larger number from a smaller number

  • Find the 1’s complement of the subtrahend, i.e. second number.
  • Add the 1’s complement of the subtrahend to the minuend (first number).
  • If there is no end-around carry produced, the result is negative. It is obtained by taking 1’s complement of the intermediate result.

Let us take an example to understand the procedure.

Example 1 – Subtract (1110101)2 – (1000101)2 using 1’s complement arithmetic.

Solution – Let’s perform this subtraction using the 1’s complement arithmetic.

1’s Complement Subtraction

In this example,

Minuend = (1110101)2

Subtrahend = (1000101)2

1’s complement of subtrahend = (0111010)2

Now, let us add the 1’s complement of subtrahend and minuend.

(1110101)2 + (0111010)2 = (1 0101111)2

There is an end around carry; hence, the result is positive. The final result is obtained by adding the end-around carry to the LSB of the intermediate result as follows.

(0101111)2 + (1)2 = (0110000)2

Hence,

(1110101)2 – (1000101)2 = (0110000)2

Let us take a few more examples to understand the subtraction process using 1’s complement.

Example 2:  Subtract (1011)2 from (1111)2 using 1’s complement method

The Minuend (1111)2 is larger than the subtrahend (1011)2.

Step 1– Find 1’s complement of subtrahend (1011)2.

example 2- step 1-1’s Complement Subtraction

Step 2– Add Minuend (1111)2 and the number obtained in step-1 (0100)2

example 2- step 2-solved problem

Example 3: Subtract (1011)2 from (1001)2 using 1’s complement subtraction method

The Minuend (1001)2 is smaller than the subtrahend (1011)2.

Step 1– Find 1’s complement of the larger number (1011)2.

example 3- step 1:1’s Complement Subtraction

Step 2– Add the number obtained in Step 1 and the number (1001)2

example 3 solved problem

Step 3– Determine the 1’s complement of the number obtained in step 3

example 3- step 3:1’s Complement Subtraction

Conclusion

We discussed 1’s complement arithmetic subtraction. Complement arithmetic involves finding 1’s complement and 2’s complement of a number, which helps perform subtraction using addition operations.

Leave a Comment