Skip to content

Computing 101: Binary and Hex Mystery Cache

This cache has been archived.

gallaghd: This one is probably gone, and it's not worth continuing to irritate the neighbors.

More
Hidden : 4/20/2013
Difficulty:
2 out of 5
Terrain:
1.5 out of 5

Size: Size:   micro (micro)

Join now to view geocache location details. It's free!

Watch

How Geocaching Works

Please note Use of geocaching.com services is subject to the terms and conditions in our disclaimer.

Geocache Description:

Every field has its own terminology. The computer field employs a terminology with concepts such as binary, hexadecimal, 7-bit ASCII, 8-bit ASCII, bits, bytes, etc., which can be quite confusing when you first hear them. These concepts are actually quite simple, and I am creating a series of caches intended to demystify them.

Good morning, class! I hope you arrived prepared to learn. During class today we will be taking a quiz, and the answers to the quiz will fill in the numbers for North A BC.D West E F.G

Ok, we're going to start with binary numbers. To prepare for that, let's think about how we count. Most people can count to 10; I would hazard to guess that over half of you geocachers are able to count that high, assuming you have all of your fingers. "Yes, janata ... I know you can count to 20; would you please put your shoes back on." Where were we? So, you might think computers are really smart, but actually they can only count to 2. Feeling better about yourself?

So, in America we use 10 values, 0 to 9. That's because we use base-10 or decimal numbers. If we need a number bigger than 9, we need to employ 2 or more digits. Consider the number 123. The 3 is in the 1's place, the 2 is in the 10's place, and the 1 is in the 100's place. Note that in base-10, each of these places go up by a factor of 10.

OK, time for the first quiz. if we have 3 in the 10's place and 9 in the 1's place, how big is our number? Use this value for A.

So that's how we do decimal numbers; what about computers? Well, computers only use 2 values: 0 and 1. That's because computers are made with transistors, which are essentially just switches. These "switches" can be viewed as being On/Off, Closed/Open, True/False, or 1/0. Thus, computers count in base-2 or "binary." Just as, in base-10, numbers 10 or greater require multiple digits to represent, in base-2, numbers 2 or greater require multiple digits, or what are often called "bits".

Remember how in base-10 that we have a 1's place, a 10's place, etc.? Well, in binary we have a 1's place, a 2's place, a 4's place, etc. Each "more significant" digit is twice the previous one. Thus, a decimal 2 in binary requires a 1 in the 2's place and a 0 in the 1's place. To represent decimal 3, we need 1 two and 1 one, or 11.

Ok, time for a quiz.
B = 100 (convert binary to decimal)
C = 101


See, that's not so hard. Let's work a little bit harder one. "piano2ner, I've told you to put that tuning wedge away! You are not allowed to leave your tuning wedges laying around when you are in my class!" How could we represent the decimal number 93? Hmmm, that's a bit tougher. Here's the trick: remember the various values of the digits of a binary number:

128 64 32 16 8 4 2 1

So, to make 93 decimal, we can have no 128's, since the number is less than 128. Thus, the binary number would start with 0. We have one 64 (leaving a remainder of 29), zero 32, one 16 (remainder 13), one 8 (remainder 5), one 4, zero 2, one 1. Putting it all together, we can represent 93 as: 0 1 0 1 1 1 0 1.

Ok, let's go the other way, which is probably easier. What does the binary number 10110 represent in decimal? Well, there is one 16, one 4, and one 2, and 16+4+2 = 22. Not so bad. How about 1 0 1 1 0 0 1? That 64 + 16 + 8 + 1 = 89 decimal.

Quiz time! D = 1 1 0 0 0 1 0 1 1

Ok, let's move on to hexadecimal (and also longitude). "ghs! Put that cigar away! I've told you innumerable times: no chewing cigars in class." Hexadecimal is simply base-16. Yes, that is more fingers than most of you have. Well, hexadecimal is just a simpler way of reading big binary numbers. You see, computers represent numbers using 32 or 64 binary bits, and that's a lot of bits to keep track up. So, humans sometimes find it easier to read the numbers in hexadecimal. Here's how it works. Let's assume we look at binary numbers 4 bits (or digits) at a time. What range of decimal numbers can I represent with 4 bits? Well, we know that the biggest would be 1111, which is decimal 15. So, with 4 bits we can represent the numbers 0 to 15. Hmmmm, sounds like base-16. That leaves us with a bit of a problem. If one digit can represent the numbers 0 to 15, how do we have 16 different symbols. Simple: the 16 values in hexadecimal are:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

So, an 'A' in hexadecimal (also called "hex") is a 10 in decimal, and an 'F' is a 15. Piece of cake! I can convert binary into hex very easily, simply breaking up the binary number into groups of 4. So, if I have:
0 1 1 0 1 1 0 1 in binary, I break it into two pieces. The first four digits (0 1 1 0) is simply a 6. The last four (1101) represents 13 decimal, which is a 'D' in hex. Thus, my binary number could be represented in hex as a 6D.

Quiz: The following binary number is 132 decimal. What is it in hexadecimal? 1 0 0 0 0 1 0 0
Use this for E in the coords.


We can convert directly from decimal to hexadecimal, or vice-versa. "Barbarian, why aren't you paying attention? .... what do you mean you are Bizzy?" In hexadecimal, we are in base-16, so the digits are powers of 16. So, we have a 1's place, a 16's place, a 256's place, a 4096's place, etc. So, if I have a "23" in hex, that is two 16's and 3 ones, or 35 decimal. Easy, huh? Note that a 2A in hex is two 16's and a 10, or 42. Hey, I think you are getting it.

Let's find out. Convert 5D into decimal. What is the value?
1. 0
2. 93
3. 77
4. 85
Use the number (1-4) associated with the value for F.


Going the other direction (decimal to hex) isn't so bad. Let's say I have 314 decimal. Remember that the digits in hex represent a 1's place, a 16's place, etc. Well, a 314 is one 256 (remainder 58), three 16's (remainder 10), and an A. So, 314 decimal = 13A hex.

Ok, here is our final exercise of the day. We will convert decimal into hexadecimal. How is 1588 decimal represented in hex? Use this hex value (as if it was an integer) as G.


Prior to our next class, please read the chapter on binary/hex math. "And VPPLAYER, never, ever bring that compass to class again!"



You can validate your puzzle solution with certitude.

Additional Hints (Decrypt)

Gurer ner 10 xvaqf bs crbcyr va gur jbeyq: gubfr jub haqrefgnaq ovanel naq gubfr jub qba'g.

Decryption Key

A|B|C|D|E|F|G|H|I|J|K|L|M
-------------------------
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

(letter above equals below, and vice versa)