2. Revision - PowerPoint PPT Presentation

About This Presentation
Title:

2. Revision

Description:

(B A) (B B') (Distributive, OR) = (B A) (1) (Complementation, OR) ... A'B C' (A A') (Distributive, AND) = A'B C' (1) (Complimentation, OR) ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 45
Provided by: daniel642
Category:

less

Transcript and Presenter's Notes

Title: 2. Revision


1
2. Revision
  • Objective To examine basic concepts of
  • 2.1 Numbering Systems
  • 2.2 Binary Numbers
  • 2.3 Boolean Algebra
  • 2.4 Logic Gates
  • 2.5 Adders
  • 2.6 Timing Diagram

2
2.1 Number System (base B)
  • Number is represented in terms of Positional
    Weighting
  • (N)B dn-1 Bn-1 dn-2 Bn-2... d1 B1 d0 B0
    d-1 B-1... d-m B-m
  • Integral Part.
    Fractional Part
  • B base
  • dk digit in position k, -m k n-1
  • Bk weight of position k, -m k n-1
  • n number of integral digits in N
  • m number of fractional digits in N

3
The most known systems
  • B 10 (Decimal)
  • digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
  • B 2 (Binary)
  • digits (0, 1)
  • B 8 (Octal)
  • digits (0, 1, 2, 3, 4, 5, 6, 7)
  • B 16 (Hexadecimal)
  • digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C,
    D, E, F)

4
Conversions (I)
  • How to convert from one number system to the
    other (change of base B)?
  • Algorithm 1
  • favorable for conversions to the decimal system
  • (N1)A (N2)10

5
Conversions (II)
  • Algorithm 2 Use of successive divisions and
    multiplications
  • favorable for conversions from the decimal
    system
  • (N1)10 (N2)B
  • (34.625)10 (?)2

6
Conversions (II) - Example
  • (34.625)10 (100010.101)2
  • Integral Part Fractional Part
  • 34 2 17 r 0 0.625 x 2 1 .25
  • 17 2 8 r 1 0.25 x 2 0 .5
  • 8 2 4 r 0 0.5 x 2 1
  • 4 2 2 r 0
  • 2 2 1 r 0
  • 1 2 0 r 1

7
Binary Hexadecimal
  • Binary Hexadecimal
  • Form groups of 4 bits starting at binary point.
  • Each group of 4 bits represents a hexadecimal
    digit.
  • Hexadecimal Binary
  • Convert each hexadecimal digit to its binary
    equivalent (4 bits).

8
Binary Octal
  • Binary Octal
  • Form groups of 3 bits starting at binary point.
  • Each group of 3 bits represents an octal digit.
  • Octal Binary
  • Convert each octal digit to its binary equivalent
    (3 bits).

9
2.2 Binary Numbers
  • Fixed Point Representation.
  • (N)2 has an implicit binary point in a fixed
    position.
  • Notion of complement
  • Complement(d) (Base - 1) - d

10
Complements of Binary Numbers
  • 1s Complement (1CF)
  • 2s Complement (2CF)
  • 2s Complement of 1001011 ?

11
Unsigned Binary Integers (UBI)
  • N is represented in terms of positional
    weighting 0 N 2n 1
  • dn-1dn-2dn-3 ... d2d1d0
  • No sign
  • N (00011010110)2(7.4) (?)10
  • Word of 11 digits
  • Fixed point representation, with 4 digits for the
    fractional part

12
Signed Binary Integers
  • 3 ways of representing N with n bits
  • Sign-Magnitude Form (SMF)
  • 1s Complement Form (1CF)
  • 2s Complement Form (2CF)

13
Comparison of SMF, 1CF, and 2CF
  • Sign Magnitude / 2s Complement / 1s Complement
  • (4 bits word length)
  • Binary SMF 2CF 1CF
  • 0111 7 7 7
  • 0110 6 6 6
  • 0101 5 5 5
  • 0100 4 4 4
  • 0011 3 3 3
  • 0010 2 2 2
  • 0001 1 1 1
  • 0000 0 0 0
  • 1111 -7 -1 -0
  • 1110 -6 -2 -1
  • 1101 -5 -3 -2
  • 1100 -4 -4 -3
  • 1011 -3 -5 -4
  • 1010 -2 -6 -5
  • 1001 -1 -7 -6

14
Binary Addition (by complement)
  • The bit sign is treated like any other bit (they
    are added!)
  • The subtraction is performed by addition the
    negative numbers are treated like numbers to add.
  • Addition by 1CF
  • Addition by 2CF

15
Overflow
  • An overflow occurs when the operands have the
    same sign and the result has a sign different
    from that of the operands.
  • Ex. 7 3 4 bits word SMF 7 0
    111 3 0 011 (-2) 1 010

16
2.3 Boolean Algebra
  • Two elements 0 and 1
  • Elementary operators
  • AND, OR, NOT
  • Representation and algebraic simplification of
    Boolean functions and their realization using
    logic gates will be studied.

17
Boolean Functions Truth Tables
  • Any Boolean function defined over n variables,
    each taking a Boolean constant value (0 or 1).
  • The Truth Table represents the function f, with
    all 2n combinations of 1s and 0s of its
    variables.
  • Each Boolean function is defined by its truth
    table and is represented by inter-connected logic
    gates.

18
Functions and Logic Gates
19
Laws of Boolean Algebra
  • Together with
  • Postulates (or axioms)
  • Theorems
  • Manipulations (proof)
  • Algebraic
  • Tabular
  • Simplifications
  • Algebraic

20
Proofs and Simplifications
  • Algebraic Proofs
  • Tabular Proofs
  • Algebraic Simplifications

21
Examples
  • Algebraic Proof
  • (A B) B A B
  • B (A B) (Commutative, OR)
  • (B A) (B B) (Distributive, OR)
  • (B A) (1) (Complementation, OR)
  • (B A) (Identity Element, AND)
  • A B (Commutative, OR)

22
Examples
  • Proof by Truth Table
  • (A B) B A B
  • A B (A B) B A B
  • 0 0 0 0
  • 0 1 1 1
  • 1 0 1 1
  • 1 1 1 1

23
Examples
  • Algebraic Simplification

Example f(ABC) AC AB ABC ?
AC AB ABC ABC (Absorption, OR) AC
AB AC (B B) (Distributive, AND) AC
AB AC (1) (Complementation,
OR) AC AB AC (Identity
Element, AND) AB AC AC
(Commutative, OR) AB CA CA
(Commutative, AND (2 times)) AB C (AA)
(Distributive,
AND) AB C (1)
(Complimentation, OR) AB C
(Identity Element, AND)
24
Representation Canonical Forms
  • Canonical Sum of Products Form (CSOP or Sm)
  • Sum of mintermes
  • Ex. f (A, B) (AB) (AB) Sm(1, 3 )
  • Canonical Product of Sums Form
  • (CPOS or PM)
  • Product of maxtermes
  • Ex. f (A, B) (AB) (AB) PM(1, 2)

25
Examples of Canonical Forms
  • According to De Morgans law
  • Mi' mi and mi' Mi
  • Say f(A, B, C) defined by
  • A B C f
  • 0 0 0 0
  • 0 0 1 1
  • 0 1 0 0
  • 0 1 1 0
  • 1 0 0 1
  • 1 0 1 1
  • 1 1 0 1
  • 1 1 1 1

26
Examples of Canonical Forms
  • f(A, B, C) defined by
  • A B C f
  • 0 0 0 0
  • 0 0 1 1
  • 0 1 0 0
  • 0 1 1 0
  • 1 0 0 1
  • 1 0 1 1
  • 1 1 0 1
  • 1 1 1 1
  • ABC ABC ABC ABC ABC
  • Sm (1, 4, 5, 6, 7) is the CSOP form of f

27
Examples of Canonical Forms
  • f(A, B, C) defined by
  • A B C f
  • 0 0 0 0
  • 0 0 1 1
  • 0 1 0 0
  • 0 1 1 0
  • 1 0 0 1
  • 1 0 1 1
  • 1 1 0 1
  • 1 1 1 1
  • (ABC) (ABC) (ABC)
  • PM (0, 2, 3) is the CPOS form of f.

28
Equivalence of Canonical Forms
  • f(A, B, C) Sm (0, 4, 5, 7) PM (?)
  • PM (1, 2, 3, 6)
  • f(A, B, C, D) PM (2, 3, 5, 6, 7) Sm (?)
  • Sm (0, 1, 4) ???
  • Sm (0, 1, 4, 8, 9, 10, 11, 12, 13, 14, 15) !!!

29
Canonical Forms (encore!)
  • A function f is not necessarily represented in a
    canonical form.
  • f(A, B, C) ABC AB BC
  • How to obtain the canonical forms of such
    functions?
  • Algebraic method

30
Algebraic Method
  • f(A, B, C) AB C ABC
  • AB(CC) C(AA)(BB) ABC
  • ABC ABC ABC ABC ABC ABC
    ABC
  • ABC ABC ABC ABC ABC ABC
  • S m(3, 2, 6, 4, 0, 7)

31
Remarks on Boolean Functions
  • Single representation (POS or SOP).
  • Logical equivalence.
  • How many possible functions for N Boolean
    variable?
  • Functions with 2 Boolean variables

32
Functionally Complete Sets
  • Together of operators being able to represent all
    the functions
  • AND, NOT, OR, NOR, NAND
  • POS form with NOR
  • SOP form with NAND

33
2.4 Logic Gates
  • The logic gates implement the switching functions
  • A gate with N inputs represents a function with N
    Boolean variables
  • One comes across OR, AND, NOR, and NAND gates
    with N inputs


34
Synthesis with Logic Gates
  • To implement a switching function with logic
    gates
  • f(A, B, C) (A (BC)')'
  • ß

35
Analysis with Logic Gates
  • To find the functionality of the circuit made up
    of logic gates
  • ß
  • f(A, B, C) (A (BC)')'

36
Synthesis with Single Gates
  • More economical than AND, OR, NOT
  • SOP form with NAND
  • POS form with NOR
  • Similar to SOP.


37
Return to NOR-NAND
  • f(A, B, C, D) AB AC D
  • To implement with NAND ( ) only
  • ((AB AC D))
  • ((AB) . (AC) . (D))
  • (AB) (AC) (D)
  • (AB) (A C) (D)

38
Return to NOR-NAND
  • f(A, B, C, D) AB AC D
  • To implement with NOR () only
  • ((AB)) ((AC)) D
  • (AB) (AC) D
  • (AB) (AC) D
  • (((AB) (AC) D))
  • ((AB) (AC) D)
  • ((AB) (AC) D) 0

39
Return to NOR-NAND
  • g(A, B, C, D) (AB).(AC) . D
  • Implement with NAND ( ) only
  • ((AB)). ((AC)) . D
  • (AB) . (AC) . D
  • (AB) . (AC) . D
  • (((AB) . (AC) . D))
  • ((AB) (AC) D)
  • ((AB) (AC) D) 1

40
Return to NOR-NAND
  • g(A, B, C, D) (AB).(AC) . D
  • Implement with NOR () only
  • (((AB).(AC).D))
  • ((AB) (AC) D)
  • (AB) (AC) D
  • (AB) (A C) D

41
2.5 Adders
  • Classic combinational circuits
  • Various common circuits
  • Half-Adders
  • Elementary adder
  • Parallel full-adder
  • Elementary subtracter
  • Adder-substracter

42
Adding words of several bits?
  • Parallel full-adder of 4 bits
  • EA Elementary Adder

R5
C4
C3
C2
C1
S4
S3
S2
S1
43
2.6 Logic Timing Diagram
44
Complementary Reading
  • In Mano and Kime
  • Sections 1.2 and 1.3
  • Numbers and binary arithmetic
  • Sections 2.1, 2.2, 2.3, 2.6 and 2.7
  • Boolean algebra, logic gates, canonical forms
  • Section 3.8, except  Carry Lookahead Adder 
  • Adders
  • Sections 3.9 and 3.10
  • Subtracters
Write a Comment
User Comments (0)
About PowerShow.com