Home > Consumer  > 

Nines complement subtraction

When you are doing arithmetic by hand because your calculator’s batteries just gave up and your laptop is in the other room, it’s best if you can check your calculations with a different process than you had used in the first place. By using a different process for checking your work, you very much diminish any chance of your making the same error twice.

For checking subtractions, the use of nines complement arithmetic offers just that advantage

We all learned how to do subtraction in elementary school. A few illustrative examples of that process are shown in Figure 1. The only thing specially selected about these examples is that they are each with a different number of significant digits just to show that the processes of subtraction apply to each and every one of them.

Figure 1 Rudimentary subtraction examples.

Advancements in LED Drivers for Next-Generation Automotive Exterior Lighting09.18.2023

Reducing the Production Cost of Integrated Circuits in the Integration Era09.14.2023

Democratizing Edge AI and ML with a No Code Approach09.12.2023

Now envision yourself having worked day and night, you’re burning the midnight oil and you’re bleary and utterly exhausted. Pushing on like the trooper you are, there are some scraps of paper in front of you on which you have done some subtraction calculations and you want to check some of those penciled in numbers. There is a way to do that which will minimize the possibility of you repeating any error just in case you’ve made one because the procedure and steps you take next will not be the same procedures and steps you’d already used.

The first step is to replace each numeral in the smaller number with its nines complement. The nines complement is that number which when added to the original number adds up to nine. Thus, the nines complement of 3 is 6, the nines complement of 7 is 2 and so on. You then add that nines complemented number to the original larger number (Figure 2).

Figure 2 Adding to the nines complemented number.

The most significant digit of this first sum will always be 1. It will never be anything else no matter how many significant digits you’re working with.

Next, you slide that most significant 1 down and underneath the least significant digit of your intermediate sum and do another addition (Figure 3).

Figure 3 The slide and add step.

The result of this second addition will always be equal to the result of the straight subtraction process.

If the number of significant digits of the smaller original number is less than the number of signficant digits of the larger original number, we rewrite that smaller number with leading zeros. Normally, we don’t write those leading zeroes, but we will do it here. Then, knowing that the nines complement of zero is nine, we proceed in exactly the same fashion as described above and we get exactly the correct result.

Figure 4 Using Leading Zeros when the smaller number has less significant digits.

John Dunnis an electronics consultant, and a graduate of The Polytechnic Institute of Brooklyn (BSEE) and of New York University (MSEE).

Related articles:

Thinking in mathEngineering writing instruction takes a math-based approach10 free math analysis and design tools for engineersUse math tools in your engineering designs
tags: [db:TAGS]

Nines complement subtraction由Voice of the EngineerConsumerColumn releasethank you for your recognition of Voice of the Engineer and for our original works As well as the favor of the article, you are very welcome to share it on your personal website or circle of friends, but please indicate the source of the article when reprinting it.“Nines complement subtraction