How many different states can you represent using 10 bits ? and what is the largest Value to be represented using 10 bits ?
1 bit, 0n Off, two states. 2 bits, 01, 10, 00, 11, four states. 3 bits 000, 001.. and so on 111 8 states \(2^1, 2^2, 2^3\ldots 2^n\)
A single bit allows 2 states. Every additional bit doubles the number of states. The largest value is tied very closely to the number of states, though it depends on the format. If you're just considering integers: 1 bit can only represent 0 and 1. 2 bits can represent 0,1,2,3. So "number of states" minus 1.
The 0 first is a good point. Another interesting one is signed vs. unsigned, but for largest I am betting they are using unsigned.
https://www.udacity.com/course/viewer#!/c-cs101/l-48689146/m-48678760 This might be a helpful video. I think you have to be enrolled in the Udacity course to be able to view it, but it gives a nice break down of what e.mccormick and bdean20 have explained above.
Join our real-time social learning platform and learn together with your friends!