Allow registers to have value 0, stupid typo.
Make life easier: store max value instead of size in bits, remove
unnecessary check for value < 0 - we already have uints!