Electronic – How to determine if a Carry Look Ahead Adder Overflows

addercarry-look-aheaddigital-logic

I am implementing a 32 bit CLA Adder like how a 16 bit adder is implemented in Wikipedia

Problem is how do I determine if the block overflows? I will need the carry into bit 32 (which is now in the last 4 bit CLA Adder) and XOR with carry out of bit 32(Check difference in MSB)?

UPDATE

Is my overflow logic correct

where Cin is the carry into the whole 16 bit block, P* is the Block Propagate, G* the block generate, and carry into bit 32 (typo, bit 16 MSB actually)

Best Answer

I thought about seeing what my brain could regurgitate of long ago explnatins, as opposed to commin sense observations, BUT here's a page which does it all very well indeed.

They explain a "nice" 'trick'.

  • Two's compelment overflow detection can be achieved by XORing the carry-in and the carry-out bo=its of the leftmost full adder.

Their diagram. See above ref for detailed comment:

enter image description here