(no title)
high_priest | 5 months ago
The true answer is that negative numbers have the top bit set, which can't be used for positive numbers. Hence positives are one bit short.
high_priest | 5 months ago
The true answer is that negative numbers have the top bit set, which can't be used for positive numbers. Hence positives are one bit short.
delusional|5 months ago
All negative numbers have the most significant bit set and 0 is the number with no bits set, ergo 0 must be positive since the most significant bit is not set.
Now arithmatically, this is untrue. We'll usually treat 0 as neither positive nor negative (or in certain cases both negative and positive) but bitwise, In terms of twos-complement implementation, Zero is positive. We know that since it exists in the unsigned version of the types as well.
Hopefully you'll see that some day.