tag:blogger.com,1999:blog-10220498.post113893950867378836..comments2022-09-28T06:29:11.392-05:00Comments on Math Teacher Mambo: TutoringShireen Dadmehrhttp://www.blogger.com/profile/16282965851939089408noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-10220498.post-1139455702287918462006-02-08T21:28:00.000-06:002006-02-08T21:28:00.000-06:00Ooh, I like that problem. Do I get to use a calcul...Ooh, I like that problem. Do I get to use a calculator or multiple calculations? ....<BR/><BR/>1st thought: keep dividing your number by 2, and if you ultimately end up at 2, then it's a power of 2.<BR/><BR/>2nd thought: (though it didn't work on the calculator I'm guessing because of the LARGE number) 2^x = 2147483647 (or whatever the # is, then x*ln(2) = ln(2147483647), and therefore, x = ln(214...)/ln(2), and if that's an integer, then you have your power.<BR/><BR/>Thanks for the brain teaser.<BR/><BR/>Ms. CookieAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-10220498.post-1139399598047023392006-02-08T05:53:00.000-06:002006-02-08T05:53:00.000-06:00Ok, here's one I'm struggling with: I have a numbe...Ok, here's one I'm struggling with: I have a number between 1 and 2147483647.<BR/><BR/>How do I tell if my number is a power of two. i.e. 65536 = 2^16<BR/><BR/>Is there an easy way, without just knowing all the powers of two. :)<BR/><BR/>Owl.Anonymousnoreply@blogger.com