Download presentation
Presentation is loading. Please wait.
Published bySheena Stone Modified over 9 years ago
1
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram
2
Sahar Mosleh PageCalifornia State University San Marcos 2 So far we analyzed the behavior of SR and D latch. The truth table and the block diagram of these two latch are as follows: ClkSR Next state of Q 0111101111 X0011X0011 X0101X0101 No change Q=0;Reset Q=1; set Indeterminate S R Clk D Q Q’ Q ClkD Next state of Q 011011 X01X01 No change Q=0;Reset Q=1; set Note that in D latch output Q is equal to input D
3
Sahar Mosleh PageCalifornia State University San Marcos 3 As seen from the block diagram of the sequential circuit below, it has a feedback path from the output of the memory element to the input of the combinational circuit. Consequently, the input of the memory or storage element are derived in part from the output of the same or other storage elements. When latches are used for storage elements, a serious difficulty arises: The state transitions of the latches start as soon the clock pulse changes to 1. The new state of a latch appear at the output while the pulse is still active This output is connected to the inputs of the latches through the combinational circuit If the inputs applied to the latches change while the clock pulse is still in l, the latch will respond to new values and new output state may occur. Combinational Circuit Memory element Input Output Feed Back Path Clock Pulse
4
Sahar Mosleh PageCalifornia State University San Marcos 4 The result is an unpredictable situation since the state of latches may keep changing as long as the clock pulse stays in active level (stays at 1) The solution is to trigger latches only during a signal transition. A clock pulse goes through two transitions: from 0 to 1 and the return from 1 to 0 as shown below. Flip flops are the type of latches that state change occurs only during clock pulse transition. Respond to positive level Positive edge response Negative edge response The positive transition is defined as positive edge The negative transition is defined as negative edge Flip flops are constructed either as positive edge triggered or negative edge triggered
5
Sahar Mosleh PageCalifornia State University San Marcos 5 Edged Triggered D Flip Flop The construction of a D flip flop with two D latches and an inverter is shown below. The first latch is called the master and the second is called slave The circuit samples the D input and changes the output only at the negative edge of the clock pulse When the clock is 0, the output of the inverter is 1, the slave latch is enabled, and its output, Q, is equal to output Y. At this situation, the master latch is disabled because clock is zero When the input pulse changes to 1, the data from the external D input is transferred to the master. The slave however, is disabled as long as clock remains 1 because its clock input equals to 0 D Clk Q D D Y D Latch (Master) D Latch (Slave)
6
Sahar Mosleh PageCalifornia State University San Marcos 6 Any change in the input changes the master output at Y but cannot affect the slave output When the pulse returns to 0, the master is disabled and is isolated from the D input at the same time the slave is enabled and the value of Y is transferred to the output of the flip flop at Q Thus, the output of the flip flop can change only during the transition of the clock from 1 to 0 (negative edge) The behavior of the master-slave flip flop just described indicates that the output may change only during the negative edge of the clock. It is also possible to design the circuit so that the flip flop output changes on the positive edge of the clock
7
Sahar Mosleh PageCalifornia State University San Marcos 7 JK flip flops Other types of flip flops can be constructed by using the D flip flop and external logic Two flip flops widely used in the design of digital systems are the JK and T flip flops There are three operations that can be performed with a flip flop: set it to 1, reset it to 0, or complement its output The JK flip flop performs all three operations. The circuit diagram of a JK flip flop constructed with a D flip flop and gates is shown on the next slide
8
Sahar Mosleh PageCalifornia State University San Marcos 8 We can investigate the circuit applied to the input of D latch D = JQ’ + K’Q When J =1 and K=0, D = Q’ + Q = 1. So the next clock edge sets the output to 1. When J=0 and K= 1, D = 0, so the next clock edge resets the output to 0. When both j=k=1, D = Q’, the next clock edge complements the output When both j=k=0, D = Q, the clock edge leaves the output unchanged D Clk Q D Latch K J Q’
9
Sahar Mosleh PageCalifornia State University San Marcos 9 As the result, J input sets the flip flop to 1, and the K input resets it to 0 and when both inputs are enabled, the output is complemented The graphic symbol for the JK flip flop is shown below J Clk Q Q’ k
10
Sahar Mosleh PageCalifornia State University San Marcos 10 T Flip Flop The T flip flop is a complement flip flop and can be obtained from a JK flip flop when inputs J and K are tied together. This is shown below When T=0 (J=K=0), a clock edge does not change the output. When T=1 (J=K=1), a clock edge complements the output. The complementing flip flop is used for designing binary counter T flip flop can be constructed with a D flip flop as shown above The expression for the D input is: D= T + Q = TQ’ + T’Q When T=0, then D=Q, there is no change in the output. When T=1, then D=Q’, and the output complements J C lk Q Q’ k T D Clk Q T Q’ D Clk Q Q’ From JK flip-flop From D flip-flop Graphic symbol
11
Sahar Mosleh PageCalifornia State University San Marcos 11 Characteristic Table A characteristic table defines the logical properties of a flip flop The characteristic tables of three types of flip flops are presented below These tables define the next state as a function of the inputs, and present state Q(t) refers to preset state prior to the application of a clock edge Q(t+1) is the next state, one clock period later Note that the clock edge input is not included in the table but is implied to occur between time t and t+1 JK Q(t+1) 00110011 01010101 Q(t) 0 1 Q’(t) No Change Reset Set Complement D Q(t+1) 0101 0101 Reset Set T Q(t+1) 0101 Q(t) Q’(t) No Change Complement JK flip flop D flip flop T flip flop
12
Sahar Mosleh PageCalifornia State University San Marcos 12 The characteristic table for the JK flip flop shows that the next state is equal to present state when J = K = 0 This can be expressed as Q(t+1) = Q(t) indicating that the clock produces no change of the state When K=1 and J=0, the clock reset the flip flop and Q(t+1)=0 When J=1, K=0, the flip flop sets and Q(t+1)=1 When both J=K=1, the next state changes to the complement of the present state which is Q(t+1) = Q’(t) The next state of the D flip flop is only depend on the D input and independent of the present state. This can be expressed as Q(t+1) = D. The characteristic table of T flip flop has only two conditions when T = 0, clock edge does not change the state. When T=1, clock edge complements the state of the flip flop
13
Sahar Mosleh PageCalifornia State University San Marcos 13 Characteristic Equation The logical property of a flip flop has described in the characteristic table can be expressed also algebraically with a characteristic equation For the D flip flop, we have the equation Q(t+1) = D Which means next state of the output will be equal to value of input D The characteristic equation for JK flip flop can be derived from table or circuit. We obtain Q(t+1) = JQ’ + K’Q The characteristic equation for the T flip flop is obtained from the circuit as: Q(t+1) = T + Q = TQ’ + Q’T
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.