Upload
jamin-chen
View
225
Download
2
Embed Size (px)
Citation preview
Department of Computer and Information Science, School of Science, IUPUICSCI 240Digital Logic
Dale Roberts
Boolean Algebra to Logic GatesLogic circuits are built from components called logic gates.The logic gates correspond to Boolean operations +, *, .
Binary operations have two inputs, unary has one
OR+AND*NOT
Dale Roberts
ANDABA*BLogic Gate:Series Circuit:ABTruth Table:A*B
ABA*B000010100111
Dale Roberts
ORABA+BLogic Gate:Parallel Circuit:ABTruth Table:A+B
ABA+B000011101111
Dale Roberts
NOTAA or ALogic Gate:(also called an inverter)Single-throwDouble-poleSwitch:ATruth Table:A or A
aA0110
Dale Roberts
n-input GatesBecause + and * are binary operations, they can be cascaded together to OR or AND multiple inputs.ABCABCA+B+CA+B+CABABCABCABC
Dale Roberts
n-bit InputsFor convenience, it is sometimes useful to think of the logic gates processing n-bits at a time. This really refers to n instances of the logic gate, not a single logic date with n-inputs.110110010101001101111101110111100011110011110000001100110001001110
Dale Roberts
Logic Circuits Boolean ExpressionsAll logic circuits are equivalent to Boolean expressions and any boolean expression can be rendered as a logic circuit.AND-OR logic circuits are equivalent to sum-of-products form.Consider the following circuits:ACBabcaBcAby=abc+aBc+Abyy=aB+Bc
1
Dale Roberts
NAND and NOR GatesNAND and NOR gates can greatly simplify circuit diagrams. As we will see, can you use these gates wherever you could use AND, OR, and NOT.NANDNOR
ABAB001011101110
ABAB001010100110
Dale Roberts
XOR and XNOR GatesXOR is used to choose between two mutually exclusive inputs. Unlike OR, XOR is true only when one input or the other is true, not both.XORXNOR
ABAB000011101110
ABA B001010100111
Dale Roberts
Properties of NAND AND NORNAND and NOR have special properties, but neither satisfies the distributive or associative laws.It should be clear by looking at these properties that NAND and NOR are duals.
NANDNORx1=Xx0=Xx 0=1x 1=0x x=Xx x=Xx y=X+Yx y=XYX Y=x+yX Y=xynot (x y)=xynot (x y)=x+y
Dale Roberts
NAND and NOR as Universal Logic GatesAny logic circuit can be built using only NAND gates, or only NOR gates. They are the only logic gate needed.Here are the NAND equivalents:
Dale Roberts
NAND and NOR as Universal Logic Gates (cont)Here are the NOR equivalents:NAND and NOR can be used to reduce the number of required gates in a circuit.
Dale Roberts
Example ProblemA hall light is controlled by two light switches, one at each end. Find (a) a truth function, (b) a Boolean expression, and (c) a logic network that allows the light to be switched on or off by either switch.(What kind of gate has this truth table?Let x and y be the switches:
xyf(x,y)000011101110
Dale Roberts
Example (cont)One possible equation is the complete sum-of-products form:f(x,y) = xY + XyUse The Most Complex Machine xLogicCircuit Module to implement the equation.
xyf(x,y)000011101110
Dale Roberts
AcknowledgementsEck, David. The Most Complex MachineGersting, Judith, Mathematical Structures for Computer Science