



Store




CTK Exchange
DMays
guest

Nov2205, 10:37 PM (EST) 

"Base 8"

I need your help. I was told that this number is in code, possibly Base 8. I need to convert this number string to another number that might possibly be GPS coordinates. If any of this makes sense to you, and you can help, it would be appreciated. Thanks in advance. 124157040146151156144040164150145040143141143150145054040147157040163164141156144040165156144145162040164150145040104157165147150142157171047163040142141171157156145164054040164150145156040147157040056065066040155151154145163040157156040141040142145141162151156147040157146040061060062040144145147162145145163040164162165145 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 



alexb
Charter Member
1714 posts 
Nov2405, 10:55 AM (EST) 

4. "RE: Base 8"
In response to message #3

The algorithm for base conversion does not depend on the size of the numbers. Its implementation may. For the algorithm itself, please search this site. As to the implementation, Java has a class BigInteger that accepts strings of arbitrary length. So in Java, it was pretty simple: BigInteger bi = new BigInteger(yourNumberString, 8); // octal system print(bi.toString(10)); // decimal system Now, this probably won't satisfy your curiosity. For, the explanation begs a question, "And how the class BigInteger has been implemented?" Well, I do not know the details, but can imagine a possibility of having a sequence of integers where each member is considered as a "big digit". For example, you can store numbers in triples of digits. Say, 1234567770 could be stored as 770 + 567·10^{3} + 234·10^{6} + 1·10^{9}, or as, say, (1, 9), (234, 6), (567, 3), (770, 0) Multiplication and division over such explicit'sequences can certainly can be devised, although, again, the implementation may be tedious. 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 






mr_homm
Member since May2205

Dec0105, 07:52 AM (EST) 

6. "RE: Base 8"
In response to message #5

The number you have posted is long enough that it is probably possible to extract clues about how to decode it by checking for internal patterns. The most obvious way is to compute its autocorrelation function. Look for peak values in the autocorrelation to find periodic patterns of digits. This gives a clue as to how to break up the long number into shorter messages, each of which should be some kind of geographic coordinates. To calculate the autocorrelation, make two copies of your number, and in the second copy, shift all the digits n steps to the right and wrap the last n digits back to the beginning of the number (basically, roll the number to the right by n digits). Then place the new number directly below the original number, and multiply each digit in the shifted number with the digit directly above it, and add up all the individual products you get this way. What you get is A(n), the autocorrelation with a shift of n. Do this for all n's starting from n=0 up to n = length of your number. Graph what you get and look for peaks in the graph. The position of the first sharp peak shows that the number contains some kind of repeating pattern, and the length of the pattern is equal to the value of n where the peak occurs. The latitude, in the degrees and decimal arcminutes format you have mentioned, will need to represent numbers up to 180 degrees, which will require 8 binary digits (since 2^8 is the first power of 2 which is larger than 180), and upto 59.999 minutes, which will require 16 binary digits (since 2^16 = 65536 is the first power of 2 which is larger than 59,999). Altogether the numbers will require 24 digits, and at least one extra digit to represent N or S. The longitude coordinate is similar. Therefore, each coordinate pair will require a minimum of 50 binary digits, and perhaps more if there are some start and stop code numbers. Since 3 binary digits is one base 8 digit, this means that each coordinate pair must be at least 13 digits long. Its actual length may be longer if there are any "filler numbers." Then, within each shorter message, look for key number combinations that probably represent N S E and W. These would be expected to be in similar positions within each message, and in each position, there should only be two values, representing N or S in the first postion, and E or W in the second. Also, it is possible that the number values will be signed, with plus representing N and E, and minus representing S and W. The representation of signed numbers can be done with either sign/magnitude or with 2's complement format, which requires converting the base 8 digits into binary. Either of these formats will start with a binary digit 1 if negative and 0 if positive. A base 8 digit "7" represents three 1's in a row, and so is likely (but not certain) to be the start of a negative number. This is basically a lesson in codebreaking, since you don't have direct knowledge of how the geographical coordinates are encoded in the number string. The best thing to do, of course, is to simply ask the person responsible for the number string what the encoding is, but I assume you can't do that, or you wouldn't be asking here. There is much more to codebreaking than what I have said here, and much more in fact that I do not know (I'm only an amateur). One thing I do know is that codebreaking can be a LOT of work! And you're never really sure you've got it right until you can try your decoding method on a fresh number string from the same source. Hope this helps, Stuart Anderson 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 



DMays
guest

Dec1305, 03:11 PM (EST) 

7. "RE: Base 8"
In response to message #0

Thanks everyone for your help, we have solved the puzzle. The number string was a list of three digit ASCII code that needed to be converted from Octal to Character format. 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 


You may be curious to have a look at the old CTK Exchange archive. Please do not post there.
Front page
Contents
Copyright © 19962018 Alexander Bogomolny

