Widgaga has double posted his question, one with more detail than the other. The actual question is:
Originally Posted by widgaga
Hello people. I wanted to know if it is possible to solve this problem.
I have a range : - to
so if w = 4, I would have a range -8 to 7 [-8,-7,...,0,1...,7]
This represents the range for a signed integer in 2's complement form (most computers use this format). w indicates the number of bits needed for numbers in the range specified to be represented in binary.. So if w = 4, i'll have the range [-8,7] and the binary form of 4 is 0100.
The question is, given a number, say 4, can I find out the value of w?
i.e. number = - to .. find w
any help would be appreciated..
So if the range was 4 and you wanted to find w, then:
Can you continue using the law of logarithms to solve for w?