Remix.run Logo
high_priest 3 days ago

The 0 is positive is not true, but some day you are hopefully going to get it.

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 3 days ago | parent [-]

Youre literally saying the same thing as me.

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.