LOGIC GATES

by Jimmy Proton in Circuits > Microcontrollers

21098 Views, 41 Favorites, 0 Comments

LOGIC GATES

LogicGates.gif
Logic gates are in every IC and microchip today, they practically control modern electronics.Personally I like to stick with capacitors and resistors and simple stuff like that but thanks to instructables user rtty21 I learned how to make a NOR gate and now I have countless ideas of what to with them, so here I will discuss some uses of different gates and how to make them. You should at least have a basic knowledge of logic gates to understand this. 

A/B=input(s)
Q=output
1=high
0=low

-=sorry about some of the messed up pictures, I'm trying to get it resolved=-

NOT Gate

128px-Not-gate-en.svg.png
69px-PMOS_NOT.png
70px-NMOS_NOT.png
120px-CMOS_Inverter.svg.png
120px-DigitalInverter.png
4049 CMOS hex inverter buffer.png
This is perhaps the most simple gate, it has one input and one output. It is known as an inverter because its output is opposite to its input. A representing the input, Q representing the output: Q=NOT A (thus the name "NOT"). There is an IC that uses six NOT gates called a 4049 CMOS hex inverter buffer. 

A  | Q
 1 | 0
 0 | 1

AND Gate

and.gif
and4.gif
NMOS_AND_gate.png
The AND gate only has a "true" output of both of its inputs are "true". This means thats will only be high if both the inputs are high, if one is high and one low the output will be low. So Q=A & B (thus the name AND gate). 

 A | B | Q 
 0 | 0 | 0
 1 | 0 | 0
 0 | 1 | 0
 1 | 1 | 1 

NAND Gate

120px-NAND_ANSI_Labelled.svg.png
100px-CMOS_NAND.svg.png
200px-TTL_npn_nand.svg.png
nand4.gif
NMOS_NAND.png
220px-4011_Pinout.svg.png
100px-CMOS_NAND_Layout.svg.png
The NAND gate is the opposite of an AND gate, the name stands for "NOT AND". One of the inputs have to be low to get a high, two highs is a low. The 4011 CMOS IC uses four NAND gates. The NAND gate can be used to make any other gate and it's possible to make a computer of NAND gates alone. Q = (NOT) A AND B (thus the name NAND).

 A | B | Q
 0 | 0 | 1
 0 | 1 | 1
 1 | 0 | 1
 1 | 1 | 0

OR Gate

120px-OR_ANSI_Labelled.svg.png
220px-CMOS_OR.svg.png
NMOS_OR_gate.png
The OR gate uses the high input as the high output, the output is always high unless the inputs are both low. Four OR gates are used in the 4071 CMOS IC. Q=A or B (thus the name OR gate) 

 A | B | Q 
 0 | 0 | 0
 0 | 1 | 1
 1 | 0 | 1
 1 | 1 | 1

NOR Gate

120px-NOR_ANSI_Labelled.svg.png
nor5.gif
NMOS_OR_gate.png
NMOS_NOR.png
220px-CMOS_OR.svg.png
220px-NOR_Pinout.jpg
440px-Cmosunbuff.png
200px-NOR_gate_layout.png
nor4.gif
The NOR gate is perhaps the most useful gate of all. It's the opposite of an OR gate, the name means "NOT OR". Like the NAND gate this gate can also be used to make any other gate. Q=(NOT) A or B (thus the name NOR gate). I will make an extra step for all of the uses of the NOR and NAND gates because theres so many.

 A | B | Q
 0 | 0 | 1
 0 | 1 | 0
 1 | 0 | 0
 1 | 1 | 0

EX-OR Gate

exor.gif
CmosXORGate.png
The name of the XOR gate means exclusive OR. There isn't much to say about this except that the out put is high only if the inputs are high and low.  Q = (A AND NOT B) OR (B AND NOT A).

 A | B | Q
 0 | 0 | 0
 0 | 1 | 1
 1 | 0 | 1
 1 | 1 | 0

EX-NOR Gate

120px-XNOR_ANSI_Labelled.svg.png
220px-XNOR_Pinout.png
The name of the EX-NOR gate comes from  exclusive NOR. This gate is opposite or the EX-OR so the output will only be high if both inputs are high/low. Q = (A AND B) OR (NOT A AND NOT B) I do not have a schematic for this one, I would appreciate it if any one could provide one. 

A | B | Q
0 | 0 | 1
0 | 1 | 0
1 | 0 | 0
1 | 1 | 1

Uses of the NOR and NAND Gates

120px-NOT_ANSI_Labelled.svg.png
120px-NOT_from_NOR.svg.png
120px-OR_ANSI_Labelled.svg.png
200px-OR_from_NOR.svg.png
120px-AND_ANSI_Labelled.svg.png
200px-AND_from_NOR.svg.png
120px-NAND_ANSI_Labelled.svg.png
280px-NAND_from_NOR.svg.png
120px-XOR_ANSI_Labelled.svg.png
320px-XOR_from_NOR.svg.png
120px-XNOR_ANSI_Labelled.svg.png
300px-XNOR_from_NOR.svg.png
Because both of these gates can be used to make any other gate I decided to make another step for it. All or the pictures will be in pares of two, the first is the desired gate, the second is the equivalent in NAND or NOR gates. Although NAND and NOR gates are opposite they are both equivalent in this step so it doesn't matter which one you use.