ECE U322 Digital Logic Design - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

ECE U322 Digital Logic Design

Description:

Duality Principle. The duality principle of Boolean algebra states that a Boolean equation remains ... Apply duality: lec04.ppt. 34. ECEU322. DeMorgan's Laws: ... – PowerPoint PPT presentation

Number of Views:136
Avg rating:3.0/5.0
Slides: 48
Provided by: millenn8
Category:
Tags: ece | design | digital | duality | logic | u322

less

Transcript and Presenter's Notes

Title: ECE U322 Digital Logic Design


1
ECE U322Digital Logic Design
Sept. 14, 2005
  • Lecture 4
  • Binary numbers
  • Boolean Algebra
  • Boolean Logic
  • Reading Markovitz Section 2-2

lect04.ppt
ECE U322 F05
2
Announcements
  • HW1 due Thursday, Sept 22
  • Assignment will be posted on Blackboard.

3
Signed Values
  • MSB is sign bit.
  • Three methods for interpreting the remaining
    (non-sign) bits
  • sign magnitude
  • ones complement
  • twos complement

4
Representing Signed Values
5
To form the 2s complement
  • To form the 2s complement of a number
  • take the 1s complement (bit by bit complement)
  • add 1 (using binary addition)
  • ignore carry out of MSB

6
Binary Addition
  • 0 0 00 1
  • 1 0 11 1 10
  • The last line means that the sum is 0 and there
    is a carry out into the next bit position.

7
Addition - Decimal
  • Example add 2 decimal numbers together 57
    68
  • Add 7 8 which is 5 carry 1
  • Add 5 6 carry which is 2 carry 1
  • The result is .

8
Addition - Binary
  • Binary addition works the same
  • Add 1012 to 1112. Start from LSB. 1 1
    which is 0 carry 1,
  • 1 0 carry 1 which is 0 carry
  • 1 1 carry 1 which is
  • Result is ( )2

9
Form the 2s complement
  • of 0011
  • of 1101
  • of 0100
  • of 1100

10
Property of 2s complement
  • 2s comp(2s comp (A)) A
  • 2s comp (0011) 1101
  • 2s comp (1101) 0011
  • 2s comp (0100) 1100
  • 2s comp (1100) 0100

11
Represent -12 in 5-bits
  • Using sign-magnitude
  • 2s complement

12
Values of some 5-bit numbers
  • What is the value of 01101
  • if it is unsigned
  • if it is sign magnitude
  • if it is 2s complement

13
Values of some 5-bit numbers
  • What is the value of 11101
  • if it is unsigned
  • if it is sign magnitude
  • if it is 2s complement

14
Values of some 5-bit numbers
  • What is the value of 10000
  • if it is unsigned
  • if it is sign magnitude
  • if it is 2s complement

15
Take twos comp
  • What is 2s complement of 10000?
  • What does that tell us ?

16
Boolean Algebra
  • Definition
  • A Boolean algebra consists of a set k of 2
    elements and 2 operators and . For every a,
    b e k, ab e k, a b e k.
  • Variables are designated by letters.
  • Three basic logic operations AND, OR, and NOT.

17
Boolean Function
  • Consists of a binary variable denoting the
    function, an equals sign, and an algebraic
    expression formed by using binary variables,
    constants 0 and 1, and logic operands.
  • Example
  • F X YZ
  • X and YZ are called ______.
  • Any Boolean function can be represented by a
    truth table

18
  • Truth table for F X YZ
  • There is only one way that a Boolean function can
    be represented in a truth table.

___ variables
Number of rows in a truth table is ____.
19
  • A Boolean function can be transformed into a
    circuit diagram X YZ
  • Gates are interconnected by wires.
  • Variables are combined by logical operations.

20
  • F X YZ
  • X XYZ XYZ
  • XZ XY
  • Boolean functions can be expressed in many
    _________ algebraic forms.
  • We can manipulate a Boolean expression using
    Boolean algebraic rules to obtain a simpler
    expression.
  • Simpler expression results in _______ gates and
    _______ inputs to the gates.

21
Boolean Algebra
  • Operators
  • AND ?
  • OR v
  • NOT A ?A
  • Values
  • 1 (true) 0 false

22
Boolean Algebra rules
  • Rules hold for any boolean value
  • a,b, c ... stand for these values
  • Identity element
  • a 0 a
  • a ? a
  • and ? are commutative
  • a b b a
  • a ? b b

23
Associative and Distributive
  • Associative rules
  • a (b c) (a b) c
  • a ? (b ? c)
  • Distributive rules
  • a (b ? c) (a b) ? (a c)
  • a ? (b c)
  • Note these rules look like algebra !

24
Complement (NOT)
  • a
  • a a 1
  • a 0
  • Additional rules
  • a a a
  • a ? a a

25
Properties of 0 and 1
  • a 0 a
  • a ? 1
  • 0
  • 1

26
Basic Identities of Boolean Algebra
27
Venn Diagram
  • You can think of Boolean equations as sets 1 is
    everything, and 0 is nothing.

28
Absorption Theorem
  • a ab a
  • a ( a b) a
  • Venn Diagram

29
An expression is true
  • A valid expression is true
  • true true
  • false false
  • x x
  • false true

30
Absorption Theorem
  • a ab a
  • Proof
  • a ab apply distributive law (14)
  • a ab a (1b) apply 3 1 b 1
  • a ab a ? 1 apply 2
  • a ab

31
Dual
  • The dual of an algebraic expression is obtained
    by interchanging OR and AND operations, and
    replacing 1s by 0s and 0s by 1s.
  • Replace
  • 1
  • 0

32
Why do rules come in pairs ?
  • Duality Principle
  • The duality principle of Boolean algebra states
    that a Boolean equation remains valid (true) if
    we take the dual of the expression
  • If an expression is true, its dual is true.

33
Proof of second absorption Theorem
  • a ( a b) a
  • Proof by principle of duality
  • a ab a is true we proved it
  • Apply duality

34
DeMorgans Laws
  • (a ? b) a b
  • (a b) a ? b
  • Replace AND with OR and OR with AND.
  • Remove complement from the entire expression and
    place over each variable instead.
  • These laws are duals of one another.

35
DeMorgans Laws in Pictures
A
A
B
B
A
A
B
B
A
A
B
B
36
  • Truth tables can be used to verify expressions.
  • Example, verify DeMorgans Theorem

37
Algebraic Manipulation
  • Ex F XYZ XYZ XZ
  • Boolean algebra is a useful tool for simplifying
    digital circuits.
  • Literal single variable within a term that may
    or may not be complemented.

38
  • Simplify
  • F XYZ XYZ XZ

39
  • Truth Table
  • Truth table for both expressions are equivalent.
  • By reducing the number of terms and number of
    literals, it is possible to obtain a simpler
    circuit.

40
Consensus Theorem
  • XY XZ YZ XY XZ
  • Note Y and Z are associated with X and X, and
    appear together in the term that is eliminated.
  • The dual of the consensus theorem is

redundant
41
Proof
  • XY XZ YZ

42
Complement of a Function
  • F can be obtained by interchanging 1s to 0s and
    0s to 1s for values of F in the truth table.
  • Can apply DeMorgans theorem as many times as
    necessary to find F.
  • F1 XYZ XYZ
  • Obtain F1
  • F1 XYZ XYZ

43
Lab 2 Seven segment decoder
  • Seven Segment display for calculator
  • Input to display is 4 bit number
  • Unsigned values that can be represented with 4
    bits_______________________
  • Want to display each of these on the display

44
Hex to seven segment display
45
Hex to seven segment display
46
Hex to Seven-Segment Display Truth Table
47
Minimized Boolean Expressions
Write a Comment
User Comments (0)
About PowerShow.com