Privacy Policy Cookie Policy Terms and Conditions Talk:Logic gate - Wikipedia, the free encyclopedia

Talk:Logic gate

From Wikipedia, the free encyclopedia

The images are for the American standard for gate symbols. The European, which I belive is the real standard (approved by ISO/ANSI or something), standard looks different. An AND gate is a square with an ampersand in it, OR is a square with >= 1 in it and so on. I couldn't find any pics for them though. :-( asdfasdfsdf

Sounds like IEC 617-12. Here's a page with some pictures (in French). --Zundark 22:31 17 May 2003 (UTC)

Contents

[edit] Tesla patents

The article mentions Nikola Tesla having patented logic gates as US645576, but I looked up that patent, "System of transmission of electrical energy", and it appears to describe a means of transmitting electricity through the air, but nothing to do with logic gates. I've taken the reference to that patent out of the article. --Arteitle 19:51, Mar 7, 2004 (UTC)

The relevant patents are US 723,188 and US 725,605 granted in 1903. They were filed as one application in July 1900 but subsequently divided. I have added them to the text. Conception of the idea was at least as far back as 1896, '...I have an instinctive knowledge of the same...' Tesla said during the interference deposition for the patent, (US Patent Office Interference No 21,701, Systems of Signaling, Nikola Tesla vs. Reginald A. Fessenden, 1902, reply to question 9, August 5th 1902)--Smark33021 21:32, 23 Dec 2004 (UTC)

I've looked at the patents and they are for a signalling system, not a logic gate. Can someone tell me what relevance these patents have to logic gates? There's no mention of a logic gate in the claims, and the signalling system seems to rely on signals at different times, not at the same time, to operate a receiver. I wish I could point to an example of an "and" function used before the dates of these patents, I'm pretty sure this pre-dates electronics in general - if nothing else the Strowger switch must have had logic at least as complicated as an "and" gate and it was patented a decade earlier. --Wtshymanski 02:31, 27 Apr 2005 (UTC)


[edit] very misleading

I'm new here, so I don't want to make any changes. I shall note, however, that logic gates used in digital integrated circuitry do not operate in this manner. The author is conveying the idea that a logic gate either allows a signal to pass (in his diagram from left to right) or doesn't allow a signal to pass. While this seems sensible to the novice, it is not correct.

The reason that the author's conception of logic gate cannot be used in digital circuitry is that when a signal is not allowed to pass--for instance, if one transistor in his AND gate is OFF--the signal (technically the voltage level) on the OUT end of his logic gate is ambiguous, or "floating" in electrical engineering parlance.

I agree with you. The inaccuracy could be fixed in two ways: (1) delete the switch diagrams and the text that refers to them, or (2) correct the switch diagrams by adding pull-up resistors (as in open-collector logic) or complementary switches (as in CMOS and TTL logic) or adding loads to the circuits (as in relay logic). Option 2 sounds horribly complicated, so I am tempted to go for option 1. Anybody else care to comment? -- Heron 21:32, 5 Jul 2004 (UTC)
I take the point, but I'm not sure I agree. The diagrams are not meant to indicate how an actual logic gate necessarily works, but what it is doing in principle. I think that's a better intention for the article - to show how an AND function for example can be illustrated in a manner that is fairly intuitive to most people. Most people can understand the operation of simple switches, whereas the operation of a transistor is less clear to most. In addition, there are hundreds of ways to actually implement gates in real integrated circuits - a TTL circuit will differ from a CMOS, so which one would you use? None of them represent a single, "one true way" to make a gate, even if CMOS for example might be possibly the most usual way. Perhaps the wording should be altered to make it clear that the diagrams are only conceptual (though in terms of logic they could be built and would generate the truth tables given - so they are also practical in that sense). The article can provide links to the pages that deal with particular technologies, and those pages could include diagrams showing how logic gates are built with those technologies. Graham 22:52, 5 Jul 2004 (UTC)
I just took a chainsaw to the article and separated the content into a switch/relay logic section and a semiconductor logic section. This way, I hope to prevent any mistaken idea that the two types of logic might be interchangeable, whilst preserving the content that user:Dysprosia painstakingly added. -- Heron 09:07, 6 Jul 2004 (UTC)

This site is awesome. That was my first post, and I certainly didn't expect responses!

Please let me share my perspective. A typical person has no idea how a digital circuit does the things it does, but a curious and intelligent person, when presented with the opportunity, would be eager to find out.

I believe an essential feature of a logic gate is that it is cascadable--the output of the logic gate is able to serve as an input to another logic gate. When a reader discovers this, and when he sees how switches/transistors can perform logic operations such as AND, his computer is no longer magical--it is merely complex. If a logic gate is treated as a device that obstructs or allows the flow of electricity from point A to point B, the idea of cascadability is lost, or at least postponed.

I understand the difficulties of treating this accurately. Many readers will not be familiar with concepts like voltage, current, and resistance. But I do think that an ideal writeup must convey the idea of cascadability somehow. I think I will concede that the logic gate currently in the writeup is pedagogically acceptable even without a pulldown resistor--technicalities could be covered in writeups on digital logic schemes (e.g. CMOS). My fundamental complaints are that the inputs and outputs are undefined and that it is unclear how the output will be used at the next logic stage.

A good point. Switches and relays are cascadable though, so it could easily be conveyed by that, with a note to the effect that it is important and applicable to digital solid state circuits too. By the way, great job Heron! Graham 12:56, 6 Jul 2004 (UTC)
Thanks :-) I added a note on cascading semiconductor logic, but I haven't done the same job for relays yet. I have a feeling that this article is a sleeping giant, with the potential to turn into a "How Computers Work: from Babbage to Qubits" essay. If it starts to get out of hand, we may need to split it up. -- Heron 13:57, 6 Jul 2004 (UTC)
I think that should be resisted. The article is simply about the Logic Gate as a functional concept - it actually isn't about how they are implemented by particular technologies. There are better places for much greater expansion of that, which can link back here for those that need to know the fundamental principles. I see this as a foundation article - interested readers can follow links to other places to get more detail, or follow a link back here if they were overwhelmed by to much technicality. Graham 23:40, 6 Jul 2004 (UTC)
I agree. I was stating a fear, not an intention. It would be good, though, to have a list of all the implementations we can think of, with links to the relevant articles. -- Heron 08:28, 7 Jul 2004 (UTC)
I agree. The concept of "cascadable" logic is key. And logic gates do *not*, in general, simply pass or not-pass a signal. Someone please make a nice picture that reflects reality better. (Or else I threaten to inflict my feeble efforts to draw them). --DavidCary 05:57, 15 Jan 2005 (UTC)

I have added the following to try to clear up the issue:

It should be noted that semiconductor logic gates are not conductive in both directions, as the input signal acts as a 'trigger' to allow current out of the output, rather than allowing current straight through from input to output. However, the following mechanical varitions do show the basic priciples of the gates without detailing the precise internal workings. For information about how modern semiconductors really work, see CMOS.--Jjbeard 05:51, 25 December 2005 (UTC)

[edit] tri-state logic

Where is the tri-state article ? This is clearly not the right article to talk about tri-state tristate 3-state logic gates (such as the 74356, the 74HC125, etc.). Is "transmission gates" really the best place ? Where in the encyclopedia is the right place ?

Looks like a separate article doesn't exist yet. I'd suggest tristate logic should be the title. However, note that the term itself is inaccurate - tristate logic is not a three-state logic system at all (i.e. trinary), but just binary logic which can be connected or disconnected to e.g. a common bus line. While this ability is important in practical electronic logic systems, it's not really all that exciting - maybe a two or three line paragraph here would be sufficient. Graham 21:53, 23 Dec 2004 (UTC)
Excellent. If the term is inaccurate, then this is an excellent opportunity for this encyclopedia to teach me a more accurate term by defining the inaccurate term as a redirect pointing to the more accurate term. And the more accurate term would be ... what ? --DavidCary 05:57, 15 Jan 2005 (UTC)
Rightly or wrongly, it has always been called '3-state' or 'three-state' logic. Note that 'tri-state' is a registered trade-mark of National Semiconductor (as pointed out in this PDF datasheet, for example, and mentioned in this comment on a book by Sid Katzen), so we should probably avoid using this as an article title. Everybody else (Texas Instruments, Fairchild, Philips etc.) calls it '3-state'. In the field of multivalued logic, the term '3-value' is used to describe trinary logic. [1] --Heron 12:21, 15 Jan 2005 (UTC)

[edit] diagrams

Am I seeing things or are the 'alternate AND' and 'alternate OR' labels switched on the diagram? For example: De Morgan's law says that P AND Q = NOT ((NOT P) OR (NOT Q)), i.e. there is an OR gate in the 'alternate AND' gate and vice versa. Also, following the circuits visually, it looks like they are switched. Varuna 22:22, 2005 Mar 10 (UTC)

Aha! I'm not the only one to think that. I'm going to switch the captions. --Wtshymanski 16:38, 12 Apr 2005 (UTC)

[edit] Logic gates and quantum physics

I know that from several citations I've seen, that it is known that an "AND" gate will produce more heat than a "NOT" gate, because under quantum theory, information is destroyed and is released as heat (information is a very weird property in quantum theory), whereas an "NOT" gate merely converts information. Would it be good to try to elaborate some of this issue here? -- Natalinasmpf 03:35, 19 Apr 2005 (UTC)

My opinion is not to clutter the article up with deeply theoretical and abstract ideas - put it in an article linked to quantum theory but I think it has no place in a discussion of real-world logic. I'd like to see the cites - can you provide a link that explains this in terms accessible to a non-physicist? Since anything you can do with an OR gate you can do with enough ANDs and inverters, and the reverse, I don't really see the fundmental reason for this observation. --Wtshymanski 19:45, 19 Apr 2005 (UTC)
Whoops, I meant a "NOT" gate, not an "OR" gate,. But logic gates in essence deal with logic itself - I think perhaps some mention about quantum theory (which is real-world, after all) because it entails what the nature of logic really is. And you may accomplish a function with a different setup, but the question in physics becomes, is it efficient? The theory goes that quantum logic gates must eliminate the wasted heat (as information is destroyed in an AND gate: two inputs produce an output where you cannot reverse back to deduce the input), else it would create inteference which is more of an issue for a quantum processor. Oh, I found this: [2], it cites the heat produced from destroyed information. And this too [3], this [4], and this [5]. All these cite the production of heat due to the fact information is destroyed (heat being a byproduct of electrical resistance being a secondary product, heat produced by information destruction is way more). (Oh some of the proposed improvised quantum gates to make up for the elimination of such gates are also trinary gates). -- Natalinasmpf 23:39, 19 Apr 2005 (UTC)

[edit] The real history

Somewhere, probably not on a Web page, there's got to be some real history of the logic gate. The Tesla and Stowger patents referred to in previous versions of this article do not claim anything I can see called a "logic gate" or a functional equal. A mechanical logical-AND function must go back at least as far as the first lock with a key in it. I don't think you can patent the idea of logic alone, but I'd be happier if someone cited a patent that had as a major claim the idea that logical functions can be performed automatically. It may not be patentable at all. Babbage's difference engine predates even Tesla. --Wtshymanski 22:05, 19 May 2005 (UTC)

Somewhere? It was in the reference links! BTW, Andy Kessler and Leland Anderson both cite Tesla as the original. Twenty First Century Books publishers is a lesser link (but another one). If you cannot understand the patents nor the links ... do not remove the information just because you don't like the information. PLEASE provide a link or a book to refute these sources!.
PS, put in Babbage's machine if you feel like it ... I think it may be a good addition.:
The cited patents are for a signalling system, not for logic gates. None of the claims mention an electronic implementation of a logic function, possibly because Tesla would have considered this of no novelty and unpatentable. Surely the first nameless tinkerer who wired two knife-switches in series has as much claim to "inventing" an AND gate. I don't see the relevance of the cited patents to the claim that Tesla invented the AND gate. The "Twenty First Century" reference seems to be highly partisan in advocacy for Tesla and does not explain the relevance of the cited patents. I dispute the accuracy of the claim. My reference is the cited patents, which do not claim an AND gate. --Wtshymanski 00:42, 21 May 2005 (UTC)
The cited patents are for a signalling system which contain logic gates. The patent description descibes electronic implementation of a logic function (eg., relays [which Tesla called controllers]). Tesla has several patent concerning ON/Off controllers. When the basic ectromechanical controller is activated, it opens or closes sets of circuits. See Implementing the AND Logic Gate With Relays at this page on how Tesla used his controllers. The patent office prevented later inventors from patenting them later when they tried to patent the logic gates, because of Tesla's prior art. As to the relevance of the cited patents, it contain the basic operation of logic gates.
If you dispute the claim's accuracy, can you find references to bolster your case? Reference include the cited patents, which do describe AND gates (as well as other resources and other patents [such as his Teleautomation patents], not just "20th century books" or "wikipedia copies"). JDR 00:27, 20 September 2005 (UTC)

[edit] General Tidy Up

Right - Ive had a good hack at the article and have made the first section especially more readable. I have lined up all the switch digrams with the relevant truth table and have also put these next to the relevant paragraph, and put each one in its own little section (i know it makes the ToC longer, but hey) I've also uploaded a modified version ofthe Alternate AND/OR diagram to show the NAND/NOR (I hope dypsrosia doesn't mind) gates. Also, I have done an article on making gates form NAND gates only, and uploaded shiny new blue jpgs of every gate and the NAND equivalent.

I've uploaded a new version of the little summary table thing (Truth2.jpg), and done pages for the XOR and XNOR gates (IC Pinouts and stuff), rather than for the logical process. These are now under XOR_gate and XNOR_gate. the XOR and XNOR articles both have updated headers giving directions.

This article also needs directions to those pages, perhaps when the other pages to do with the actual gates are done...

Also can someone do new versions of the rectangular symbols the present ones look a bit old and tatty...something like the 'military' symbols on this page. Also someonee might want to think about changin any links to the blue symbols to the military black and white ones if they would be better that way (so, for example NOT the ones in the diagrams on the NAND_logic page, but the symbol at the top of the XOR page maybe).

--Jjbeard 05:35, 25 December 2005 (UTC)

The rectangular symbols have now been changed - the old ones still exist, but these are neater and easier to read.

Jjbeard 14:33, 25 December 2005 (UTC)

[edit] Tables

Your table markup could be simplified a lot.

INPUT OUTPUT
A B A AND B
0 0 0
1 0 0
0 1 0
1 1 1
INPUT OUTPUT
A B A AND B
0 0 0
1 0 0
0 1 0
1 1 1

Maybe not as pretty, though. Just a thought... — Omegatron 22:08, 23 January 2006 (UTC)


[edit] {Electronicaly}


"They are primarily implemented electronically but can also be constructed using electromagnetic relays, electronic diodes, fluidics, optical or even mechanical elements."

In this part I will delete "electronic diodes" because they are included formerly in "implemented electronically". Čikić Dragan 15:41, 6 February 2006 (UTC)

[edit] Some problems

This article has a couple of problems that I hope to address here before editing the page if appropriate: -Firstly, and most importantly, there is no real definition of a logic gate. Specifically it should be defined that it performs a logic operation on 1 or more inputs to create a single output. There is need to define the logic levels here. Then explain how inputs can be outputs of other gates. The switch analogy used here is completely misleading. It tends to suggest, especially for the NAND circuits, that 3 inputs are required, that is the two switches pressed and the electrical signal itself. It is important that nothing to do with electricity is used at all in defining logic gates, which are a logical concept. Having swithes arranged so that a circuit becomes closed when A and B switches are pressed does not make a logical gate. -Background does not say why diode logic cannt be used for all gates. Nor are any examples given of how to make gates different ways (there are only misleading switch circuits). -The tri state section implies tristate is merely to help designers. This is totally incorrect. Tristate greatly reduces the amount of circuity involved when many components (video cards, memory etc. connect to the same bus). Anyway i'll be doing some edits soon so like to know what you all think.

[edit] a third set of symbols

occasionally i've come accross symbols with the bubbles on the inputs (e.g. a NAND gate would be drawn as an or symbol with a bublle on each input). The idea being that you keep the core symbols for thier logical function and use the bublles to indicate a lines active state (then if you have a bubble feeding a non-bubble or vice-versa you have located a potential design error).

Anyone else encountered theese and do you think we should mention them? Plugwash 23:28, 12 February 2006 (UTC)

I agree and a while back I did add something to this effect in the symbols section. I feel it would be useful to enhance the disgram to include these, as it helps to reinforce what the text is saying. Bubbles on the inputs are very common, and are a useful design aid too. Graham 02:12, 13 February 2006 (UTC)
Yes, they are useful, but I would suggest adding them in a new section called "De Morgan equivalent symbols" or something. Adding them next to the standard symbols would cause an information overload for most readers. --Heron 13:15, 15 February 2006 (UTC)

[edit] XNOR

Am I the only one who refers to XNOR as XAND? Harvestdancer 19:37, 3 April 2006 (UTC)

Yup. (seriously - probably not, but I've not heard that usage before) Graham 02:09, 4 April 2006 (UTC)

[edit] How do NOT gates work?

This NOT gate seems impossible!  The way it shows the transistor anyways, as I don't believe that a CURRENT applied to the GATE of this transistor can actually SHUT-OFF the current flowing from the emitter to the collector
This NOT gate seems impossible! The way it shows the transistor anyways, as I don't believe that a CURRENT applied to the GATE of this transistor can actually SHUT-OFF the current flowing from the emitter to the collector

I was looking at this page, and I am rather new to transistors and boolean logic (about a few months to a year or so), and I was wondering how a NOT gate can be made using transistors, much like the AND gates (below) are shown how to be made using transistors. From what I know, it's not possible, as is shown in the misleading pictures of the NOT gate on the Logic Gates page for example (the picture to the left), for transistors to be constantly on and SHUT-OFF with an electrical current applied to the gate (the "P" in NPN), or is it possible for a current applied to the GATE of a transistor (the A in the picture of the NOT gate to the left) to SHUT-OFF the current passing through the transistor? --TAz69x 23:57, 16 April 2006 (UTC)

That's a picture of a pushbutton switch, not a transistor, and I'm not surprised that you find it unhelpful. So do I. IMO we should be describing how real gates work, not adding another layer of abstraction. --Heron 14:29, 15 April 2006 (UTC)
This AND gate seems a little more sensible!  As it follows the rules of how NPN transistors work!
This AND gate seems a little more sensible! As it follows the rules of how NPN transistors work!

For example, the way transistors work (from what I know) is that NO CURRENT can flow through the N to N in NPN without the gate or the "P" in NPN having a current applied to it. So, like the picture to the left, when a current is applied to the gate(s), the connection is established, flowing from the left through both transistors to the OUT. [From what I know] both NPN and PNP gates work like this. But I don't think there is a way to STOP a current from flowing through the transistor by applying a current to the gate, or is there (like the about NOT gate transistor examples shows)? By this, I mean that for a NOT gate, to turn a 1 into a 0, (ONE into a ZERO), you'd have to somehow allow a gate to be DISABLED by applying a current to it, wouldn't you? And you would also have to allow a 0 to turn into a 1 as well; to have the current be ENABLED with no current or something (the boolean NOT gate would have to have one of its inputs register NO CURRENT, a binary 0 (ZERO), then would have to somehow let a current flow through the emitter to the collector to allow it to follow through the circuit to register as a 1 (eg. a NOT gate changing a ZERO (no current) into a ONE (current). So anyways, how would you produce a NOT gate with transistors? --TAz69x 23:57, 16 April 2006 (UTC)

That picture describes relay logic. It does not explain how an electronic AND gate works. An electronic AND gate does not have two transistors in series. In fact, with NPN transistors it's easier to build a NOR gate, which has two or more transistors in parallel, and then to combine multiple NOR gates to make any kind of gate you like. Meanwhile, you might try looking at some Texas Instruments data sheets, which contain excellent schematics of the gates' internal workings. An example of a TTL hex inverter is here (PDF). --Heron 15:01, 15 April 2006 (UTC)

For example, a relay (like a transistor but with an electromagnet + a moving switch) could be set up with a spring so that when an electrical current is applied to the electromagnet (the "gate"), it breaks the current of the switch, effectively making a NOT gate with a relay. For example, a constant current would be applied to the switch, and when a current hits the relay, a 1, the switch would be broken, with the result being a 0. But when a zero (no current) is applied to the relay, the switch would remain, giving a result of 1, effectively creating a NOT gate!

But transistors don't work like that. A transistor can't be SHUT-OFF WITH a CURRENT, can they? Is there a difference between NPN transistpors and PNP transistors? Can PNP transistors be SHUT-OFF with a current applied to the gate?, as opposed to NPN transistors where a current applied to the gate TURNS-ON the transistor current from emitter to collector.

Anyways, my real question was just how can a NOT gate be formed with transistors, diodes, and/or resistors. Any combination of the three things to create a NOT gate would be GREATLY appreciated, and most importantly, a DIAGRAM!!! Thanks. --TAz69x 23:57, 16 April 2006 (UTC)

Real logic gates are much more complicated inside than simple teaching diagrams suggest, but here is a very simple way of building a NOT gate with a single transistor:
           VCC
            | 
          |R2|
            |
            +------Y
            |C
         B+-+-+
 A--|R1|--|T1 | <- NPN transistor
          +-+-+
            |E
           GND
When input A is low, the base and emitter of transistor T1 are both at ground potential, so no current flows from A into the base, T1 stays off, and R2 pulls the output Y high. When input A is high, current flows into the base of T1 through R1, switching T1 on and pulling output Y low. Therefore, Y = not A. This is RTL (resistor-transistor logic) - not widely used, but easy to understand. --Heron 14:51, 15 April 2006 (UTC)
Would you be able to draw a diagram in Paint then upload it? Sorry, but I don't quite understand that ASCII diagram. Thanks for trying though! The things that I don't understand are "VCC", "C", that strange little "B" beside that + sign, and "E".
Other than that, I think that |R1| and |R2| are resistors. But how do these work? When a current is applied, do they stop-it or reduce-it?, because I thought that a resistor reduced a current passing through possibly to the point of stopping it completely, or do these ones work differently than normal resistors??
And I was wondering, as I assume the "GND" means "GROUND", what the GROUND is in this diagram. From what I know, I always thought that "A" for example (or maybe Y?) would be the negative current of a "battery" for example passing through a wire, and that the "GROUND" would be a wire connecting to a "positive" terminal of a battery, thus creating a complete current. But is this what a GROUND really is, or what does a GROUND really do? And aside from that, is that what "GND" means in this diagram?
If you can draw the diagram using paint, can you show a duplication of the same picture, except the second picture(diagram drawing) showing the path that the current is taking, perhaps leading to and from a battery itself if possible, and/or a button along the diagram to show what "A" is. Because in the above ASCII diagram, I don't understand what most of the outlets are, or what path the current is taking. Perhaps one drawing being black or colored wires with red colored circutry, and the other picture a copy of the first one, with blue electricity showing arrows for its path or something. Thanks so much!
My view of the above diagram is:
- I think that "A" is input from the user or another part of the circuit, being a binary 1 (current) or a binary 0 (no current).
- And I think that Y is the output to the rest of the circuit, being an inverse from the "A" input (because the whole thing's a NOT gate), so if A=1,Y=0 and if A=0,Y=1.
- But in this process, I don't understand what those other lines are other than A or Y (if I have these two right at all!), such as what "GND" does,
- what that little "B" and
- "C" and
- "E" are/what they do,
- what "VCC" does or what it means, and
- what part the "resistors "R1" and "R2"" play in this diagram.
perhaps in addition to the above Paint diagram, you could draw one that shows step-by-step, what the electricity passing through the diagram would have happen to it as it hits each part of diagram. For example, (each number would be an individual picture, which would be a slightly altered copy of the one before it, but just advanced a bit with each step!): --TAz69x 23:57, 16 April 2006 (UTC)
1 - the Paint drawing shows the input is coming from "A", (but has traveled no further yet!), the electricity is (for example) 5V and 0.2amps, "this" is what kind of things could provide the input, like the push of a button (for example!), and it is a "negative" current, starting from the "negative" source of a battery/power source (for example!)
2 - the input now hits the first |R1| and "this" happens to the electricity, at (for example) 0.1V now and 0.2amps
3 - now that the electricity is like "this" after hitting |R1| (for example, the current is now 0.1V or something)
4 - the current now hits this part of the transistor, and at 0.1V/0.2amps, "this" begins to happen, and (for example), if the current wasn't changed to 0.1V from 5V by the |R1| resistor, "this" would have happened instead), but anyways, this is what happened along with the |R1| resistor
5 - the electricity needs the "GND" for "this", and it does "this", and "this" is what happens to the current/other things
6 - the little "B" is for "this"
7 - the electricity now travels to the little "C" in the wire, and "this" happens, and the little "C" is meant to do "this"
8 - ...! --TAz69x 23:57, 16 April 2006 (UTC)
this would be the PERFECT diagram/explanation for me! Please can you draw such a thing, I REALLY need this kind of graphical help to understand what this means. From the sounds of it, you have the intelligence/talent to explain to me how it works! This would be EXACTLY what I need to start understanding more about boolean logic and how it really works! Without it, I might never be able to jump from a partial understanding to a real-visual understanding of how the electricity travels and how it works! Thanks so much (and especially hopefully for the Paint diagram/explanation!!!) --TAz69x 23:57, 16 April 2006 (UTC)
TTL NOT gate
Enlarge
TTL NOT gate
Here's a diagram that somebody else drew earlier. It's close enough. Ignore the transistor and resistor on the left, and imagine them replaced by resistor R1 from my ASCII drawing. The transistor on the right is T1 in my drawing. VCC means +5 V, and GND means ground. If you want to see the complete circuit, you can imagine the + terminal of a battery connected to +5 V and its - terminal connected to GND. The top terminal of the transistor is the collector (C). The bottom one is the emitter (E). The middle one, on the left, is the base (B). You called this the "gate", a term that does not apply to NPN transistors. R1 and R2 are, as you guessed, resistors. They are there to reduce the current that flows into the transistor; if they weren't there, the transistor would be destroyed. You are right about the meanings of A and Y, but this new drawing I found shows Y as \overline{A}.
Imagine you start with A at logic 0 (connected to ground). The transistor T1 is switched off, so it might as well not exist. The only component that does anything is R2. It connects the output to +5 V, making it a logic 1 (+5 V). 0 in, 1 out. If you don't connect the output to anything, then no current flows anywhere. If you connected the input of a second logic gate to the output Y, then a current would flow from +5 V, through R2 to Y, through the second logic gate to ground, through the battery, and back to +5 V, completing the circuit. There is no such thing as a "negative current" in this context. There is just current, with a specified direction and magnitude.
Now set the input A to logic 1 by connecting it to +5 V. You could do this with a piece of wire, a pushbutton, or another logic gate. Suppose R1 is 10,000 ohms. Before current starts to flow, B is at ground potential (0 volts). A is at +5 V, because we just connected it there. The voltage difference across R1 is therefore 5 V - 0 V = 5 V. By Ohm's law, the current that flows through R1 is 5 V / 10,000 ohms = 0.5 milliamps. This current then flows from +5 V, through R1, into the base (B) of T1, out of its emitter (E) and down to ground, through the battery and back to +5 V, completing the circuit. This current causes things to happen inside T1, one of which is that the voltage of B rises to about 0.7 V, and this is what switches the transistor on.
By the magic of semiconductors, the current that we just sent into the base triggers a drop in resistance along the path inside T1 from collector (C) to emitter (E). The resistance inside the transistor is now small - let us assume, for the sake of simplicity, that it is zero. The circuit now behaves, as far as we are concerned, as if there were a piece of wire connecting C and E. A new current now flows from +5 V, through R2, through the imaginary piece of wire, to ground, through the battery and back to +5 V. The voltage at the top of R2 is +5 V, but at the bottom it is 0 V, because of our fictional piece of wire. The voltage difference across R2 is therefore +5 V - 0 V = 5 V. Suppose that R2 is 1,000 ohms. Using Ohm's law again, the current through R2 is 5 V / 1,000 ohms = 5 milliamps. So, to summarise, we have fed in a current of 0.5 milliamps through R1 and it has triggered a new current, ten times larger, through R2. This magification of current enables the output of the circuit to drive the inputs of several other logic gates, if we want it to - this is "cascading". At the same time, the voltage at A has gone from 0 V to +5 V (logic 0 to logic 1) while the voltage on Y has done the opposite. Thus, we have built an inverter.
As you are not experienced in electronics, you might find that this explanation assumes too much knowledge, but to explain everything from first principles would require an entire text book. Wikipedia has not yet replaced all text books, I'm afraid. If you need more basic tuition, it might be better to ask specific, shorter questions at the Reference Desk. --Heron 21:40, 15 April 2006 (UTC)
That was amazing! I can't believe how well you wrote that, it REALLY helps! (gives Heron the Hero a big kiss). So, as I understand it, when the T1 transistor is NOT on, the current from A (logic 0) would be nonexistent, keeping the base of T1 off and removing the "wire", but another current from the top Vcc (+5v) would proceed on through to Y, as a Logic 1 now, effectively turning a logic 0 from A into a logic 1 from Y. --TAz69x 23:57, 16 April 2006 (UTC)
Yes. I'm glad I haven't confused you yet. --Heron 20:33, 16 April 2006 (UTC)
But when the A logic 1 turns on the base and turns on T1 creating our piece of "wire", then the ground is then exposed, so the current coming from Vcc (+5v) would ignore Y and proceed through T1 to the ground instead, because of our "fictional" piece of wire repesented by T1 there. And thus Y would effectively be a "no/little current" logic 0. --TAz69x 23:57, 16 April 2006 (UTC)
Yes, although it is possible for current to flow in to Y from an external source, and then to ground through the "wire". You can use this fact if you want a logic 0 on the Y output to switch on a (very small) light bulb. You connect one end of the light bulb to Vcc and the other end to Y. When T1 switches on, Y effectively becomes ground, so current flows from Vcc, through the bulb and T1 to ground, and makes the bulb light. --Heron 20:33, 16 April 2006 (UTC)
Because to complete our circuit here, the Vcc would avoid Y and go to Ground from Vcc instead (effectively + to - terminal of our battery powering this circuit), for the A=1, Y=0 logic state. And when A=0, the T1 is off, but the current comes from Vcc anyways, and since it's not grounded like A=1, then it's able to continue onto Y. --TAz69x 23:57, 16 April 2006 (UTC)
Yes. --Heron 20:33, 16 April 2006 (UTC)
I hope I've got this right, because it kinda makes sense here in my head right now. So I as understand it, to make a NOT gate, all you have to do is use a transistor to expose a Ground to our constant current (Vcc), to lead it away from Y whenever you want Y to be logic 0. Thanks again so much! Please tell me any mistakes I've made. --TAz69x 23:57, 16 April 2006 (UTC)
Yes, that's it. Don't forget that this is only one type of logic circuit, called resistor-transistor logic (RTL), which is not used much nowadays (except for switching on very small light bulbs) but is the easiest to explain. There are several other types, CMOS and TTL being the main ones in use today. One of the problems of RTL is that those resistors R1 and R2 get slightly warm and waste power. CMOS and TTL use more complex circuitry to reduce that waste and also to make everything work faster.
Finally, as a substitute for that kiss, will you do me the favour of signing your comments on talk pages? It is standard Wikipedia practice. You can do it easily by adding two hyphens and then four tildes at the end of your comment, like this: --~~~~. The software will replace the tildes with your user name and the date and time. This makes it easier for third parties to follow the discussion. --Heron 20:33, 16 April 2006 (UTC)
That's great! I had another question. So where does Y go to? I was just wondering why the current from Vcc would avoid Y and go to the Ground instead. Does Y not lead to the + or - terminal of the battery? Because I'm imagining a huge circuit in my mind that this logic gate is part of, but I don't know where Y would eventually lead to at the end of its trip. Wouldn't it somehow have to eventually lead to the + or - terminal of a battery for a current from Vcc to ever want to travel down it? Thanks again! --TAz69x 23:57, 16 April 2006 (UTC)
Heron, are you still there? I was wondering if all of this clutter was keeping you from seeing my last question. Anyways, hopefully you see it and can answer it! Thanks! --TAz69x 14:55, 17 April 2006 (UTC)
Where Y goes to depends on what you are using the logic gate for. You could be using it to switch on a light bulb, in which case see my answer about eight paragraphs earlier. Perhaps you missed it in the clutter. My comment on this subject was timestamped 20:33, 16 April 2006 (UTC). Alternatively, you could connect Y to the input of a second logic gate. Imagine that gate has multiple inputs, one of which is called P, and you connect Y to P. When Y is high, a current flows from Vcc, through R2, ignores T1 and flows to Y instead, then into P, into the base of a transistor in the second gate, switching that transistor on, and then out of the transistor's emitter to ground. When Y is low, on the other hand, current flows through R2 and T1 to ground. No current flows out of Y into P because current only flows from a higher voltage to a lower one. Y is at 0 volts, and so is P, so no current flows and the second logic gate is not activated.
By the way, to avoid losing ourselves in the clutter, can we put all future comments in chronological order at the end of this section, please? --Heron 20:24, 17 April 2006 (UTC)

Aside from my above question, I was hoping that these questions could be answered as well if possible:

- Are there any definitive sites or articles here or anywhere else that show cascading as was mentioned above? What cascading is, how it works, how it can be implemented in an integrated circuits, etc. Preferably sites/articles that allow amateurs and professionals alike to understand the material?

The circuit I just drew is an example of a logic circuit that can be cascaded. You just connect the Y from one gate to the A of the next gate. As long as you choose the right values for R1 and R2, it will work. The point of it is that you only need to feed a small current into the A of the first gate to operate the entire cascade. Cascading isolates the inputs from the internal circuitry and from the outputs , so that the current flowing into A is always the same regardless of the complexity of the rest of the circuit. --Heron 15:16, 15 April 2006 (UTC)

- Are there any sites/articles that show more in-depth boolean logic circuit designs (eg. addition, subtraction, multiplication, etc.). Graphically what they may look like, tips for designing, etc.

- Are there any programs for windows that allow you to play around with boolean logic designs and create some integrated circuit designs graphically?

- Are there any sites/articles that explain how integrated circuits work with the electricity passing through them? Eg. How is it that for an arithmetic unit for example, how an integrated circuit keeps from some transistors/boolean-gates from having the electricity moving through them faster than other parts. For example, you have a 4-bit binary adder, and the numbers on the right begin passing through the adders and answer parts before other parts of the adder are able to come up with an answer. Are there ways that integrated circuits are designed that they can "wait" for an answer, by waiting until ALL FOUR out-ports of the integrated circuit adder have an answer ready? And if so, how could this be implementer, that an integrated circuit could be designed so that parts of it can wait until all necessary parts which are to give an answer for example have all finished up before passing the answer to a new part of the integrated circuit for example? Perhaps capacitors are used to temorarily store the answers of individual components of the chip until they are all full and can be passed on to the next part of the integrated circuit? And if so, how could this be implemented in the integrated circuit with transistors for example so that this would work? Maybe an article/site that explains this (preferably to amateurs as well!).

ALUs generally use pipelined logic, which contains flip-flops to store intermediate results. This sort of thing should be discussed under sequential logic. --Heron 15:07, 15 April 2006 (UTC)

- Are there any sites/articles that show how to create boolean logic-gates with transistors, diodes, and/or resistors? I was wondering how these gates can be implemented using physics objects instead of just conceptually on paper.

Please feel free to answer ANY ONE of these questions at any time, but please answer the first NOT GATE first if possible! But if not and you have an answer to any of the other ones, then please don't hesitate to answer one of the other ones! Thanks for your help!

[edit] INHIBIT logic gate

what is a INHIBIT logic gate? V8rik 22:34, 20 April 2006 (UTC)

A 2-input inhibit (INH) gate implements the function A ^ 'B (A XOR NOT B). As far as I can see, this is the same as XNOR. Graham 08:10, 21 April 2006 (UTC)
  • Thanks Graham for your reply! V8rik 20:11, 25 April 2006 (UTC)

[edit] NAND gate

I would like to publicize the article CMOS#Example: NAND gate which gives a clear physical layout of a NAND gate (The A and B inputs are implied; you would have to add metal layers to pads surrounding this gate). By the repeated application of the Sheffer stroke operator (NAND), it is possible to build up combinations of NANDs to yield the other logic gates, of course. --Ancheta Wis 09:16, 28 April 2006 (UTC)

[edit] History

Does anyone have any references to the historical development of the electronic circuit symbols and language? When did it start, who started using drawings to do a combination of logic and electronics? etc. These would be good issues address in the article. Sholto Maud 10:58, 6 June 2006 (UTC)

[edit] Congrats

Excelent article, very usefull. Thanks to all editors. --201.6.161.117 04:56, 10 September 2006 (UTC)

Indeed. Unlike many articles I read, this one actually explains how the subject works, something that articles tend to miss. I learned a ton of info from reading this page. Good job! --The Prophet Wizard of the Crayon Cake 21:36, 28 September 2006 (UTC)

[edit] neon bulb logic

I think it would be really nifty if this article on logic gates had (or linked to) a drawing/schematic for each known implementation of logic gates. We have ladder logic and some of the many kinds of transistor-based logic gates. I want to add hydraulic "spool valve" logic gates and neon lamp logic gates.

The neon lamp article mentions "In the 1960s General Electric (GE), Signalite, and other firms made ... neon lamps for electronic uses. They even devised digital logic circuits, binary memories, and frequency dividers using neons."

I understand how to make logic gates out of transistors. How is it possible to make logic gates out of neon bulbs?

With a bit of googling, I've found a schematic for a 3 bulb sequential flasher/oscillator [6], and photographs of a neon bulb ring counter [7].

Could some help me reverse-engineer a schematic for that ring counter, or help me puzzle out some other logic circuit (NOT, NAND, NOR) using neons? (Using neons, diodes, resistors, and capacitors -- but no integrated circuits or discrete transistors or relays).

Is this something that needs to go into the logic gate article or the neon lamp article? --70.189.77.59 13:07, 28 October 2006 (UTC)

[edit] NAND gate article

NOR_gate has it's own article, while NAND_gate points back to this article. Is there a NAND_gate article coming, or is the NOR_gate article going to be merged into this one? I would rather see a separate NAND article myself. Ken6en 08:10, 30 October 2006 (UTC) Oops, I see the problem...NAND_Gate points to this article, and NAND_gate is an existing article. I'll change all references to NAND_Gate back to NAND_gate. Ken6en 08:14, 30 October 2006 (UTC)


[edit] Truth Table Values

Are the values of Not A and Not B transposed?

THIS WEB:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia 2006:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu