Professional Documents
Culture Documents
Animesh Renanse
180108048
02/09/2019
1 Problem 3 Answers
Q1: If the number is unsigned, will there be a need of both carry and over-
flow flag?
Ans: Whenever the number is unsigned, the carry flag and output flag will
produce same output, therefore eliminating the need of both of them at the
same time.
Q2: To get a clear idea of when carry and an overflow is generated solve
the following cases for an 8 bit signed number. Determine if there is a carry
output or/and will it overflow.
• 100+49
• -2-1
• 51+28
• 126-64
Ans:
• 100 + 49 = 149 > 127, i.e. The limit of 7 bit binary number as the 8th
bit is used for sign convention.
Thus, Overflow = 1,
1
since 01100100 + 00110001 = 010010101, which have more than 8 bits,
that’s why there is an overflow
There will also be Carry = 1.
• 51 + 28 = 79
Clearly, Overflow = 0 and Carry = 0 as 79 < 127.
• 126 − 64 = 62
Again, clearly, Overflow = 0 and Carry = 0.