Mobileye interview question

How to make sure 2 unsigned ints addition doesn't cause overflow?

Interview Answer

Anonymous

9 Oct 2019

1. turn off MSB (save aside), add and than check 2. if(a < MAX_UINT - b) add(a, b);