Go Back   PCMech Forums > General & Off Topic > General Discussion

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 02-06-2004, 10:31 AM   #1
Member (10 bit)
 
Craig100's Avatar
 
Join Date: Sep 2003
Location: Edinburgh
Posts: 572
Send a message via MSN to Craig100
Maths

Hey,

Well this question has got me stuck,
if i have a number such as 16777216 which is 2 ^ 24, but, how can i, without trial and error, get that it is 2 ^ 24. in this case i know the answer is 2^24 but sometimes it may not be that simple. this is a question in computing which asks for me to figure out the minimum width of an address bus in a system with 64MB of ram organsied in 32bit words.

What i done so far is change 64mb into bits, and divide it by 32 , which gives the answer above, and is 2^24. but without guessing that it is 2^24 and checking it, is there another way i can get this?
Craig100 is offline   Reply With Quote
Old 02-06-2004, 10:39 AM   #2
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Are you trying to figure out X in this equation: 2^X=some number?

If so, then it is simple: diving the natural logarithm (usually LN on calculators) of the "some number" by the natural log of 2.

For example, (ln 16777216)/(ln 2) = 16.6355/.6931 = 24, so 16777216 = 2^24.
doctorgonzo is offline   Reply With Quote
Old 02-06-2004, 11:10 AM   #3
Member (10 bit)
 
Craig100's Avatar
 
Join Date: Sep 2003
Location: Edinburgh
Posts: 572
Send a message via MSN to Craig100
Thats exactlly what i want to do , i get what you mean, i have tried it out successfully, thankyou.

Regards
Craig100 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:49 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2