how to allocate memory to store register number?

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..

Answers


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.


Need Your Help

Saving managed object context creates deadlock in iOS 5's performBlock

objective-c ios core-data deadlock nsmanagedobjectcontext

I've been looking for a solution for this problem for a long time and have yet reached one.

Select data from current, last, previous month and echo on chart

php mysql google-visualization

Hi I need to show total amount debited for 3 month(separately) and show them on a COLUMN CHART.