Complement of Numbers in Digital Electronics

 

Introduction

In digital electronics, the concept of complements plays an important role in performing arithmetic operations, representing negative numbers, and simplifying circuit design. Complements are alternative representations of numbers that make it possible to carry out subtraction by addition, which is much easier to implement in hardware. They are also used in error detection techniques.

There are two types of complements generally considered for any number system with base r:

  1. (r – 1)’s complement, known as the diminished radix complement

  2. r’s complement, known as the radix complement

Depending on the base of the number system, these complements take different forms such as 9’s and 10’s complements for decimal numbers, 1’s and 2’s complements for binary numbers, and 15’s and 16’s complements for hexadecimal numbers.

Complements in the Binary System (Base 2)

1’s Complement
The 1’s complement of a binary number is obtained by replacing every 0 with 1 and every 1 with 0.
For example, the 1’s complement of 101100 is 010011.

2’s Complement
The 2’s complement of a binary number is obtained by taking the 1’s complement and adding 1 to the least significant bit.
For example, the 2’s complement of 101100 is 010100.

The 2’s complement is widely used in digital systems for representing negative numbers and performing subtraction using addition.

Complements in the Octal System (Base 8)

7’s Complement
Subtract each octal digit from 7.
Example: 7’s complement of 325 (octal) = 452 (because 777 – 325 = 452)

8’s Complement
Take the 7’s complement and add 1.
Example: 8’s complement of 325 (octal) = 452 + 1 = 453

Complements in the Decimal System (Base 10)

9’s Complement
The 9’s complement of a decimal number is obtained by subtracting each digit from 9.
For example, the 9’s complement of 3256 is 6743.

10’s Complement
The 10’s complement of a decimal number is obtained by taking the 9’s complement and adding 1 to the least significant digit.
For example, the 10’s complement of 3256 is 6744.

Complements in the Hexadecimal System (Base 16)

15’s Complement
The 15’s complement of a hexadecimal number is obtained by subtracting each digit from F.
For example, the 15’s complement of 2A3 is D5C.

16’s Complement
The 16’s complement of a hexadecimal number is obtained by taking the 15’s complement and adding 1.
For example, the 16’s complement of 2A3 is D5D.

Applications of Complements

  1. Representation of Negative Numbers
    Complements are used to represent negative numbers in binary and hexadecimal systems.

  2. Simplification of Arithmetic Operations
    Subtraction can be carried out by addition using complements, which reduces the complexity of hardware circuits.

  3. Error Detection
    Complements are also applied in error detection methods in digital systems


Conclusion

Complements are a fundamental concept in digital electronics and number systems. Whether in decimal, binary, or hexadecimal, complements provide an efficient way to represent negative numbers and perform arithmetic operations. Among all, the 2’s complement system is most widely used in digital computers due to its simplicity and efficiency in hardware implementation.


To download the notes click here



Comments

Popular posts from this blog

Decimal to BCD Conversion (8421, 5421, 2421 Codes) – Digital Electronics

Decimal Number Conversion

Octal conversion