The Basics of Binary - Part 0 Seaton, South Australia, Australia
By
Laighside Legends on 13-Oct-12. Waypoint GA4637
Cache Details
Difficulty: | |
Terrain: | |
Type: | Unknown or Mystery |
Container: | Small |
Coordinates: | S34° 53.423' E138° 30.905' (WGS 84) |
54H 272920E 6136295N (UTM) | |
Elevation: | 3 m |
Local Government Area: | Charles Sturt |
Description
Lets learn binary!
Recently (well it was over a year ago now...) a nearby cacher said "binary is too hard". Well hopefully this cache will fix that!
Why do we need Binary?
In the world of digital electronics signals are either ON or OFF. So if we have 8 wires that can each be either on or off how do we send some useful data down them? Well we first turn that data into a binary number and then send each bit along a different wire where 1=ON and 0=OFF. Simple?
Each digit (0 or 1) is one bit.
Eight bits is one byte.
1024 bytes is one kilobyte (kB)
1024 kilobytes is one megabyte (MB)
And so on...
So how do we turn all our useful data into binary???
Positive Integers
In our everyday counting system (decimal) we use 10 symbols (0-9) to represent numbers and for larger numbers we use combinations of these 10 symbols. Decimal and binary are both positional counting systems.
An example been:
Each digit represents one position multiplied by 10 to the power of that position. Decimal is also known as "base 10".
Binary works in much the same way except there are only 2 symbols (0-1) and it is referred to as "base 2"
The same number from the above example in binary:
Obviously binary numbers are much longer since we have fewer digits to use.
Hexadecimal
Binary numbers are long and tedious to write out. Converting between binary and decimal is not overly simple. This is where the hexadecimal system comes in. It is a "base 16" system with 16 symbols (0-9 and A-F). The length of numbers is slightly shorter than their decimal equivalents but more importantly it is really easy to convert between hexadecimal and binary. This is because each hexadecimal digit represents 4 binary digits and vice-versa.
So to convert a hexadecimal number to binary all we have to do is convert each digit separately and then join all the results together. And to go the other way just split the binary number up into groups of 4 and convert each group. An example using the same binary number as above:
Negative Integers
With regular decimal numbers to represent and negative number we just add a "-" to the start of the number. You could do the same with binary but how do we store a "-" in computers? The logical thing to do would be to make the first bit represent the sign (0 means +, 1 means -). This is called 'sign and magnitude' notation and it is very rarely used since it doesn't work with addition and subtraction and it creates a problem with -0 (which does not equal +0).
So instead we use whats called '2s complement' notation. At this point the length of the number becomes important. The following example will use a 1 byte number that's 8 bits (digits) long. Assuming just positive numbers the range is from 0 to 255. In '2s complement' notation the range is from -128 to +127. The numbers from 0 to +127 are all represented in the same way as before. At this point we "jump" back down to -128 and continue on to -1.
The table below shows how it works:
This many seem a bit of an odd way to do it but we do it since it works with addition and subtraction.
Example adding 20 to -10: 1111 0110 + 0001 0100 = 0000 1010 which is +10
Text
So how do we save words?
To save letters (characters) we use a table such as ASCII which assigns each character a unique number between 0 and 127.
Some ASCII examples been:
"A" is 65
"a" is 97
"$" is 36
space is 32
These numbers are then just stored as regular unsigned binary numbers. In modern computers however Unicode is more commonly used than ASCII because it has a much larger range of characters such as foreign languages and mathematical symbols.
Images
How do we save pictures?
There are many ways of doing this but the most simple one as used in the .bmp file format works as follows.
First we split the picture up into individual pixels. Each pixel is then represented as a percentage of the three primary colors Red, Green and Blue (RGB). The percentage is then represented as a number from 0 (0%) to 255 (100%).
Some examples:
This is the 24 bit colour system since to store the three numbers takes 24 bits.
Non-integer numbers
Finally, how do we save -34.89 ?
We use whats called a floating point number. Do you remember scientific notation back when you learn it in school? For those who don't it is the fact that any number (except 0) can be written like where there is always only 1 digit before the decimal place. This is called scientific notation.
The same thing can be done with binary numbers. -34.89 in binary is -100010.111001 and in scientific notation it is . So all we have to do to save this is save the sign, decimal part of the number (mantissa) and the exponent. How this is done depends on the number of bytes we want to use to save it. Usually the first bit stores the sign, the next x number (the exact number varies from about 5 to 15) of bits stores the exponent and whats left stores the mantissa.
And that is the basics of binary!
To find the cache you need to decode this:
0101010001101000011001010010000001100011011000010110001101101000
0110010100100000011000110110000101101110001000000110001001100101
0010000001100110011011110111010101101110011001000010000001100001
0111010000100000001100010011000100110000001100010011000100110001
0011000100110000101100000010000000110000001100010011000000110000
0011000000110000001100010011000000110000001100010011000000110001
0011000000110000001100000011000100110000001100010011000000110001
0011000000110000001100010011000100110001001100010011000100110001
0011000100110000001100000011000000100000001100010011000000110000
0011000100110001001100010011000000110000001100001011000000100000
0011000000110001001100000011000000110000001100000011000000110001
0011000100110001001100010011000100110001001100000011000100110000
0011000100110000001100000011000100110001001100010011000100110001
0011000100110000001100010011000100110001001100010011000100110000
Good luck!
If you what to check your coords look to the right hand side of your screen.
Hints
Gur fgerrg ahzore bs gur ohvyqvat gb gur fbhgu bs TM jvyy tvir lbh gur ryringvba |
|
Decode |
Logs
I didn't have too much trouble with either the puzzle our the hide.
Thanks Laighside Legends for the easy version of the puzzle.
Solved during a lunchtime or two in my previous job (!) I had some time to spare today before heading to the airport, and deliberately targetted this cache. Finally! At last!
Hmm, urban forests and L.L. caches.
Looking, looking, eventually the clue was re-read and it all made sense. I crafted a removal tool from a conveniently shaped piece of local environment and made the find!
First puzzle of any sort found in a long long time.
Thanks.
Filled in the log before returning to my steed which had blended very well into the scenery close by. I had to check its teeth in case I took the wrong steed.
TNLN, TFTC Laighside Legends
Cheers
Just have to get there now. (or perhaps later).
After finding Binary 1 and being made aware of its predecessor, I thought it a good idea to see what this puzzle was all about.
Thanks to the educational prelude, solving the puzzle was pretty straight forward even though I actually never even knew about some of the aspects and I am surprised I had never seen it in any other puzzles.
Tftc LL!
You face a binary decision when barrelling down the highway towards GZ and you realise that you've left the coordinates on your desk! Do you:
0 - Go back and grab them, or
1 - Attempt to jetski the cache using only your memory of where it was?
Well I chose option 1 and I'm glad I did! I found the cache safe and sound and just begging to be found!
*01000110 01010100 01000110*
Thanks Ben!
It has been solved now so there shouldn't be any errors.
Good Luck!