Problem
Assuming you have three N bit unsigned integers a, b and c, what is the min number of bits you would need to store the result of a * b + c?
Solution
The maximum of unsigned integer is 2N - 1, so the maximum of a * b + c is (2N - 1) * (2N - 1) + 2N - 1 = 22N - 2 * 2N + 1 + 2N - 1 = 22N - 2N
The bit number is [log2( 22N - 2N)] = N + [log2( 2N - 1)] = 2N