Theory Lecture 2

Embed Size (px)

Citation preview

  • 7/28/2019 Theory Lecture 2

    1/31

    MCT-212: DIGITAL LOGIC

    DESIGN

  • 7/28/2019 Theory Lecture 2

    2/31

    DIGITAL LOGICDESIGNLets start by being literal

  • 7/28/2019 Theory Lecture 2

    3/31

    What does each of these words mean?

    DIGITAL LOGIC DESIGN

    Three words: Digital

    Logic

    Design

  • 7/28/2019 Theory Lecture 2

    4/31

    ANALOG AND DIGITAL QUANTITIES

    Analog quantities have

    continuous values Digital quantities have a

    discrete set of values

  • 7/28/2019 Theory Lecture 2

    5/31

    ANALOG AND DIGITAL QUANTITIES

  • 7/28/2019 Theory Lecture 2

    6/31

    ANALOG AND DIGITAL QUANTITIES

    Types of electronic devices or instruments: Analog

    Digital

  • 7/28/2019 Theory Lecture 2

    7/31

    ANALOG AND DIGITAL QUANTITIES

    Combination of analog and digital:

    Give 5 examples of digital and analog

    devices each from around you.

  • 7/28/2019 Theory Lecture 2

    8/31

    DESIGN

    A Design is a creative plan or convention for theconstruction of an object or a system.

    What is the engineering design process?

    Why is design important?One PROBLEM IDENTIFICTION

    Two GENERATING POSSIBLE SOLUTIONS

    Three SELECTING A SOLUTION

    Four CREATING A PROTOTYPE

    Five REFINING THE DESIGN

  • 7/28/2019 Theory Lecture 2

    9/31

    LOGIC AND BOOLEAN ALGEBRA

    What is Logic?

    What Boolean Algebra?

    What is Logic Design?

    What is Digital Design?

    What is Circuit Design or

    Digital Logic Design?

    LOGICBOOLEAN

    ALGEBRA

    LOGIC

    DESIGN

  • 7/28/2019 Theory Lecture 2

    10/31

    LOGIC AND BOOLEAN ALGEBRA

    English mathematician, Philosopher

    and Logician, Goerge Boole (1815-

    1864).

    Boolean Algebra, developed in 1854by George Boole in his book An

    Investigation of the Laws of Thought.

    Computer hardware works with

    binary numbers, but binaryarithmetic is much more old than the

    computers. [Ancient Chinese

    (3000B.C), Ancient Greek (2000B.C),

    Boolean Algebra (1850)]

  • 7/28/2019 Theory Lecture 2

    11/31

    PROPOSITIONAL LOGIC

    The ancient Greek philosophers created a system to

    formulize arguments, called propositional logic.

    A proposition is a statement that could be TRUE or

    FALSE.

    Propositions could be compounded by means of the

    operators AND, OR and NOT.

  • 7/28/2019 Theory Lecture 2

    12/31

    PROPOSITIONAL CALCULUS EXAMPLE

    We can assign values to propositions, for example:

    I will take an umbrella if and only if it is raining OR the

    weather forecast is bad

    The proposition I will take an umbrella is the result ofthe Boolean combination (OR) between raining and

    weather forecast being bad.

    I will take an umbrella = it is

    raining OR the weather forecast isbad

  • 7/28/2019 Theory Lecture 2

    13/31

    DIAGRAMMATIC REPRESENTATION

    We can think of the umbrella proposition as a

    result that we calculate from the weather forecast

    and the fact that it is raining by means of a

    logical OR.

    OR

    Rain

    Bad Weather

    Forecast

    Take Umbrella

  • 7/28/2019 Theory Lecture 2

    14/31

    DIAGRAMMATIC REPRESENTATION

    Since propositions can only take two values, we

    can express all possible outcomes of the

    umbrella proposition by a table:

  • 7/28/2019 Theory Lecture 2

    15/31

    MORE COMPLEX PROPOSITIONS

    We can make our propositions more complex, forexample:

    (Take Umbrella ) = ( NOT (Take Car ) ) AND ( (Bad

    Forecast) OR (Raining ) )

    and as before represent this diagrammatically.

  • 7/28/2019 Theory Lecture 2

    16/31

    MORE COMPLEX PROPOSITIONS

    ORRaining

    Bad Forecast

    Take

    UmbrellaNOTCarAND

  • 7/28/2019 Theory Lecture 2

    17/31

    BOOLEAN ALGEBRA

    To perform calculations quickly and efficiently we can usean equivalent, but more succinct notation.

    We also need a to have a well-defined semantics for all

    the operators, or connectives that we intend to use.

    The system we will employ iscalled Boolean Algebra and

    satisfies the criteria above.

  • 7/28/2019 Theory Lecture 2

    18/31

    FUNDAMENTALS OF BOOLEAN

    ALGEBRA

    The truth values are replaced by 1 and0:

    1 = TRUE

    0 = FALSE

    Propositions are replaced by variables:

    R = it is raining

    W = The weather forecast is bad

    Operators are replaced by symbols

    or' = NOT

    or+ = OR or = AND

  • 7/28/2019 Theory Lecture 2

    19/31

    FUNDAMENTALS OF BOOLEAN

    ALGEBRA

    Our previous complex proposition: (Take Umbrella ) = ( NOT (Take Car) ) AND( (Bad Forecast)

    OR (Raining ) )

    Is formalized by the simpler equation:

    U = (C')(W+R)

  • 7/28/2019 Theory Lecture 2

    20/31

    LOGIC = BOOLEAN ALGEBRA

    Boolean algebra (or Boolean logic) is a logicalcalculus of truth values.

    It resembles the algebra of real numbers as

    taught in high school, but with the numericoperations of

    multiplication xy conjunction xy,

    addition x + y disjunction xy negation x complement x

    More on Boolean Algebra later on during the semester.

  • 7/28/2019 Theory Lecture 2

    21/31

    NUMBER SYSTEMSAND CONVERSIONS

    Back to elementary.!

  • 7/28/2019 Theory Lecture 2

    22/31

    DECIMAL NUMBER SYSTEM

    Any decimal number such as 2610can be representedas:

    Two Thousands Plus Six Hundreds Plus One Tens Plus

    Zero Units

    Or,

    2 x + 6 x + 1 x + 0 x

    However the convention is to only write the coefficients

    and from their position, the power of10 is deduced.

    43210. 12

  • 7/28/2019 Theory Lecture 2

    23/31

    DECIMAL AND BINARY NUMBER BASES

    How many digits does the conventionalnumber system use? What are they?

    TEN: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9The decimal number system is knownas base 10 or radix 10.

    How many digits does the Binarynumber system use? What are they?

    TWO : 1 and 0

  • 7/28/2019 Theory Lecture 2

    24/31

    BINARY NUMBER SYSTEM

    The binary number system uses only two digits: 1 and 0 Its a base 2 orradix 2 system.

    What does this number stand for indecimal system : 101101.01

    1x+ 0x+ 1x+ 1x+ 0x+

    1x

    . 0x

    + 1x

    = 45.25

  • 7/28/2019 Theory Lecture 2

    25/31

    OCTAL AND HEXADECIMAL SYSTEMS

    Octal number system is the base 8 system, whilehexadecimal system is the base 16 system.

    How many, and what digits do Octal and

    Hexadecimal systems have?

    OCTAL(8) : 0,1,2,3,4,5,6,7

    HEXADECIMAL(16) : 0, 1, 2, 3, 4, 5, 6,

    7, 8, 9, A, B, C, D, E, F

  • 7/28/2019 Theory Lecture 2

    26/31

    ARITHMETIC OPERATIONS

    Arithmetic operations like multiplication, division,addition and subtraction can be done the same way

    like for the decimal (base10) system.

    One must take care not to use any digit other than the

    ones allowed for that particular base.

    Perform the following operations

  • 7/28/2019 Theory Lecture 2

    27/31

    NUMBER BASE CONVERSIONS

    How to write:

    (100)10

    (100)8

    (100)2

    Decimal

    Hexade-cimal

    Binary

    Octal

  • 7/28/2019 Theory Lecture 2

    28/31

    COMPLEMENT OF ANUMBER

    The what?!

  • 7/28/2019 Theory Lecture 2

    29/31

    COMPLEMENT OF A NUMBER

    Complements are used in digital numbers to simplify themultiplication and subtraction process.

    There are two types of complements for each base-r system:

    (r-1)scomplement

    rscomplement

    For a numberN:

    (r-1)scomplement = ()

    rs complement =

    for N>0; 0 for N=0= (())+

    Complement of the complement of a number, is the

    number itself!

  • 7/28/2019 Theory Lecture 2

    30/31

    ANY QUESTIONS?

    Anyone willing to present?

    Time allowed : 5 mins

    Topic : Any Bonus Points : +3

  • 7/28/2019 Theory Lecture 2

    31/31

    REFERENCES

    Chapter no 1: Binary Systems Digi tal Lo gic Designby Morris Mano

    Chapter no 1: Digital Concepts

    Digi tal Fundamentalsby Floyd