Binary counting, Boolean Algebra - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

Binary counting, Boolean Algebra

Description:

Flip Flops. Counter. Schematic. Sensor and Trigger Control Circuit. Counting in decimal and binary ... Flip-Flop (4013) Fundamental element of sequential ... – PowerPoint PPT presentation

Number of Views:54
Avg rating:3.0/5.0
Slides: 38
Provided by: thomas100
Category:

less

Transcript and Presenter's Notes

Title: Binary counting, Boolean Algebra


1
Lecture 5
  • Binary counting, Boolean Algebra

2
Digital Electronics
  • Digital electronics
  • Number Theory, BCD, ASCII
  • Parallel vs Serial Transmission
  • AND, OR, NOT, NAND Gates
  • Boolean Algebra/Combinational Logic
  • Sequential Logic
  • Flip Flops
  • Counter

3
Schematic
  • Sensor and Trigger Control Circuit

4
Counting in decimal and binary
  • Digital circuits mathematically only have two
    states
  • 0 and 1
  • FALSE and TRUE
  • Binary system (0 and 1) or base 2 number system
    is used

5
Counting in decimal and binary
  • Counting in binary
  • 0 0
  • 1 01
  • 2 10
  • 3 11
  • 4 100
  • 5 101
  • 6 110
  • 7 111
  • 8 1000
  • 9 1001
  • 10 1010

6
Counting in decimal and binary
  • To avoid confusion
  • For binary 10 say " one zero" not ten
  • Mini quiz
  • What is decimal 8 equal to in binary (1000)
  • What is binary 0110 in decimal (6)
  • What is binary 0111 in decimal (7)

7
Place value (1s, 2s, etc)
  • The decimal number 3572 is
  • 3000 500 70 2
  • 3 -Thousands Place
  • 5 - Hundreds Place
  • 7 - Tens Place
  • 2 - Units

8
Place value
  • Decimal Place values
  • Powers of ten
  • Binary Place values
  • Powers of two

9
Binary to decimal conversion
  • Examples 1111 is
  • 8 4 2 1 16
  • Example 11011011 is
  • 128 64 0 16 8 0 2 1 219

10
Decimal to binary conversion
  • Primarily a division problem - For Example 15
  • Divide 15 by 2 7 with a remainder of 1 1s
  • 7 by 2 3 with a remainder of 1 2s
  • 3 by 2 1 with a remainder of 1 4s
  • 1 by 2 0 with a remainder of 1 8s
  • Therefore 15 decimal is 1111 binary

11
Decimal to binary conversion
  • Example 275
  • Divide 275 by 2 137 with a remainder of 1 1s
  • Divide 137 by 2 68 with a remainder of 1 2s
  • Divide 68 by 2 34 with a remainder of 0 4s
  • Divide 34 by 2 17 with a remainder of 0 8s
  • Divide 17 by 2 8 with a remainder of 1 16s
  • Divide 8 by 2 4 with a remainder of 0 32s
  • Divide 4 by 2 2 with a remainder of 0 64s
  • Divide 2 by 2 1 with a remainder of 0
    128s
  • Divide 1 by 2 0 with a remainder of 1 256s
  • Therefore 275 decimal is 100010011

12
Decimal to binary conversion
  • Check using place value scale
  • Computers require conversion from decimal to
    binary for the calculations and back for display
  • Encoder and decoder

13
Hexadecimal numbers
  • Dec Binary Hex Dec Binary Hex
  • 0 0000 0 11 1011 B
  • 1 0001 1 12 1100 C
  • 2 0010 2 13 1101 D
  • 3 0011 3 14 1110 E
  • 4 0100 4 15 1111 F
  • 5 0101 5 16 10000 10
  • 6 0110 6 17 10001 11
  • 7 0111 7 18 10010 12
  • 8 1000 8 19 10011 13
  • 9 1001 9 20 10100 14
  • 10 1010 A 21 10101 15

14
Hexadecimal numbers
  • Base 16 systems
  • In hexidecimal, "10" decimal A, "11" B, "12"
    C, "15" F, and "16" 10
  • This system permits the immediate conversion of
    a 4 bit binary number to a "hexadecimal" number
  • For example - 1011 B (hex) - use subscript to
    denote base system of number

15
Hex to Binary
  • F5 (hex) is F concatenated with 5 which is
  • 1111 concatenated with 0101
  • or 11110101

16
Binary to Hex
  • Separate the binary into groups of 4 and change
    to hex
  • 110111101011 is 1101 concat 1110 concat 1011
  • D E B
  • DEB (hex)

17
Hex to Decimal
  • Use place values
  • Assume A52 (hex)
  • 16 to the 2nd 16 to the 1st 16 to the zero
  • 256s 16s 1s
  • Ax256 5x16 2x1
  • 10x256 5x16 2x1
  • 2642

18
Decimal to Hex
  • Use the division and remainder rule
  • 59 decimal is 59 divided by 16 3 remainder 11
    which is B 1s
  • 3 divided by 16 0 remainder 3 16s
  • therefore 59 decimal is 3F (hex)

19
Octal numbers
  • Older computers use octal numbers which
    characterize
  • Conversion is accomplished using the same
    technique
  • You should be able to convert
  • Octal to binary and binary to octal (groups of 3)
  • Octal to decimal and decimal to octal

20
Base Nomenclature
  • 1010 1016 102 108
  • 1010 (not ) 1016 (not ) 102 (not ) 108
  • Subscript to denote base

21
AND gate
  • "All or nothing gate
  • Gate is a circuit
  • Operation can be illustrated with switches
  • Series circuit with two switches
  • Both switches must be closed to get the lamp to
    light
  • AND logic symbol

22
AND gate
  • Logic gate is a circuit that can decide what
    output to produce
  • See Fig 3.3 for typical "real" circuit
  • Output drives an LED
  • Develop truth table
  • Truth Table gives all possible combinations of A
    and B and the resulting outputs

23
AND Gate
  • Boolean expression
  • A B Y
  • Four ways of expressing the same thing
  • Words
  • Logic Symbol
  • Boolean Expression
  • Truth Table

24
OR gate
  • Any or all"
  • Parallel circuit
  • Truth table
  • Logic symbol
  • Boolean expression

25
Invertor and buffer (NOT gate)
  • Only one input
  • Produces an output that is opposite the input
  • Symbol
  • Expression
  • Truth table
  • Stated "not A"

26
NOT Gate
  • "double not A" - referred to as a buffer
  • Output equals input
  • Buffers/drivers are used to drive lamps, LEDs,
    etc

27
NAND gate
  • NOT AND or inverted AND
  • Symbol and Expression
  • Truth Table

28
NAND gate as a Universal gate
  • See Figure 3-21 page 36
  • Substitute NANDs for other gates

29
Gates with more than two inputs
  • Multiple input Gates can be made from
    combinations of other gates
  • 3 input AND
  • 4 input OR
  • The truth table determines the configuration

30
Flip-Flop (4013)
  • Fundamental element of sequential logic
  • Several types of flip-flop
  • R-S
  • JK
  • D
  • All work similarly

31
R-S flip flop
32
R-S flip flop
33
R-S flip flop
34
Clocked R-S flip-Flop
35
Clocked R-S flip-Flop
36
Clocked R-S flip-Flop
37
Flip Flop (Latching)
  • Provides the latched version of sensor trigger
  • Held until reset by the next clock pulse
Write a Comment
User Comments (0)
About PowerShow.com