Negative Qi Coins? (What happens when you win CalicoJack too much)

This is a pretty common bug : https://en.wikipedia.org/wiki/Integer_overflow

To make explication simple, in a software we use "signed integer" to save values, but it has limits (from ~-2 000 000 000 to ~+2 000 000 000). If your value become bigger than te limit, your number will be overflowed, and become negative.

This is due to binary representation. to number is represented by 31 bits, and the 32nd it to numeral sign (+ or -). So if you number is 01111111 (I use 8 bits for simplicity again), it represents +127 (the first bit is for 0=+ or 1=-). If you add 1, it become 10000000, which means -128 (for performances reasons, creators of the system decided to invert the whole value in negative values)
 

BlaDe

Farmer
This is a pretty common bug : https://en.wikipedia.org/wiki/Integer_overflow

To make explication simple, in a software we use "signed integer" to save values, but it has limits (from ~-2 000 000 000 to ~+2 000 000 000). If your value become bigger than te limit, your number will be overflowed, and become negative.

This is due to binary representation. to number is represented by 31 bits, and the 32nd it to numeral sign (+ or -). So if you number is 01111111 (I use 8 bits for simplicity again), it represents +127 (the first bit is for 0=+ or 1=-). If you add 1, it become 10000000, which means -128 (for performances reasons, creators of the system decided to invert the whole value in negative values)
Yeah, I had hypothesised Qi coins would overflow, just wanted to prove it and thought others would get a kick out of it.
 
Top