Results 1 to 2 of 2

Math Help - Given a base, find the exponent

  1. #1
    Newbie
    Joined
    Sep 2010
    Posts
    2

    Given a base, find the exponent

    Hello people. I wanted to know if it is possible to solve this problem.

    I have a range : - 2^{w-1} to 2^{w-1}-1

    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 = - 2^{w-1} to 2^{w-1}-1.. find w

    any help would be appreciated..
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member Educated's Avatar
    Joined
    Aug 2010
    From
    New Zealand
    Posts
    421
    Thanks
    11
    Range = (2^{w-1}-1) - -2^{w-1}

    So if the range was 4 and you wanted to find w, then:

    4 = 2^{w-1} -1 + 2^{w-1}

    4 =  2 * 2^{w-1}-1

    5 =  2 * 2^{w-1}

    log{5} =  log{2} + log{2^{w-1}}

    Can you continue using the law of logarithms to solve for w?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Base is a number, exponent is a variable
    Posted in the Algebra Forum
    Replies: 11
    Last Post: March 20th 2011, 05:49 PM
  2. Given a base, find the exponent
    Posted in the Algebra Forum
    Replies: 2
    Last Post: September 4th 2010, 06:52 PM
  3. Finding the base of an exponent
    Posted in the Algebra Forum
    Replies: 3
    Last Post: January 21st 2010, 06:21 PM
  4. Simplifying a fractional base to exponent
    Posted in the Algebra Forum
    Replies: 3
    Last Post: October 27th 2009, 08:52 PM
  5. Replies: 3
    Last Post: July 16th 2008, 04:32 AM

Search Tags


/mathhelpforum @mathhelpforum