Implement not, shl and shr in mpz library. Add function to create mpzs on the stack, used for memory efficiency when rhs is a small int. Factor out code to parse base-prefix of number into a dedicated function.
Some functionality is still missing (eg and, or, bit shift), and some things are buggy (eg subtract).