Complements of Numbers: Maths of Binary Number Subtraction for GIS Processing (Especially for GATE-Geospatial 2022)

Doorsteptutor material for CBSE/Class-6 is prepared by world's top subject experts: get questions, notes, tests, video lectures and more- for all subjects of CBSE/Class-6.

Examrace Books on Mapping, GIS, and Remote Sensing prepares you throughly for a wide range of practical applications.

Complements

There are two types of complements for each base- system:

This Diagram Shows Two Types of Complements

There are two complements in any number system; namely, base՚s complement and (base -1) ‘s complement. The base՚s complement and (base - 1) ’ s complement of a number is base , having digit capacity, and are defined as and , respectively.

The complement addition process is clarified here with the help of decimal and binary number systems. In decimal and binary number systems the base ′ s and (base - 1) ′ s complements are called 10 ′ s complement, 9 ′ s complement and 2 ′ s complement, 1 ′ s complement, respectively.

Example

Subtract 256 from 512 with 5-digit capability, using 10՚s complement method

Here, 00512 is the minuend and 00256 is the subtrahend

Now, 10՚s complement of

Therefore,

(by ignoring the carry 1 from the MSD position)

Example

Subtract 256 from 512 with 5-digit capability, using 9՚s complement method

Now, 9՚s complement of

Therefore,

In case of binary, if we interchange 0s by 1s and 1s by 0s of the bit patterns, we get the corresponding bit patterns of 1՚s complement.

Example

Subtract 00111 (7) from 01001 (9) with 5-bit capability, using 1՚s complement method

Now, 1՚s complement of subtrahends

Therefore,

Example

Subtract from with 5-bit capability, using 2՚s complement method.

This Image Shows Example of 2՚s Complement Addition

Here,

01001 (minuend)

00111 (subtrahend)

2՚s complement of subtrahend is

Now,

Developed by: