|
|
|
|
|
by 6a74
1380 days ago
|
|
Neat quiz. Reminds me that the absolute value of INT_MIN in C (and many other languages) is undefined, but will generally still return a negative value. This is a "gotcha" that a lot of people are unaware of. > abs(-2147483648) = -2147483648 |
|
I think one's complement is more sensible since it doesn't have this problem, but it loses out because it requires a more complex ISA and implementation.