You can easily calculate the unsigned bit integer limit by using this equation, let's use B as the number of bits: (2 ^ B) - 1 so that means that if B is equal to 8, the unsigned bit integer limit would be 255. for a SIGNED bit integer limit, things get a little hard. but it's simple at the same time! all you have to do is: lower limit: ((2 ^ (B - 1)) - 1) * -1 upper limit: (2 ^ (B - 1)) - 1 we throw away the one bit because it's only used for signing ("+" or "-") and is not part of the actual number.