2's Complement | Digital Circuits - Electronics and Communication Engineering (ECE) PDF Download

Introduction

  • Just like 1's complement, 2's complement is also used to represent the signed binary numbers. For finding 2's complement of the binary number, we will first find the 1's complement of the binary number and then add 1 to the least significant bit of it.
  • For example, if we want to calculate the 2's complement of the number 1011001, then firstly, we find the 1's complement of the number that is 0100110 and add 1 to the LSB. So, by adding 1 to the LSB, the number will be (0100110)+1=0100111. We can also create the logic circuit using OR, AND, and NOT gates. The logic circuit for finding 2's complement of the 5-bit binary number is as follows:
    2`s Complement | Digital Circuits - Electronics and Communication Engineering (ECE)

Example 1: 110100
For finding 2's complement of the given number, change all 0's to 1 and all 1's to 0. So the 1's complement of the number 110100 is 001011. Now add 1 to the LSB of this number, i.e., (001011) + 1 = 001100.

Example 2: 100110
For finding 1's complement of the given number, change all 0's to 1 and all 1's to 0. So, the 1's complement of the number 100110 is 011001. Now add one the LSB of this number, i.e., (011001) + 1 = 011010.

2's Complement Table
2`s Complement | Digital Circuits - Electronics and Communication Engineering (ECE)

Use of 2's complement


2's complement is used for representing signed numbers and performing arithmetic operations such as subtraction, addition, etc. The positive number is simply represented as a magnitude form. So there is nothing to do for representing positive numbers. But if we represent the negative number, then we have to choose either 1's complement or 2's complement technique. The 1's complement is an ambiguous technique, and 2's complement is an unambiguous technique. Let's see an example to understand how we can calculate the 2's complement in signed binary number representation.

Example 1: +6 and -6
The number +6 is represented as same as the binary number. For representing both numbers, take the 5-bit register.
So the +6 is represented in the 5-bit register as 0 0110.
The -6 is represented in the 5-bit register in the following way:

  • +6=0 0110
  • Now, find the 1's complement of the number 0 0110, i.e. 1 1001.
  • Now, add 1 to its LSB. When we add 1 to the LSB of 11001, the newly generated number comes out 11010. Here, the sign bit is one which means the number is the negative number.

2`s Complement | Digital Circuits - Electronics and Communication Engineering (ECE)

Example 2: +120 and -120
The number +120 is represented as same as the binary number. For representing both numbers, take the 8-bit register.
So the +120 is represented in the 8-bit register as 0 1111000.
The -120 is represented in the 8-bit register in the following way:

  • +120=0 1111000
  • Now, find the 1's complement of the number 0 1111000, i.e. 1 0000111. Here, the MSB denotes the number is the negative number.
  • Now, add 1 to its LSB. When we add 1 to the LSB of 1 0000111, the newly generated number comes out 1 0001000. Here, the sign bit is one, which means the number is the negative number.
The document 2's Complement | Digital Circuits - Electronics and Communication Engineering (ECE) is a part of the Electronics and Communication Engineering (ECE) Course Digital Circuits.
All you need of Electronics and Communication Engineering (ECE) at this link: Electronics and Communication Engineering (ECE)
6 videos|76 docs|52 tests

Top Courses for Electronics and Communication Engineering (ECE)

6 videos|76 docs|52 tests
Download as PDF
Explore Courses for Electronics and Communication Engineering (ECE) exam

Top Courses for Electronics and Communication Engineering (ECE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

2's Complement | Digital Circuits - Electronics and Communication Engineering (ECE)

,

Semester Notes

,

Important questions

,

Summary

,

ppt

,

2's Complement | Digital Circuits - Electronics and Communication Engineering (ECE)

,

2's Complement | Digital Circuits - Electronics and Communication Engineering (ECE)

,

Objective type Questions

,

video lectures

,

MCQs

,

Previous Year Questions with Solutions

,

Free

,

Viva Questions

,

mock tests for examination

,

study material

,

Sample Paper

,

Extra Questions

,

practice quizzes

,

past year papers

,

shortcuts and tricks

,

Exam

,

pdf

;