Right, as I’ve stated before, logic gates are made up of lots of components arranged in just the right way to produce a desired logical outcome. If you had to build one of these circuits each time you needed a gate you’d probably throw your hands up in disgust as it would not only take huge amounts of time, it would vastly increase the size of your electronic project. These days logic gates come as IC chips (integrated circuit chips), I started to look into this in my last project but I hope to go a little further here.
So a brief history of logic circuits, the only place to start is with relays.
Relays are electromagnetic switches that physically open and close. The pic above is a broken relay that I took the case off, you can see the coil of copper wire and the connectors at the front. They were initially developed by an American physicist Joseph Henry (1797–1878), and were eventually used for things like transmitting Morse code, telephone communication and, as it is an on (1) off (0) device, early logic circuits. If you fancy a deeper read…
have a look at this article it’s brill http://history-computer.com/ModernComputer/Basis/relay.html
Relays were replaced by vacuum tubes in the 1940′s – 50′s, the benefit being that there were no moving parts, the vacuum tube was an entirely electronic switch. A vacuum tube can switch electricity on or off, or amplify a current, the first digital computer, ENIAC, was made using vacuum tubes. They had their problems though, vacuum tubes look and act a lot like an incandescent bulb, they generate a lot of heat and have a tendency to burn out. Another problem was size, you can imagine that if your computer at home needed at least one vacuum tube for each logic circuit it would be massive! ENIAC had a whopping 18,000 tubes!
Take a minor detour if you wish to my cool stuff page on Nixie Tubes, they’re like vacuum tubes but used to display numbers, one of these days I’ll get around to building that clock…
OK, the next step was when the vacuum tube was replaced by the transistor.
This picture should give you a start on the advantages of transistors over tubes The transistor was invented in 1947 and it revolutionised electronics. Without them your phone wouldn’t be mobile, there would be no such thing as the laptop (or desktop or even a ‘fit in your house’ top).
Transistors amplify current and can also be used as electronic switches so they perform the same job as the vacuum tube but with less power, more reliability and less heat. Transistors are made of semiconductor materials such as silicone, these are materials that hover somewhere between holding onto their electrons and letting them move about freely. So they act as conductors under some conditions and insulators under others. Have a look at the symbol for a transistor below and you’ll get an idea of how a transistor works as a switch:
When the current going to the base is low (0v or 0) you can imagine the end of that arrow as sitting away from the emitter lead so there is no connection, when the current going to the base is high (+5V or 1) it’s like the arrow moves over and completes the circuit allowing current to flow. So there’s the switch function, but what about amplifying current?
Here’s a little circuit experiment showing this effect (for more info on potentiometers have a look here):
So the tiny base current passing through LED1 is being amplified by the transistor allowing a larger current to flow through LED2. You get a dim light from LED1 due to the tiny base current and a much brighter glow from LED2 because of the stronger collector current.
For a more detailed read on transistors have a look here http://www.kpsec.freeuk.com/trancirc.htm
Transistors can work using digital signals, this makes them perfect for constructing logic gates. The diagram below is a (simplified) circuit of a NOT gate:
A NOT gate is really just a transistor, with a couple of resistors and diodes thrown in to protect the transistor and keep the current flowing in the right direction but you get the gist of it. It’s even better when you look at an AND gate:
It’s clear that you can build any logic gate you need just by arranging resistors in specific ways.
As I mentioned above, if you had to build a complex arrangement of components each time you wanted a logic gate you’d go mad, so the next step was the emergence of the IC.
Using transistors for complex circuits was great till you got above a certain size, then errors started creeping in. The sheer number of components meant that shorts and broken connections became more frequent and the circuits became less reliable the bigger they got, advanced circuits contained so many components and connections that they were almost impossible to build. In 1958 an engineer named Jack Kilby had the idea of building these circuits out of a single block of semiconductor material, effectively removing the errors caused by broken connections, this was the beginning of the IC. Inside each IC is a collection of microscopic discrete components made out of the same bit of material, they are arranged in such a way as to act like any number of logic circuits.
The best article I have found that explains this in much more detail is here: http://nobelprize.org/educational/physics/integrated_circuit/history/
Inside a logic gate IC you’ll usually find an arrangement of 4 gates of the same type e.g an IC NAND chip:
This shows the arrangement of inputs and outputs on this chip, when you need a NAND gate you just hook your inputs up to the correct pair of pins and connect what ever you want driven by your output up to the corresponding output pin.
Wow, that was quite a journey, now to look at the sort of chips I’m likely to come across in my travels, what they do and how to use them…