Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science
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 ) (What kind of gate has this truth table? Let x and y be the switches:
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 )
How to use NAND gates to build an OR gate? Truth Table ABCDQ 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
How to use NAND gates to build a NOR gate? Truth Table ABCDEQ 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
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 ”.
These pictures have errors.
T CLK Q1
T CLK Q1
How to use D to implement T Flip- Flop D = TQ’ + T’Q T
How to use T to implement D Flip- Flop TQ+Q QQ’QQ’ DQ+Q T = DQ’ + D’Q Q D01D
How to use T to implement D Flip- Flop T = DQ’ + D’Q D
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.
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
Implementing with a D AND a T flip-flop Then we need to derive the corresponding equations.
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.
Implementing with a D AND a T flip-flop