Mobileye Interview Question

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

Interview Answer

Anonymous

Oct 9, 2019

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