How Many Unique Values We Can Store in N Bits?

Share

For a data size of N bits, there is an X number of unique bit sequences that we can store in it. For example, for a data size of 2 bits, we have 00, 01, 10. and 11. Four different values.

We can calculate it with the formula X = 2^N(How to Read Math in Code in This Website).

See [Total Number of Possible Unique Values per Bit Length] for a list.

We can also call this the total number of permutations we have in N bits. Some call this the total number of combinations of N bits. I'm not very good at math, but if I remember correctly, combinations don't consider the position of the values, only how many 1's and how many 0's we'd have. Permutation is the term used when placing an item in a different place should be treated as an unique value.

Written by Noel Santos.

About the Author

I'm a self-taught Brazilian programmer graduated in IT from a FATEC. In a world of increasingly complex and essential computers, I decided to use my technical expertise in hardware, desktop applications, and web technologies to create an informative resource to make PC's easier to understand.

View Comments