295
u/headprocess Apr 04 '21
Assuming it's unsigned and stored on 16 bits. But might as well happen on MTG Arena, if they implemented it in a similar way as life totals. :D
149
39
u/noop_noob Apr 04 '21
Life totals can go negative though.
43
Apr 04 '21
I think that they’re referring to the fact that your life gets so high it goes into the negatives sometimes in arena
17
u/MageKorith Apr 04 '21
That would imply that the variable is being interpreted as a signed integer. An unsigned integer doesn't have the sign bit in the highest register, so if you had a 16 bit unsigned integer storing 0000 0000 0000 0000 in the 16 registers and attempted to subtract 1, you'd get 1111 1111 1111 1111. In unsigned integer values, that means 65.535 in base 10. In signed integer values, that means -1
98
u/zyphelion Apr 04 '21
Is this how you can sideload new code so you can run DOOM on magic?
53
7
6
Apr 05 '21
[removed] — view removed comment
4
u/jasoba Apr 05 '21
Yes and no.
I looked it up and some people use underflow for Floating Point Arithmetic Imprecision. I know computers sometimes have a hard time dividnig stuff so I think this reveres to this.
Anyway underflow is used as opposite for overflow.
33
Apr 04 '21
[removed] — view removed comment
62
u/Rathayibacter Apr 04 '21
Integer underflows and overflows are from computer science, and refer to two particular ways computers can get confused when presented with something unexpected. An unsigned integer is a variable that can be anywhere from 0 to some large value (in this case 65535, the largest value a 16-bit integer can store), but it can't go any higher or lower because there's just not enough room allocated to them. Instead what'll happen is, if it tries to go below 0, it underflows and swings around to the top end of the range and continues from there. The same can happen the other way, too- if you reach the top end of the integer and try to keep going, it'll overflow and drag you all the way back to 0.
20
u/Eiim Apr 04 '21
But does it let you search for [[Gleemax]]?