Forum Discussion
Altera_Forum
Honored Contributor
15 years agoNo, that is not the case.
when adding two N bit wide numbers the largest possible result is N+1 bit wide. let's assume both x² and y² are the largest possible 16 bit numbers (when using signed arithmetics): 0x7FFF and 0x7FFF or binary: 0111.1111.1111.1111 Adding those two numbers is equivalent to multiplying one of the numbers with 2. Multiplikation with 2 again is equivalent to shifting the number to the left by one, so we end up with: 0.1111.1111.1111.1110 which equals 0x0000FFFE When using unsigned arithmetics from now on we will not need the zeros at the beginning: so we end up with unsigned 0xFFFE.