Wednesday, 21 January 2009
Mental Binary to Octal and Another Clock Problem Solution
Two brief items of interest, both very different. In my last blog I wrote about the problem sent by my good friend from Japan, Al Harmon.
How long after 7:00 will the second hand bisect the angle formed by the other two hands?
I gave the first answer, time wise, bisecting the obtuse angle between the hands. Al reminded me that there was, of course, another bisecting time after the second hand passed the hour hand... and supplied his answer, which is below if you want to work the problem out yourself.
A second problem came up from a question asked at the Math Forum. I occasionally answer questions on the T2T (Teacher to Teacher) web site at the Math Forum and came across an interesting question the other day which asked me how to convert a binary number to base eight. As a brief example, convert the binary number 1010010111011 to base eight... wait... mentally, no calculator, no pencil and paper... start now!
The Clock Problem
Al sent me his answer of 47.9327 seconds after the hour. I worked it out this way.... (and fortunately got the same answer.)
With the hour hand to the second hand as one of the two congruent angles and the angle from the minute hand passed the 12 to the minute hand... the first angle would be simply the angle of the second hand minus the hour of the minute hand, or in terms of T seconds, 6T- (210+T/120). The angle from the second hand to the 12 position on the clock would be 360-6T degrees, and the minute hand would be another T/10 degrees beyond the 12 position where it had started. Adding these two gives the angle between minute and second to be 360 - 59T/10
When we set these equal to each other and simplify we have 360 - 59T/10 = 719T/120 - 210. Transposing the like terms we get 570 = 1427T/120 and multiplying by the reciprocal of the fractional coefficient I got T=47+ 1331/1427
seconds ... checking the angles... at 7:00,47.932726 the hour hand is at 210 +47.932726 /120 = 210.3994394 degrees. The second hand is at 6(47.932726 ) = 287.596356 degrees so the angle between them is 77.1969166 degrees. The minute hand has moved T/10 degrees so it is at 4.7932726 degrees positive from the 12 position, and the second hand is 360- 287.596356=72.403... adding the minute hand gives the same angle as the first to six digits, so I'm calling that a solution.
Convert a binary number to base eight, mentally.
I realized that this conversion was really easy and the same idea could be used for any conversion from one base to some base that was an integer power of it... I don't remember the actual probelm, but suppose it was 1010010111011 (typing semi randomly)... The trick is to simply divide it into periods of three (starting from the right) 1 010 010 111 011 . Now for each period or part of a period (like the first one) simply convert that three digits to base ten (which for numbers less than eight, and all three digit binary numbers must be, is also the value in base eight)... and replace directly... so
1 010 010 111 011 is replaced by
1 2 2 7 3 which is the base eight value for the same number. and of course you could go back from base eight to base two by just reversing the directions, replace each digit of the base eight number with a binary equal.
You could do hexadecimal by marking off periods of four digits in the same way...
If the task was to convert base 3 to base 9 you would just take groups of two digits
2012 in base three is (20 12 ) 20 in base three just means two times three, so we replace 20 with a six.. and 12 is a three with two ones, so we replace it with a five to get 65 (base nine) = 2012 base three...
If you are a little rusty in converting bases, here is the conversion of any base to base ten ...
the place values in base ten are 1, 10, 100, 1000, etc working from right to left... you should recognize these as powers of 10... ie 10^0, 10^1, 10^2, etc... for any other base it works the same way... for base two the place values are 1, 2, 4, 8, 16... and for base three it would be 1, 3, 9, 27, 81, .... Base eight used above would be 1, 8, 64, 512...
To find the decimal expression for a number in another base, just multiply each digit times its place value and add the products together. 2012 base three is 2(27)+0(9)+1(3)+2 = 59 ; so I should get the same thing if I check 65 in base nine... 6(9) + 5 = 59.... (one right in a row!!!)
To express 12273 base eight in base ten we do 1(8^4) + 2(8^3)+ 2(8^2) + 7(8)+ 3... a big number, and I leave it to you to check that that is equal to what you get if you convert the binary 1010010111011 to decimal.
I love the mental conversion from binary to octal... I work with computer geeks and not a single one could do it... Thanks for making ME look like the clever one.
ReplyDelete