Computing 103: Logic Gates and Boolean Equations Mystery Cache
Computing 103: Logic Gates and Boolean Equations
-
Difficulty:
-
-
Terrain:
-
Size:
 (micro)
Please note Use of geocaching.com services is subject to the terms and conditions
in our disclaimer.
There is absolutely nothing wrong with the coordinates above. I'm sure they would take you to a very nice location where you could enjoy God's creation. However, if you want to find this cache, I don't recommend going there; I recommend solving the puzzle instead.
Welcome back, class! I hope you remember what we talked about in our last two classes; if not, please review the material from GC4A8Z8and GC4AEKD. During class today we will be taking another quiz, and the answers to the quiz will fill in the numbers for North A BC.DEF West G HI.JKL
Today we start talking about how computers make calculations. Computers are made up of transistors. Transistors are combined to make logic gates, such as AND gates, OR gates, NOT gates, and XOR gates. These gates can only have values of 0 or 1, which equates to 0 volts or 3.3 volts ... or simply false and true. What? No, Christi... cat and dog are not valid binary values! To describe the functions of gates, we use a truth table.
Let's start with an OR gate. An OR gate has two inputs and one output. (Note: gates can have more than 2 inputs, but for simplicity we will assume no more than 2 inputs.) The output of the OR is 1 (true) whenever either of its inputs are 1. We can enumerate the possible values of the inputs in a truth table, and show the output for each case. For OR, it looks like this:
Note that when the two inputs are 0 is the only time the output is zero.
OK, time for the first quiz. What will the output be if we put a 2 into in1 of an OR gate? Use the index of the answer for A.
21. a zero
345. a one
39. you can't do that; only 0 and 1 can be inputs
The next gate we'll look at is the AND gate. With an AND gate, the output is only 1 if both inputs are 1. Slammer! How many times have I told you: quit climbing on things! You might fall .... Below we show the truth table for AND without the output specified. It's your job to figure out the values.
OK, time for a quiz. What will the outputs of the AND gate be, ordered as shown (top to bottom) in the truth table? Use the index of the answer for B.
2. 0000
3. 1111
4. 0001
5. 1000
Actually, there is an inverse of both OR and AND, called NOR and NAND respectively. You could think of these inverses as just a flipping of the output to the opposite value. Laura, what are you reading? I've told you NOT to bring that puzzle notebook to class. So, if the output of an OR is a 1, then the output of a NOR with the same inputs will be a 0. Got it?
Let's do a quiz on NAND. What will the outputs of the NAND gate be, given inputs ordered as shown in the AND truth table? Use the index of the answer for C.
2. 0000
3. 0001
4. 1001
5. 1110
6. 1100
Next we'll see an XOR gate, also known as an Exclusive Or gate. The output of the XOR gate is only 1 if exactly one of the inputs is a 1.
So what does the output of an XOR look like, given inputs as ordered as shown in the AND truth table? Use the index of the answer for D.
2. 0000
3. 1100
4. 0110
5. 1010
6. 1001
So what does the output of an XNOR look like, given inputs as ordered as shown in the AND truth table? Use the index of the answer for E.
5. 0000
6. 1100
7. 0110
8. 1010
9. 1001
Very good. We're going to finish this section with the INVERTER, also known as the NOT gate. ghs, why are you just arriving? Oh, you had YET ANOTHER ordeal in driving. Figures. It is a single input gate: whatever you put in, the opposite shows up at the output.
So what does the output of an INVERTER look like if the input = 0? Use the index of the answer for F.
5. 4
6. 3
7. 2
8. 1
9. 0
Ok, we're ready to move on to a new topic: boolean equations. Boolean equations simply take logic gates, and make equations out of them. They are based on boolean variables, which are simply variables that can take on the values of 0 or 1. For this lesson, we will use just AND, OR, INVERTER, and XOR gates. We will use a particular symbology: OR gates are represented by a '+'. So, if I write the equation z = x + y I mean that the output (represented by the variable z) is the OR of values x and y. For XOR, we will use the symbology '^'. So, z = x ^ y means z will be the XOR of x and y.
If x=0 and y = 0 and z = x + y, then what does z equal? Use the index of the answer for G.
39. 1
84. 0
16. I'm confused
For AND gates, we just use juxtaposition, similar to how we represent multiplication in normal algebra. For example, z = xy means x AND y. For INVERTERS, we use the '~' symbol. So ~x means "NOT x". Note that '~' is the highest precedence operator, which means that ~xy means (~x)y.
Typically, boolean equations are a bit more complicated than just a simple AND or OR. We might say: z = w (x + y), which means take the OR of x and y, and then AND the result with w. Let's assume w=1, x=0, and y=1 in the previous equation. Then x+y = 1, and w AND 1 = 1. Thus z=1. Got it?
Assume w=0, x=0 and y = 1 and z =wx + ~y. What does z equal? Use the index of the answer for H.
0. 0
1. 1
2. what's for lunch?
Assume w=0, x=1 and y = 1 and z =wxy. What does z equal? Use the index of the answer for I.
3. 0
4. 1
5. get a life!
For the remainder of the lesson, we're going to assume we have predefined variables r-y, as shown below:
r = 1
s = 0
t = 1
u = 1
v = 0
w = 0
y = 1
Well, we still need to get answers J, K, and L to complete our quiz. No, janata ... we did not choose J because of you; it's just a variable. These questions will be a bit tougher. To determine J, K, and L, you will compute a series of values in 4-bit binary. J will be determined by 4 bits: J3 J2 J1 J0 representing the value of the digit, where J3 is the most significant bit (the 8s place in binary).
Here we go:
J3 = s + ~uv
J2 = tu + v
J1 = wy + rs
J0 = (~t + v)(r + y)
K3 = r ^ s ^ t
K2 = u ^ y(r + t)
K1 = st + uv + wy
K0 = s(u + v) + t(w + y)
L3 = rstu
L2 = ~r ^ (tu ^ ry)
L1 = rw + uv + ts + (u ^ v)
L0 =w
That's it for class. I sure hope you are smarter than you looked today! Guess we'll see ....

You can validate your puzzle solution with certitude.
Additional Hints
(Decrypt)
Fgnl njnxr va pynff!
Treasures
You'll collect a digital Treasure from one of these collections when you find and log this geocache:

Loading Treasures