in Digital Logic recategorized by
1,285 views
4 votes
Using binary full adders and other logic gates (if necessary), design an adder for adding $4$-bit number (including sign) in $2’s$ complement notation.
in Digital Logic recategorized by
by
1.3k views

Subscribe to GO Classes for GATE CSE 2022

2 Answers

11 votes
 
Best answer

Overflow condition in $2's$ complement number system:-

  1. $c_{3} = 1,c_{4} = 1\implies$ No overflow
  2. $c_{3} = 0,c_{4} = 0\implies$ No overflow
  3. $c_{3} = 1,c_{4} = 0\implies$ Overflow $(a_{3} = b_{3} = 0)$
  4. $c_{3} = 0,c_{4} = 1\implies$ Overflow $(a_{3} = b_{3} = 1)$

We can conclude that the overflow condition for $2's$ complement number system is: $$c_{3}\oplus c_{4} = 1\\ \text{(OR)} \\ \bar{a_{3}}\cdot \bar{b_{3}}\cdot s_{3} + a_{3}\cdot b_{3}\cdot\bar{s_{3}} = 1$$

Here, we used $4-bit$ binary full adder and Ex-OR gate.

The Ex-OR gate is used to check the overflow condition.

selected by

10 Comments

The OR part of overflow condition is wrong. please correct it.
0
What's wrong with that?
0
edited by

$\bar{a_3}⋅\bar{a_3}⋅s_3+a_3⋅b_3⋅\bar{s_3}=1 $

this will be a'b's+abs' =1

0
okay I will corrected
1

@Lakshman Patel RJIT

What do you mean by "design an adder for adding 4-bit number (including sign) in 2’s complement notation." (Highlighted one)?

0
It means take 2 numbers then convert them to 2's complement form and then add them using adder
1

@Satbir

What happen if we do same thing in 1's complement form or sign magnitude form?

0
you can try to design circuit for that cases with simiilar approach as given in answer.
0
@satbir how have you derived this condition for the overflow?
1

@PratikDey0316

I think, for the second part of the overflow condition it basically says that, since a3 and b3 bits are sign bit so if two positive number are being added(sign bit is 0) then their result cannot be negative(s3 cannot be 1), Similarly, when two negative numbers are being added(sign bit is 1) then their result cannot be positive(s3 cannot be 0). If I am wrong here then please correct me.

As for the first part of the overflow condition you can refer this link: http://sandbox.mc.edu/~bennet/cs110/tc/orules.html

 

1
0 votes

The Ex-OR gate is used to differentiate b/w normal binary addition vs 2’s complement addition.

ref:- https://www.ijert.org/efficient-design-of-2s-complement-addersubtractor-using-qca-2

edited by

Related questions