• edited by
17,192 views
36 36 votes

Using a $4-bit$ $2's$ complement arithmetic, which of the following additions will result in an overflow?

  1. $1100 + 1100$
  2. $0011 + 0111$
  3. $1111 + 0111$
  1. i only
  2. ii only
  3. iii only
  4. i and iii only

4 Answers

Best answer
56 56 votes

Only (ii) is the answer. 

In $2's$ complement arithmetic, overflow happens only when 

  1. Sign bit of two input numbers is $0$, and the result has sign bit $1$
  2. Sign bit of two input numbers is $1$, and the result has sign bit $0$.

Overflow is important only for signed arithmetic while carry is important only for unsigned arithmetic.

A carry happens when there is a carry to (or borrow from) the most significant bit. Here, (i) and (iii) cause a carry but only (ii) causes overflow. 

http://teaching.idallen.com/dat2343/10f/notes/040_overflow.txt

• edited by
9 9 votes

$($ Carry of $n-1^{th}$ $\oplus$ Carry of $n^{th}) = 1$ Then overflow in 2's complement

$\text{Format of a number here}:\color{green} {C_4}\color{red}{C_3}C_2C_1C_0$ 

In above format $C_4$ is $n^{th}$ carry

$(i) \space 1100 +1100 = 1000 $  Here $C_{n-1} = 1 , C_n = 1$  so $C_{n-1}\oplus C_n = 1 \oplus 1 = 0$

$(ii) \space 0011 +0111 = 1010 $  Here $C_{n-1} = 1 , C_n = 0$  so $C_{n-1}\oplus C_n = 1 \oplus 0 = 1$

$(iii) \space 1111 +0111 = 0110 $  Here $C_{n-1} = 1 , C_n = 1$  so $C_{n-1}\oplus C_n = 1 \oplus 1 = 0$

So option $B$ is only right choice

0 0 votes
we can also use overflow logic----->
OV(x,y,z) =x'y'z + xyz'
where x is msb bit of operand 1.y is msb bit of operand 2.And z is msb bit of result excluding carry.
–2 –2 votes
D) (i) and  (iii) only.

Please comment if anyone finds it wrong !
Answer:
Position:
Show:

Related questions

32 32 votes
2 answers 2 answers
6.8k
6.8k views
Ishrat Jahan asked Nov 2, 2014
6,791 views
The number $(123456)_8$ is equivalent to$\text{(A72E)}_{16}$ and $(22130232)_4$$\text{(A72E)}_{16}$ and $(22131122)_4$$\text{(A73E)}_{16}$ and $(22130232)_4$$\text{(A62E)...
25 25 votes
2 answers 2 answers
9.7k
9.7k views
Ishrat Jahan asked Nov 1, 2014
9,681 views
What is the minimum size of ROM required to store the complete truth table of an $8-bit \times 8-bit$ multiplier?$32 K \times 16$ bits$64 K \times 16$ bits$16 K \times 32...
41 41 votes
5 answers 5 answers
16.9k
16.9k views
Ishrat Jahan asked Nov 1, 2014
16,918 views
What is the minimum number of $\text{NAND}$ gates required to implement a $2\text{-input EXCLUSIVE-OR}$ function without using any other logic gate?$2$$4$$5$$6$
56 56 votes
5 answers 5 answers
12.4k
12.4k views
Ishrat Jahan asked Nov 2, 2014
12,393 views
The function $A \bar B C + \bar A B C + AB \bar C+ \bar A \bar B C+ A \bar B \bar C$ is equivalent to$A \bar C + AB+ \bar A C$$A \bar B+ A \bar C+ \bar A C$$\bar A B+ A \...