In electronics, a logic gate is an idealized or physical device implementing a Boolean function;
that is, it performs a logical operation on one or more logical inputs, and produces a single logical output. Logic circuits include such devices as multiplexers, registers, arithmetic logic units (ALUs), and computer memory, all the way up through complete microprocessors, which may contain more than 100 million gates. In practice, the gates are made from field-effect transistors (FETs), particularly MOSFETs (metaloxidesemiconductor field-effect transistors). Compound logic gates AND-OR-Invert (AOI) and OR-AND-Invert (OAI) are often employed in circuit design because their construction using MOSFETs is simpler and more efficient than the sum of the individual gates. NAND and NOR Gates are called Universal Gates because all the other gates can be created by using these gates Note: Please refer class notes for design all gates using NAND and NOR. Logic Gates Type Distinctive shape Boolean algebra IC Number Truth table AND
or & 7408 INPUT OUTPUT A B A AND B 0 0 0 0 1 0 1 0 0 1 1 1 OR
7432 INPUT OUTPUT A B A OR B 0 0 0 0 1 1 1 0 1 1 1 1 NOT
or ~ 7404 INPUT OUTPUT A NOT A 0 1 1 0 NAND
or 7400 INPUT OUTPUT A B A NAND B 0 0 1 0 1 1 1 0 1 1 1 0 NOR
or 7402 INPUT OUTPUT A B A NOR B 0 0 1 0 1 0 1 0 0 1 1 0 XOR
7486 INPUT OUTPUT A B A XOR B 0 0 0 0 1 1 1 0 1 1 1 0 XNOR
or
74266 INPUT OUTPUT A B A XNOR B 0 0 1 0 1 0 1 0 0 1 1 1
Arithmetic Circuits The half adder adds two single binary digits A and B. It has two outputs, sum (S) and carry (C). The carry signal represents an overflow into the next digit of a multi-digit addition.
A full adder adds binary numbers and accounts for values carried in as well as out. A one-bit full adder adds three one-bit numbers, often written as A, B, and C in ; A and B are the operands, and C in is a bit carried in from the next less significant stage. The full-adder is usually a component in a cascade of adders, which add 8, 16, 32, etc. bit binary numbers. Inputs Outputs A B C S 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 and
Inputs Outputs A B C in C out S 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1
Ripple-carry adder
4-bit adder with logic gates shown It is possible to create a logical circuit using multiple full adders to add N-bit numbers. Each full adder inputs a C in , which is the C out of the previous adder. This kind of adder is called a ripple- carry adder, since each carry bit "ripples" to the next full adder. Note that the first (and only the first) full adder may be replaced by a half adder (under the assumption that C in = 0). To reduce the computation time, engineers devised faster ways to add two binary numbers by using carry-look ahead adders.