Presentation is loading. Please wait.

Presentation is loading. Please wait.

Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science.

Similar presentations


Presentation on theme: "Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science."— Presentation transcript:

1 Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science

2 Example Problem  A hall light is controlled by two light switches, one at each end. Find (a) a truth function, (b) a Boolean expression, and (c) a logic network that allows the light to be switched on or off by either switch. xy f( x, y ) 000 011 101 110 (What kind of gate has this truth table? Let x and y be the switches:

3 Example (cont)  One possible equation is the complete sum-of- products form: f(X,Y) = XY* + X*Y  Use The Most Complex Machine xLogicCircuit Module to implement the equation. xy f( x, y ) 000 011 101 110

4 How to use NAND gates to build an OR gate? Truth Table ABCDQ 00110 01101 10011 11001 Hint 1 : Use 3 NAND gates Hint 2 : Use 2 NAND gates to build 2 NOT gates Hint 3 : Put the 3 rd NAND gate after the 2 “NOT” gates A B C D Q

5 How to use NAND gates to build a NOR gate? Truth Table ABCDEQ 001101 011010 100110 110010 A B C D Q E Hint 4 : Put the “NOT” gate after “OR” gate Hint 3 : Use a NOR gate to build a NOT gate Hint 2 : Use 3 NAND gates to build an OR gate Hint 1 : Use 4 NAND gates

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20 Multiplexers  A combinational circuit that selects info from one of many input lines and directs it to the output line.  The selection of the input line is controlled by input variables called selection inputs.  They are commonly abbreviated as “ MUX ”.

21

22

23

24 These pictures have errors.

25

26 T CLK Q1

27 T CLK Q1

28 How to use D to implement T Flip- Flop D = TQ’ + T’Q T

29 How to use T to implement D Flip- Flop TQ+Q+ 0101 QQ’QQ’ DQ+Q+ 0101 0101 T = DQ’ + D’Q Q + 0 1 D01D01 0 1 1 0

30 How to use T to implement D Flip- Flop T = DQ’ + D’Q D

31 Implementing with a D AND a T flip-flop Using this FSM with three states, an operating only on inputs and transitions from one state to another, we will be using both D and T flip-flops.

32 Implementing with a D AND a T flip-flop Since we have no state “11”, our Q(t+1) is “don't care” = “XX” for both of these transitions. Consider the first column of the Q(t+1) values to be “D” and the second to be “T” and then we derive two corresponding charts. DT

33 Implementing with a D AND a T flip-flop Then we need to derive the corresponding equations.

34 Implementing with a D AND a T flip-flop We assume that Q(t) is actually a pair of Q D Q T. Now, with these equations, we can graph the results.

35 Implementing with a D AND a T flip-flop

36

37

38

39

40

41

42


Download ppt "Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science."

Similar presentations


Ads by Google