Computers are made of transistors. The Intel Core-I7 Sandybridge processor, which is the heart of computers selling at the time this cache was published, contains 2,270,000,000 transistors. However it is slightly more true to say that a computer is made of logic gates, because this is the way they are designed - processors are designed by arranging gates together, not by arranging transistors together. A gate is a single decision element of a computer and a group of gates arranged the right way make the various functional elements such as a adders, address decoders and memory. Given that a simple gate is made out of 2 to 8 transistors, the Core-I7 contains about 300,000,000 logic gates.
The Gates
These are the basic gates types. Our logic circuit will be using these to code the cache coordinates for presentation. Inputs are on the left, output on the right.
|
NOT |
Also known as an inverter. If the input is 1 then the output is 0. If the input is 0 then the output is 1.
Q = NOT A
This gate can be made with just two transistors. |
|
AND |
If all inputs are 1 then the output is 1. If any input is 0 then the output is 0.
Q = A AND B
This is actually made by putting a NOT on the end of a NAND, and so a two input AND can be made with 6 transistors. |
|
NAND |
If all inputs are 1 then the output is 0. If any input is 0 then the output is 1.
Q = NOT ( A AND B )
A two input NAND is made of 4 transistors. |
|
OR |
If any input is 1 then the output is 1. If all inputs are 0 then the output is 0.
Q = A OR B
This is actually made by putting a NOT on the end of a NOR, and so a two input OR is made of 6 transistors. |
|
NOR |
If any input is a 1 then the output is a 0. If all inputs are 0 then the output is 1.
Q = NOT ( A OR B )
A two input NOR is made of 4 transistors. |
There is a 6th gate type, the buffer, which looks like an inverter without the circle on the output. This means a 1 on the input results in a 1 on the output and a 0 on the input causes a 0 on the output. As you can guess, these are hardly ever used. They are needed when a voltage change occurs, or when the circuit needs to supply more current than an ordinary gate output can deliver.
Note: in binary logic, "1", "on", "supply", "5V" and "true" are synonymous . Similarly, "0", "off", "ground", "0V" and "false" are also synonymous.
The 7-Segment Display
Cache coordinates are numbers. And what better way to display a number than using a 7-segment display. You see these everywhere - here is how they work.
|
A current flowing from the segment line to the common will light the appropriate segment. In our case we provide the current by supplying a 1 on the segment line and a 0 on the common.
A segment will not light if the current flows backwards (it is one way only), so a 1 on the common effectively turns the display off. |
The Cache
The cache is at S40° 22.xxx' E175° 37.yyy'. xxx and yyy are provided by the 7-segment displays below. These displays are multiplexed, which means that the "a" line is connected to all the "a" segments across all the digit displays. To light a particular display segment you need to choose the segment line, and choose the appropriate digit. So, for example, to light the center segment on the third digit, you need a 1 on the "g" line, and a 0 coming in to the bottom of the third digit. Multiplexing is used to save on electronic hardware - we don't need to supply drivers for each digit, and to save on current - battery. By lighting only one digit at a time, and quickly switching between the digits the human eye thinks that all digits are active.
OK... get your red and black pencils out and have a go!
In case you are not familiar with circuit diagrams, a note on the diagram below. The digit selector switch's common contact is connected to ground. All the other contacts are connected via the pull-up resistors R1~R6 to the supply rail. This means that the contact currently selected by the switch is connected to 0, and all the other contacts will go to 1.
Need some help? How about I start you off. Put the digit selector switch to the first position (the diagram shows it in the first position already). The common connector of the switch is connected to ground, so this connects a 0 through the switch all the way to the common of the first 7-segment display digit. This causes digit 1 to be selected. As the other switch contacts are not connected, they are pulled high by the pull-up resistors R2~R6 to supply, so they have a 1 on them - digits 2-6 are disabled. So if any segment line has a 1 on it, it will only light that segment on digit 1, the same segment on the other digits will be off (for now). As digit 1 is the only digit selected, any discussion about segments being on or off will only apply to digit 1. Back to the circuit - follow the wire connected to digit 1 common. Remember that this has a 0 on it. It connects directly to segment lines a and d, so these segment lines also have 0 on them. We need a 1 to light a segment, so segments a and d on digit 1 are off. Colour them in black. Do not colour these segments on the other digits - remember the other digits are disabled. Things may change when you enable them by changing the digit selector switch. Following the digit 1 common further we see it enters gate 5. Since this input is 0, and gate 5 is an AND gate, we do not need to check out the other input - regardless of what the other input is, all inputs are not 1, so the output of gate 5 is 0. This output feeds segment e, so segment e on digit 1 is off. Get out the black pencil again.
I'll leave you to do the rest.
*Cache container provided by "Casper the cache-laying Canary" (GC2M000). Thank you!*