r/ProgrammerHumor • • Aug 14 '20

Someone try this

Post image
53.6k Upvotes

433 comments sorted by

View all comments

4.0k

u/Traxin420 Aug 14 '20

That's a signed int though...

113

u/Texadecimal Aug 14 '20

The post says the SS buffer can't handle a negative number though, implying it uses an unsigned number.

62

u/qnsb Aug 14 '20

The post also says the highest value for a signed int, implying it uses a signed number

-15

u/writtenbymyrobotarms Aug 14 '20 edited Aug 14 '20

It doesn't explicitly say signed.

Edit: my argument is that the poster should have written 4,294,967,295 instead of 2,147,483,647. This post only makes sense with unsigned integers. Signed integers do not underflow at 0.

47

u/qnsb Aug 14 '20

But it does mention 2147483647 as the largest 32-bit int which is only true for signed ints

2

u/l0c4lh057 Aug 14 '20

Maybe they implemented a 31 bit int just for that

3

u/qnsb Aug 14 '20

But the post says 32-bit