Bitstrings | ||||||||||||
N-bit number: | ||||||||||||
bN-1 bN-2...b1b0 | ||||||||||||
Can also think of this as a string of digits 0 and 1. | ||||||||||||
How many possible patterns for N-bit string? | ||||||||||||
Each bit bi can have 2 possible values | ||||||||||||
There are N such bits | ||||||||||||
Therefore, total number of patterns is | ||||||||||||
2 * 2 * . . . * 2 = 2N | (Important Binary Number Fact #1) | |||||||||||
How many different VALUES? (trick question) | ||||||||||||
It depends on the representation being used. (We will look at several.) | ||||||||||||
How many bits does it take to represent a given number N? | ||||||||||||