Week4_Lecture-5-Operations-on-Bits-Part2_compressed.pdf - Carry and Overflow Examples • We can have carry without overflow and vice-versa • Four

Week4_Lecture-5-Operations-on-Bits-Part2_compressed.pdf -...

This preview shows page 1 - 4 out of 9 pages.

0 1 0 0 0 0 0 0 0 1 0 0 1 1 1 1 + 1 0 0 0 1 1 1 1 79 64 143 (-113) Carry = 0 Overflow = 1 1 1 0 0 1 1 1 0 1 1 1 0 1 1 0 1 0 + 0 1 1 1 0 1 1 1 218 (-38) 157 (-99) 119 Carry = 1 Overflow = 1 1 1 1 Carry and Overflow Examples We can have carry without overflow and vice-versa Four cases are possible (Examples are 8-bit numbers) 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 + 0 0 0 0 0 1 1 1 15 248 (-8) 7 Carry = 1 Overflow = 0 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 + 0 0 0 1 0 1 1 1 15 8 23 Carry = 0 Overflow = 0 1 1
Image of page 1

Subscribe to view the full document.