why is the unsigned binary range of 2^6 63 bits? -
unsigned 6 bits ranges 0 63, , can there because 2^6 = 64. wouldn't 6 bit binary string go 2^5? first bit 2^0 no ...? going wrong here? i'm aware simple question please me understand not know much
a 6 bit binary string goes 0b000000
to
0b111111 = 2^5 + 2^4 + 2^3 + 2^2 + 2^1 + 2^0 = 32 + 16 + 8 + 4 + 2 + 1 = 63 = 64 - 1 = 2^6 - 1
that sum of 2^i
i in 0, 1, … (n-1)
evaluates 2^n - 1
peculiarity of number two.
Comments
Post a Comment