Question

I learned that a register field to specify one out of 64 registers takes 6 bits.

since 64 = 26

but don't we have to consider the right most bit ?, which is 20, in which case we require 7 bits to specify one out of 64 registers..

Was it helpful?

Solution

If there is only one possible value, you need no bits at all. If you have one bit, it has two possible values.

So if there was only one register, no bits would be needed at all to select it. If there were two registers, you'd need one bit -- a zero in that bit could select one register, a one the other.

Continuing, if you have two bits, they have four possible values. If you have three bits, they have eight possible values. Going up, six bits has sixty-four possible values, so that's sufficient to chose one of sixty-four registers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top