ch2 boolean algebra

Upload: tutor-qurran-edu

Post on 06-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Ch2 Boolean Algebra

    1/26

    1

    Boolean Algebra &

    Logic Gates

    ECE 223Digital Circuits and Systems

  • 8/3/2019 Ch2 Boolean Algebra

    2/26

    2

    Binary (Boolean) Logic

    Deals with binary variables and binary logicfunctions

    Has two discrete values

    0 False, Open

    1 True, Close

    Three basic logical operations

    AND (.); OR (+); NOT ()

  • 8/3/2019 Ch2 Boolean Algebra

    3/26

    3

    Logic Gates & Truth Tables

    AND ORNOT

    101001

    1

    0

    0

    A

    OR

    1

    1

    0

    B

    1

    1

    0

    A+B

    1

    0

    A

    1

    0

    0

    A

    AND

    1

    1

    0

    B

    1

    0

    0

    A.B

    0

    1

    A

    NOT

    AND; OR gates may have any # of inputs

    AND 1 if all inputs are 1; 0 other wise

    OR 1 if any input is 1; 0 other wise

  • 8/3/2019 Ch2 Boolean Algebra

    4/26

    4

    Boolean Algebra

    Branch of Algebra used for describing and designingtwo valued state variables Introduced by George Boole in 19th centaury Shannon used it to design switching circuits (1938)

    Boolean Algebra Postulates

    An algebraic structure defined by a set of elements, B,together with two binary operators + and . that satisfy thefollowing postulates:

    1. Postulate 1:Closure with respect to both (.) and ( +)

    2. Postulate 2:An identity element with respect to +, designated by 0. An identity

    element with respect to . designated by 1

  • 8/3/2019 Ch2 Boolean Algebra

    5/26

    5

    Boolean Algebra - Postulates

    3. Postulate 3:Commutative with respect to + and .

    4. Postulate 4:

    Distributive over . and +

    5. Postulate 5:

    For each element a of B, there exist an element a such that(a) a + a = 1 and (b) a.a = 0

    6. Postulate 6:

    There exists at least two elements a, b in B, such that a b

  • 8/3/2019 Ch2 Boolean Algebra

    6/26

    6

    Boolean Algebra - Postulates

    Postulates are facts that can be taken as true; they donot require proof

    We can show logic gates satisfy all the postulates

    101001

    1

    0

    0

    A

    OR

    1

    1

    0

    B

    1

    1

    0

    A+B

    1

    0

    A

    1

    0

    0

    A

    AND

    1

    1

    0

    B

    1

    0

    0

    A.B

    0

    1

    A

    NOT

  • 8/3/2019 Ch2 Boolean Algebra

    7/26

    7

    Boolean Algebra - Theorems

    Theorems help us out in manipulating Booleanexpressions They must be proven from the postulates and/or other already

    proven theorems

    Exercise Prove theorems from postulates/other proventheorems

  • 8/3/2019 Ch2 Boolean Algebra

    8/26

    8

    Boolean Functions

    Are represented as

    Algebraic expressions;

    F1 = x + yz Truth Table

    Synthesis

    Realization of schematic from theexpression/truth table

    Analysis Vice-versa

    10011101

    0110

    1011

    1

    0

    0

    0

    x

    001

    1

    0

    0

    y

    1

    1

    0

    z

    1

    1

    0

    F1

    x

    y

    z

    F1

  • 8/3/2019 Ch2 Boolean Algebra

    9/26

    9

    Synthesis F1

    Assume true as well as complement inputsare available

    Cost

    A 2-input AND gate

    A 2-input OR gate

    4 inputs1001

    1101

    0110

    1011

    1

    0

    0

    0x

    001

    1

    0

    0y

    1

    1

    0z

    1

    1

    0F1

    x

    y

    z

    F1

  • 8/3/2019 Ch2 Boolean Algebra

    10/26

    10

    Canonical and Standard Forms

    Minterms A minterm is an AND term in which every literal

    (variable) of its complement in a function occurs once

    For n variable 2n minterms

    Each minterm has a value of 1 for exactly one

    combination of values of n variables(e.g., n = 3)

  • 8/3/2019 Ch2 Boolean Algebra

    11/26

    11

    Minterms

    One method of Writing Boolean function is thecanonical minterm (sum of products or SOP) form F = xyz +xyz + xyz = m1 + m5 + m6 = (1,5,6)

    xyz

    xyz

    xyz

    xyz

    xyz

    xyz

    xyz

    xyz

    Corresponding

    minterm

    m4001

    m5101

    m3110

    m6011

    1

    0

    0

    0

    x

    m201

    1

    0

    0

    y

    1

    1

    0

    z

    m7

    m1

    m0

    Designation

  • 8/3/2019 Ch2 Boolean Algebra

    12/26

    12

    Minterms examples

    F2 = (0,1,2,3,5)

    = xyz + xyz + xyz + xyz + xyz

    0

    0

    1

    0

    1

    1

    1

    1

    F2 (Given)

    001

    m5101

    m3110

    011

    1

    0

    0

    0

    x

    m201

    1

    0

    0

    y

    1

    1

    0

    z

    m1

    m0

    Designation

  • 8/3/2019 Ch2 Boolean Algebra

    13/26

    13

    Minterms examples

    (F2) = (all minterms not in F2) = (4,6,7)

    = xyz + xyz + xyz

    0

    0

    1

    0

    1

    1

    1

    1

    F2 (Given)

    001

    m5101

    m3110

    011

    1

    0

    0

    0

    x

    m201

    1

    0

    0

    y

    1

    1

    0

    z

    m1

    m0

    Designation

  • 8/3/2019 Ch2 Boolean Algebra

    14/26

    14

    Maxterms

    A maxterm is an OR term in which every literal(variable) or its complement in a function occurs once Each maxterm has a value 0 for one combination of values of

    n variables

    x +y +z

    x +y +z

    x +y +z

    x +y +z

    x +y +z

    x +y +z

    x +y +z

    x +y +z

    Corresponding

    maxterm

    M4001

    M5101

    M3110

    M6011

    1

    0

    0

    0

    x

    M201

    1

    0

    0

    y

    1

    1

    0

    z

    M7

    M1

    M0

    Designation

  • 8/3/2019 Ch2 Boolean Algebra

    15/26

    15

    Minterms & Maxterms

    Conversion between minterms & maxtermsm0 = xyz = (x+y+z) = (M0)

    In general, mi = (Mi)

    An alternative method of writing a Boolean function isthe canonical maxterm (product of sums or POS) form

    The canonical product of sums can be written directlyfrom the truth table

  • 8/3/2019 Ch2 Boolean Algebra

    16/26

    16

    Maxterms

    F3 = (x+y+z)(x+y+z)(x+y+z)(x+y+z)(x+y+z)= (0,2,3,4,7)

    (F3) = (all maxterm not in F3)

    0

    1

    1

    0

    0

    0

    1

    0

    F3 (Given)

    M4001

    101

    M3110

    011

    1

    0

    0

    0

    x

    M201

    1

    0

    0

    y

    1

    1

    0

    z

    M7

    M0

    Designation

  • 8/3/2019 Ch2 Boolean Algebra

    17/26

    17

    Standard Forms

    In canonical forms, each minterm (or maxterm)must contain all variables (or its complements)The algebraic expressions can further be simplified

    ExampleF4 (x,y,z) = xy +yz (sum of products, standard form)

    F5 (x,y,z) = (x+y)(y+z) (product of sums, standard form) Conversion

    Standard form can be converted into canonical form using identity elements

    F4 = xy + yz = xy.1 +1.yz = xy(z+z) + (x+x)yz

    = xyz + xyz + xyz + xyz = m7 +m6 +m5 +m1

    How about the conversion from canonical forms tostandard forms?

    Exercise convert F5 into maxterms

  • 8/3/2019 Ch2 Boolean Algebra

    18/26

    18

    Non-Standard Forms

    A Boolean function may be written in non-standard formF6 (x,y,z) = (xy + z)(xz + yz)

    = xy(xz + yz) + z(xz + yz)

    = xyz + xyyz + xz +yz

    = xyz + xz + yz

    = xz + yz (standard form)

  • 8/3/2019 Ch2 Boolean Algebra

    19/26

    19

    Other Logic Gates NAND Gate So far, we discussed AND, OR, NOT gates

    2-input NAND (NOT-AND operation)

    Can have any # of inputs

    NAND gate is not associative

    Associative property to be discussed later

    x

    y

    z

    011

    1

    0

    0

    x

    10

    1

    0

    y

    1

    1

    z

  • 8/3/2019 Ch2 Boolean Algebra

    20/26

    20

    Other Logic Gates NOR Gate 2-input NOR (NOT-OR operation)

    Can have any # of inputs

    NOR gate is not associative

    Associative property to be discussed later

    x

    y

    z

    011

    1

    0

    0

    x

    00

    1

    0

    y

    0

    1

    z

  • 8/3/2019 Ch2 Boolean Algebra

    21/26

    21

    Other Logic Gates XOR Gate 2-input XOR

    Output is 1 if any input is one and the other input is 0

    Can have any # of inputs

    x

    y

    z

    011

    1

    0

    0

    x

    10

    1

    0

    y

    1

    0

    z

  • 8/3/2019 Ch2 Boolean Algebra

    22/26

    22

    Other Logic Gates XNOR Gate 2-input XNOR

    Performs the NOT-XOR operation

    Output is 1 if both inputs are 1; or both inputs are 0

    Can have any # of inputs

    x

    y

    z

    111

    1

    0

    0

    x

    00

    1

    0

    y

    0

    1

    z

  • 8/3/2019 Ch2 Boolean Algebra

    23/26

    23

    Extension to Multiple Inputs So far, we restricted ourselves to 1 or 2-input gates

    A logic gate (except inverter) can have any number of inputs

    AND, OR logic operations have two properties

    x +y = y +x (commutative)

    (x +y)+ z = x + (y +z) = x +y +z (associative)

    NAND and NOR operations are commutative, but notassociative

    (xy)z x(yz) = NOR operation

    (xy)z x(yz) = NAND operation

    How about XOR

  • 8/3/2019 Ch2 Boolean Algebra

    24/26

    24

    Positive & Negative Logic

    Positive Logic 0 = False (Low Voltage)

    1 = True (High Voltage)

    Negative Logic

    0 = True (High Voltage)

    1 = False (Low Voltage) Implement truth table with

    positive & negative logic

    Positive logic AND gate

    Negative logic ?

    HHH

    H

    L

    L

    x

    LL

    H

    L

    y

    L

    L

    z

  • 8/3/2019 Ch2 Boolean Algebra

    25/26

    25

    Integrated Circuit - Evolution

    Transistor was invented in 1947/48

    Integrated Circuits were invented in 1959/60

    Since then, larger # of transistors/chip are integrated

    101 Small Scale Integration

    102-3 Medium Scale Integration

    103-6 Large Scale Integration

    106-9 Very Large Scale Integration

    Digital Logic Families (technologies)

    TTL Transistor-Transistor Logic

    ECL Emitter Coupled Logic

    MOS Metal Oxide Semiconductor

    CMOS Complementary Metal Oxide Semiconductor

  • 8/3/2019 Ch2 Boolean Algebra

    26/26

    26

    Book Sections Boolean Algebra & Logic

    Gates Material is covered in Sections 2.1 2.8