←back to thread

600 points codetrotter | 1 comments | | HN request time: 0s | source
Show context
unyttigfjelltol ◴[] No.35461635[source]
Does HN overflow to zero when dang gets there?
replies(6): >>35461645 #>>35461737 #>>35461746 #>>35461759 #>>35461796 #>>35462303 #
Koshkin ◴[] No.35461645[source]
Only the downvoting can save him.
replies(1): >>35461656 #
EGreg ◴[] No.35461656[source]
Will he be the first person to have negative karma otherwise? And the most tremendous one at that! Believe me, no one will have smaller karma than him, nobody.

What happens if he gets downvoted then? Will it wrap around to the HIGHEST KARMA? :)

replies(2): >>35461879 #>>35466978 #
dheera ◴[] No.35461879[source]
No, if an overflow at 65535 occurs it would be to 0, not negative.

signed 16-bit ints are -32768 to 32767, unsigned 16-bit ints are 0 to 65535

replies(1): >>35461962 #
maximilianroos ◴[] No.35461962{3}[source]
<a rare sighting of an int17>
replies(1): >>35462404 #
1. muzani ◴[] No.35462404{4}[source]
Why allocate more bits than you ever need?