Remix.run Logo
karmakaze 18 hours ago

The excess-(2N−1) offset binary representation has the useful property where storing a sequence of them in memory, MSB-first means you can lexographically process the bytes opaquely and it results in ordering by their values. MySQL uses this (2's complement with inverted sign) for indexing or sorting. You can see this in the hex value displays in deadlock logs.