Vous êtes sur la page 1sur 5

Basic Logic Gates

Digital Logic: Boolean


Algebra and Gates
Textbook Chapter 3

CMPE12 – Summer 2008

CMPE12 – Summer 2008 – Slides by ADB 2

Truth Table Truth Table: Inverter


„ The most basic „ Inverted signals are Input Output
representation of a logic denoted with an overbar
function „ Or with a prime symbol A Y = A’
„ Lists the output for all ‹ A’
possible input Inputs Outputs
combinations AB… XY…

„ How many rows of the


truth table needed? 2#inputs

CMPE12 – Summer 2008 – Slides by ADB 3 CMPE12 – Summer 2008 – Slides by ADB 5
Truth Table: AND Gate Truth Table: OR Gate
„ The result of an AND Inputs Output „ The result of an OR Inputs Output
operation is 1 if and only operation is 1 if and only
if all inputs are 1 A B Y=A·B if any inputs are 1 A B Y=A+B
„ Depict AND by the „ Depict OR by the
multiplication symbol addition symbol
‹ A·B ‹ A+B

„ Or by lumping the signals


together
‹ AB

„ We don’t really build


these gates…

CMPE12 – Summer 2008 – Slides by ADB 6 CMPE12 – Summer 2008 – Slides by ADB 7

About the Little Circle… Sum of Products


„ The little circle is what inverts „ How do you get from a truth table to a logic
expression?
„ Sum of products is standard way of
synthesizing simple circuits
„ Procedure:
1. Find the rows with the ‘1’ output
2. Write the product-form expression for the inputs
in that row (0=inverted, 1=normal)
3. Combine the products in step 2 into a sum (OR
the results of step 2)

CMPE12 – Summer 2008 – Slides by ADB 8 CMPE12 – Summer 2008 – Slides by ADB 9
Sum of Products De Morgan’s Laws
1. Find the rows with the ‘1’ „ “Break the line, change the sign”
output
2. Write the product-form
„ Two laws:
A B Y
expression for the inputs ‹ A’ + B’ = (AB)’
0 0 0 in that row (0=inverted, ‹ A’ B’ = (A+B)’
0 1 1 1=normal)
3. Combine the products in
1 0 1 step 2 into a sum (OR
the results of step 2)
1 1 0

CMPE12 – Summer 2008 – Slides by ADB 10 CMPE12 – Summer 2008 – Slides by ADB 11

De Morgan’s Laws De Morgan’s Laws

(A + B)’ = A’B’ conversely (AB)’ = A’ + B’ (A + B)’ = A’B’ conversely (AB)’ = A’ + B’


“Break the line, change the sign” “Break the line, change the sign”

A B A+B A A+B A B A·B A B AB A AB A B A+B

0 0 0 0

0 1 0 1

1 0 1 0

1 1 1 1
CMPE12 – Summer 2008 – Slides by ADB 12 CMPE12 – Summer 2008 – Slides by ADB 13
De Morgan’s Laws De Morgan’s Laws and SOP
„ In other words… „ Generate equivalent circuits
„ Push the bubbles through! ‹ NAND/NAND
‹ NOR/NOR

„ We prefer NAND/NAND circuits


‹ Same transistor count as NOR
‹ NANDs are faster

CMPE12 – Summer 2008 – Slides by ADB 14 CMPE12 – Summer 2008 – Slides by ADB 15

Masking Axioms of Boolean Algebra


„ Want to look only at certain bits of a binary word „ 0·0=
„ Use a mask to remove the uninteresting bits „ 1+1=
„ 1·1=
„ Example:
„ 0+0=
„ 0·1=1·0=
„ 1+0=0+1=
„ 1+0=0+1=
„ if x = 0 then x’ =
„ if x = 1 then x’ =

CMPE12 – Summer 2008 – Slides by ADB 17 CMPE12 – Summer 2008 – Slides by ADB 18
Single-Variable Theorems Properties of Boolean Algebra
„ x·0= „ Commutative
„ x+1= ‹ x · y =

„ x·1= ‹ x + y =

„ x+0= „ Associative
„ x·x= ‹ x · (y · z) =

„ x+x= ‹ x + (y + z) =

„ x · x’ = „ Distributive
„ x + x’ = ‹ x · (y + z ) =

„ (x’)’ = ‹ x + y · z =

CMPE12 – Summer 2008 – Slides by ADB 19 CMPE12 – Summer 2008 – Slides by ADB 20

Properties of Boolean Algebra Logic Minimization


„ Absorption „ Other A B C Y „ Example
‹ x + x · y = ‹ x + x’·y = 0 0 0 0
‹ x · (x + y) = ‹ x · (x’ + y) =
0 0 1 0
„ Combining
‹ x · y + x · y’ = 0 1 0 1
‹ (x + y) · (x + y’) =
0 1 1 1
„ De Morgan’s Laws
1 0 0 1
‹ (x · y)’ =

‹ (x + y)’ = 1 0 1 0

1 1 0 1

1 1 1 0

CMPE12 – Summer 2008 – Slides by ADB 21 CMPE12 – Summer 2008 – Slides by ADB 22

Vous aimerez peut-être aussi