If you read the buffer with bc.intsfrombytes then you get the following:
1. for number from 0 to 2,147,483,647 - the same as the original Uint
2. if you get negative number - then add it to 4,294,967,295 (with the sign) so the result is less then 4,294,967,295.