0% found this document useful (0 votes)
67 views47 pages

Unit 3 PDF - 124656

AI Matterial notes

Uploaded by

Krishna Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
67 views47 pages

Unit 3 PDF - 124656

AI Matterial notes

Uploaded by

Krishna Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 47
UNIT- 3 FLIP-FLOPS & LATCHES SEQUENTIAL CIRCUITS Digital electronics is classified into combinational logic and sequential logic. Combinational logic output depends on the present inputs levels, whereas sequential logic output not only depends on the input levels, but also stored levels (previous output history). Combinational Circuits Combinational ninputs. — Sah —* moutpus Fig, Block Diagram of Combinational Circuit Sequential Circuits Primary inputs Primary ‘Combinational Logie Circuit ‘Secondary Isecondary inputs outputs | Memory Elements ‘The memory elements are devices capable of storing binary info. The binary info stored in the memory elements at any given time defines the state of the sequential circuit, The input and the present state of the memory element determine the output. Memory elements next state s also a function of external inputs and present state. A sequential circuit is specified by a time sequence of inputs, outputs, and internal states. There are two types of sequential circuits. Their classification depends on the timing of their signals: % Synchronous sequential circuits Asynchronous sequential circuits Asynchronous sequential circuit This is a system whose outputs depend upon the order in which its input variables change and can be affected at any instant of time. | » Ouraute _ Combinational a circu Fp tops Clock pulses ‘ioc diagram P_J | (8) Timing diagram of clack puses ‘Synchronous sequential circuits ‘This type of system uses storage elements called flip-flops that are employed to change their binary value only at diserete instants of time. Synchronous sequential circuits use logic gates and flip-flop storage devices. Sequential circuits have a clock signal as one of their inputs. All state transitions in such circuits occur ‘only when the clock value is either 0 or I or happen at the rising or falling edges of the clock depending on the type of memory elements used in the circuit, Synchronization is achieved by a timing device called a clock pulse generator. Clock pulses are distributed throughout the system in such a way that the flip-flops are affected only with the arrival of the synchronization pulse. Synchronous sequential circuits chat use elock pulses in the inputs are called clocked-sequential circuits. Iapate + Opes ipstops (©) Blak diagram on Combinational Circuits Sequential Circuits I. The circuit whose output at any instant depends only on the input present at that instant only is known as combinationational ccireuit 1. The circuit whose output at any instant depends not only on the input present but also (on the past output a is known as sequential circuit hhis (ype of circuit has no memory unit 2. This type of circuit has memory unit for store past output, 3. Examples of combinational circuits are half adder, full adder, magnitude comparator, multiplexer, demultiplexer e.tc. 3. Examples of sequential circuits are Flip flop, register, counter e.tc. 4 Faster in Speed STower compared to Combinational Circuit Combinational Circuits Pie et cabal ee y| Lose Cicut singus —>] ob anton FS ronyus | seco secorary a Li, puts outouts Memory Ekmerts (€ Fie. Black isgramot Conbianal i ‘A sequential circuit can further be categorized into Synchronous and Asynchronous. Here is the difference between synchronous and asynchronous sequential circuits: Synchronous Sequential Circuit: Output changes at discrete interval of time. It is a circuit based on an equal state time or a state time defined by external means such as clock. Examples of synchronous sequential circuit are Flip Flops, Synchronous Counter. Asynchronous Sequential Circuit: Output can be changed at any instant of time by changing the input. Itis a circuit whose state time depends solely upon the internal logie circuit delays. Example of asynchronous sequential circuit is Asynchronous Counter. Basic Flip Flops: ‘A circuit that changes from I 10 0 or from 0 to 1 when current is applied. It is one bit storage location. Flip flops are actually an application of logic gates. When a certain input value is given to them, they will be remembered and executed, if the logic gates are designed correctly. A higher application of flip flops is helpful in designing better electronic circuits, ‘The most commonly used application of flip flops is in the implementation of a feedback circuit. As a memory relies on the feedback concept, flip flops can be used to design it. Latches and flip-flops are the basic elements for storing information. One latch or flip- flop can store one bit of information. The main difference between latches and flip-flops is that for latches, their outputs are constantly affected by their inputs as long as the enable signal is asserted. In other words, when they are enabled, their content changes immediately when their inputs change. Flip-flops, on the other hand, have their content change only either at the rising or falling edge of the enable signal. This enable signal is usually the controlling clock signal. After the rising or falling edge of the clock, the flip-flop content remains constant even if the input changes. There are basically four main types of latches and flip-flops: SR, D, JK, and T. The major differences in these flip-flop types are the number of inputs they have and how they change state. For each type, there are also different variations that enhance their operations. In this chapter, we will look at the operations of the various latches and flip-flops. 1. RS Latch RS latch have two inputs, $ and R. $ is called set and R is called reset. + The S input is used to produce HIGH on Q (ie. store binary I in flip-flop). * The R input is used to produce LOW on Q (ie. store binary 0 in flip-flop). @' is Q complementary output, so it always holds the opposite value of Q, The output of the S-R latch depends on current as well as previous inputs or state, and its state (value stored) can change as soon as its inputs change. There are mainly four types of flip flops that are used in electronic circuits. 1. The basic Flip Flop or S-R Flip Flop 2. Delay Flip Flop [D Flip Flop] 3. J-K Flip Flop 4. T Flip Flop 2. S-R Flip Flop: ‘The SET-RESET flip flop is not designed with the help of two NOR gates and also two, NAND gates. These flip flops are also called $-R Latch. S-R Flip Flop using NOR Gate ‘The design of such a flip flop includes two inputs, called the SET [S] and RE! There are also two outputs, Q and Q”. The diagram and truth table is shown below. — ol _R (reset) R|QQ o}1 0 a 00/1 0 G@fters=1,R=0) 1 oro. 00/0 1 (after S=0,R=1) 0 11j00 (a) Logic diagram (b) Function table Fig.5-3 SR Latch with NOR Gates ‘The operation has to be analyzed with the 4 inputs combinations together with the 2 possible previous states. From the diagram itis evident that the flip flop hes mainly four states. They are 1. When , R=0 the output becomes Q=1, Q’=0 This SR flip flop function table is constructed based on the XOR gate. In XOR gate if any of the input is 1 the output becomes 1 In this state when S=1 and R=0 the output Q becomes set (1). So this state is also called the SET state, 2. When S=0, R=1, the output becomes Q=0, Q’= In this state When R=1 it resets the output. So this state is known as the RESET state. In both the states you can see that the outputs are just compliments of each other and that the value of Q follows the value of S. 3. When S: ), R=0 the output is Q & Q” = Remember (memory) If both the values of $ and R are switched to 0, then the circuit remembers the value of S and R in their previous state. 4, When S=1, R=1 the output Q=0, Q’=0 [Invalid] This is an invalid state because the values of both Q and Q’ are 0. They are supposed to be compliments of each other. Normally, this state must be avoided. S-R Flip Flop using NAND Gate ‘The above SR flip flop can be constructed using NAND gate, 1 0 5 (et) @ Tofo1 11/01 (atters =1,R=0) 1 o1}1o 11/1 0 (atters =0,R=1) 6 Reset) 2 oojtt () Logie diagram (b) Function table Fig. 5-4 $R Latch with NAND Gates Like the NOR Gate $-R flip flop, this one also has four states. They are 1, S=1, R=0, Q=0, Q’=1 ‘This state is also called the SET state, 2. S=0,R=1, Q=1, Q’=0 ‘This state is known as the RESET state. In both the states you can see that the outputs are just compliments of cach other and that the value of Q follows the compliment value of S. 3. S=0, ) Q=1, & Q’ =I [Invalid] If both the values of $ and R are switched to 0 it is an invalid state because the values of both Q and Q are 1, They are supposed to be compliments of cach other. Normally, this state must be avoided. 4. S=1, R=1,Q & Q’ emember If both the values of S and R are switched to |, then the circuit remembers the value of S and R in their previous state. (Clocked $-R Flip Flop 4 Mis also called a Gated $-R flip Hop. ‘4 The problems with $-R flip flops using NOR and NAND gate is the invalid state 4 This problem can be overcome by using a bistable SR flip-flop that can change ousputs when certain invalid states are met, regardless of the condition of either the Set or the Reset inputs. 4 For this, « clocked $-R flip flop is designed by adding wo AND n NOR Gate flip flop 4 The circuit diagram and truth table is shown below. ‘The circuit ofthe $-R flip flop using NAND Gate and its truth table is shown below. [>> ; os. (2) Logi diagram, (8) Faction table s Nexistate of O Nocchange Noehange Q= OrReset state O=I:sctstote Indeterminate asecus Fig 5-5 SR Latch with Control Input ‘+ Acclock pulse [CP] is given 10 the inputs of the AND Gate |¢ When the valnic of the clock nulse is "the entnuts af hoth the AND Gates remain °0! ‘As soon as a pulse is given the value of CP turns "I'. This makes the values at S and R to pass through the NOR Gate flip flop. But when the values of both $ and R values turn "1’, the HIGH value of CP causes both of them to turn to °0' for a short moment. As soon as the pulse is removed, the flip flop state becomes intermediate. ‘Thus either of the two states may be caused, and it depends on whether the set or reset input of the flip-flop remains a ’1' longer than the transition to ’0’ at the end of the pulse. Thus the invalid states can be eliminated. Excitation Table of the SR Lateh ‘* During the design process we usually know the transition from present state to next state and wish to find the latch input conditions that will cause the required transition. © For this reason, we need a table that lists the required inputs for a given change of state, Such a table is called an excitation table, and it specifies the excitation behavior of the sequential circuits, These are used in the synthesis (design) of sequential circuits, which we shall see later. +The excitation ofthe SR latch is as follows: Excitation Table K Map for Q,. On Ts] A | Ont ofolo{ ° 8 o}o}1] o o}i}o} 1 o } a | 1 | indeter t }o] o tfojs] o ttalol 4 Om =5+E0, t [a] + | indeter Note: Indeter = not used 3, D Flip Flop D flip flop is actually a slight modification of the above explained clocked SR flip-flop. From the figure you can see that the D input is connected to the S input and the complement of the D input is connected to the R input. The D input is passed on to the flip flop when the value of CP is "1" When CP is HIGH, the flip flop moves to the SET state. If it is *0, the flip flop switches to the CLEAR state. As long as the clock input C = 0, the SR latch has both inputs equal to 0 and it can’t change its state regardless of the value of D When C is 1, the latch is placed in the set or reset state based on the value of D. If D= 1, the Q output goes to 1 If D =0, the Q output goes to 0. | >>—_ Q EL CD | Nextatate of 0X Nochange 10 | QO Reset state c GL O= Kiser state (a) Logic diagram (b) Function table Fig. 5-6 D Latch Excitation Table: K- Map for Qui): Q, D Que 0 0 0 0 1 1 0 1 1 as ot Se 3. -K Flip Flop % A JK flip flop can also be defined as a modification of the S-R flip flop. The only difference is that the intermediate state is more refined and precise than that of a S-R flip flop. J au -Q K—{_» FH G “ The behavior of inputs J and K is same as the S and R inputs of the S-R flip flop. The letter J stands for SET and the letter K stands for CLEAR. “ When both the inputs J and K have a HIGH state, the flip-flop switches to the complement state. So, for a value of Q = 1, it switches to Q=0 and for a value of Q = 0, it switches to 0=1 “ The circuit includes two 3-input AND gates. The output Q of the flip flop is returned back asa feedback to the input of the AND along with other inputs like K and clock pulse [CP] + So, if the value of CP is °1', the flip flop gets a CLEAR signal and with the condition that the value of Q was earlier 1. + Similarly output Q of the flip flop is given as a feedback to the input of the AND along with other inputs like J and clock pulse [CP]. + So the output becomes SET when the value of CP is | only if the value of Q’ was earlier 1 “ The output may be repeated in transitions once they have been complimented for J=K=1 because of the feedback connection in the JK flip-flop. +» This can be avoided by setting a time duration lesser than the propagation delay through the flip-flop. & The restric mon the pulse width can be eli inated with a master-slave or edge-triggered construction. Characteristic table: Clk J K Quel 0 x x Memory 1 0 0 Memory ca 0 I 0 {1 1 0 1 Get) 1 i 1 Toggle Excitation table for JK Flipflop _K map for Qn+1: Qn | J | K | Onset Qn 01 " 10 o folo 0 o}ofi| o Gy) 0 1 oO 1 1 1 0 1 1 1 1 |o}o 1 Te 1 ol 4 0 Quo = I-Qn+ KO, 1 |1/0 1 1 1 1 oO Timing Diagrai 6 LUE er le 4. T Flip Flop + This is a much simpler version of the J-K flip flop. % Both the J and K inputs are connected together and thus are also called a single input J-K flip flop. % When clock pulse is given to the flip flop, the output begins to toggle. * Here also the restriction on the pulse width can be eliminated with a master-slave or edge- triggered construction. Take a look atthe cireuit and truth table below. ClLK-4 b> [| ol sExcitation Table for T Flip Flop: K map for T Flip Flop: Characteristic Equation: Quit = 1.0, +T.0, ruin eT Master-Slave Flip Flop Circuit Before knowing more about the master-slave Mip flop you have 10 know more on the basics of a J-K flip flop and S-R flip flop. ‘To know more about the flip flops, click on the link below. Master-slave flip flop is designed using two separate flip flops. Out of these, one acts as the master and the other as a slave. The figure of a master-slave J-K flip flop is shown below. From the below figure you can see that both the J-K flip flops are presented in a series connection. The output of the master J-K flip flop is fed to the input of the slave J-K flip flop. ‘The output of the slave J-K flip flop is given as a feedback to the input of the master J-K flip flop. The clock pulse [Clik] is given to the master J-K flip flop and it is sent through a NOT. Gate and thus inverted before passing it to the slave J-K flip flop. “Masster Latch” “Shave Lutch™ f “Slave” “Master | ee Flip-flop | Flip.fiop ‘Warking When Clock=1, the master J-K flip flop gets disabled. ‘The Clock input of the master input will be the opposite of the slave input. So the master flip flop output will he recognized by the slave flip flop only when the Clock value becomes 0, Thus, when the clock pulse males transition from 1 10 0, the locked ourputs of the master flip flop are fed through to the inputs Of the slave flip-flop making this Mlip flop edge or pulse-triggered. To understand better ake a Jook atthe timing diagram illustrated below. Flip-flop ourput can change Thus, the circuit accepts the value in the input when the clock is HIGH, and passes the data to the output on the falling-edge of the clock signal. This makes the Master-Slave J-K flip flop a Synchronous device as it only passes data with the timing of the clock signal. The output of flip Hop can be changed by bring a small change in the input signal. This small change can be brought with the help of a clock pulse or commonly known as a trigger pulse. When such a trigger pulse is applied to the input, the output changes and thus the flip flop is said 10 be wiggered. Flip flops are applicable in designing counters or registers which stores data in the form of multi-bit numbers. But such registers need a group of flip flops connected to each other as sequential circuits, And these sequential circuits require trigger pulses ‘The number of wigger pulses that is applied to the input of the circuit determines the number in a counter. A single pulse makes the bit move one position, when it is applied onto a register that stores multi-bit data. In the case of SR Flip Flops, the change in signal level decides the type of trigger that is to be given to the input. But the original level must be regained before giving a second pulse t the circuit. If a clock pulse is given to the input of the flip flop at the same time when the output of the flip flop is changing, it may cause instability to the circuit. The reason for this instability is the feedback that is given from the output combinational circuit to the memory elements, This problem can be solved to a certain level by making the flip flop more sensitive to the pulse transition rather than the pulse duration ‘There are mainly four types of pulse-triggering methods. They differ in the manner in whieh the electronic circuits respond to the pulse. They are 1, High Level Triggering When a flip flop is required to respond at its HIGH state, a HIGH level triggering method is used. It is mainly identified from the straight lead from the clock input. Take a look at the symbolic representation shown below Triggers on high clock level / eee lag cK gz High Level Triggering 4. Low Level Triggering When a flip flop is required to respond at its LOW state, a LOW level triggering method is used.. It is mainly identified from the clock input lead along with a low state indicator bubble. Take a look at the symbolic representation shown below. Triggers on low clock level Li] ; —O ak a Low Level Triggering 3. Positive Edge Triggering When a flip flop is required to respond at a LOW to HIGH transition state, POSITIVE edge triggering method is used. It is mainly identified from the clock input lead along with a triangle. Take a look at the symbolic representation shown below. Triggers on this edge of the clock pulse . I 3 cuk Positive Edge Triggering a 4. Negative Edge Triggering When a flip flop is required to respond during the HIGH to LOW transition state, a NEGATIVE edge triggering method is used. It is mainly identified from the clock input lead along with a low-state indicator and a triangle. Take a look at the symbolic representation shown below. Triggers on this edge of the clock pulse [al ) alfa ae — Q Negative Edge Triggering Clock Pulse Transition ‘The movement of a trigger pulse is always from a 0 to 1 and then | to 0 of a signal. Thus it takes two transitions in a single signal. When it moves from 0 to 1 it is called a positive transition and when it moves from 1 to O itis called a negative transition, To understand more take a look at the images below. ive pulse Negative pulse 1 1 0 0 Poctive Neoatve Nagainn Preaine Eage Bape Ege Edge Definition of clock pulse transition The clocked flip-flops already introduced are triggered during the 0 to | transition of the pulse, and the state transition starts as soon as the pulse reaches the HIGH level. If the other inputs change while the clock is still 1, a new output state may occur. If the flip-flop is made to then the multiple-transition problem can be eliminated ‘The multi-transition problem can be stopped is the flip flop is made to respond to the positive or negative edge transition only, other than responding to the entire pulse duration. wp Kop Conyersion For the conversion of one flip flop to another, a combinational circuit has to be designed first. If a JK Flip Flop is required, the inputs are given to the combinational circuit and the output of the combinational circuit is connected to the inputs of the actual flip flop. Thus, the output of the actual flip flop is the output of the required flip flop. The following flip flop conversions will be explained. + SR Flip Flop to JK Flip Flop + JK Flip Flop to SR Flip Flop . SR Flip Flop to D Flip Flop + D Flip Flop to SR Flip Flop + JK Flip Flop to T Flip Flop + JK Flip Flop to D Flip Flop + D Flip Flop to JK Flip Flop SR Flip Flop to JK Flip Floy As told earlier, J and K will be given as external inputs to S and R. As shown in the logic diagram below, S and R will be the outputs of the combinational circuit. ‘The truth tables for the flip flop conversion are given below. The present state is represented by Qp and Qp+1 is the next state to be obtained when the J and K inputs are applied. For two inputs J and K, there will be eight possible combinations. For each combination of J, K and Qp, the corresponding Qp+I states are found. Qu. simply suggests the future values to be obtained by the JK flip flop after the value of Qp. The table is then completed by writing the values of S and R required getting each Q,., from the corresponding Qp. That is, the values of $ and R that are required to change the state of the flip flop from Qp to Qp+1 are written. Conversion Table Logic Diagram 2x inputs | outputs | +R Inputs 2 « | o sk So Ge fo We oo & a o 4) job ssp ig ax ei f & 0 1 1 0 @ a 1 © 1 oo a Hy Ge 10 oa & & a G ri & i te 1 K-Map K Flip Fk R Flip Fk This will be the reverse process of the above explained conversion. § and R will be the external inputs to J and K. As shown in the logic diagram below, J and K will be the outputs of the combinational circuit. Thus, the values of J and K have to be obtained in terms of S, R and Qp. The logic diagram is shown below. A conversion table is to be written using S, R, Qp, Qp+l, J and K. For two inputs, S and R, eight combinations are made. For each combination, the corresponding Qp+1 outputs are found ut. The outputs for the combinations of S=1 and R= are not permitted for an SR flip flop. Thus the outputs are considered invalid and the J and K values are taken as “don’t cares”, JK Flip Flop to S-R Flip Flop Conversion Table Logic Diagram SR Inputs | Outputs Inputs SR |Qpqpei]) Kk Go) 0 "0 Ox oo £2 xX oO Oa 0 op oO x Os f Oe & @ oy Of 1 x ie £4 £8 1 1 Invalid Dont care 1 1 Invalid Dont care SR Flip Flop to D Flip Flop As shown in the figure, $ and R are the actual inputs of the flip flop and D is the external input of the flip flop. The four combinations, the logic diagram, conversion table, and the K-map for S and R in terms of D and Qp are shown below. S-R Flip Flop to D Flip Flop Canversion Table K-maps Logic Diagram Oteout | ouput | $8 inputs oo 1 Wo tf sO 7 7H 5 0 oe of of 0 m hk 7 gue bx foes ojo ry jr Q— cea me S=o R=D D Flip Flop to SR Flip Flop Dis the actual input of the flip flop and S and R are the external inputs. Eight possible combinations are achieved from the external inputs S, Rand Qo. But, since the combination of ‘S=1 and R=I are invalid, the values of Qp+1 and D are considered as “don’t cares”. The logic diagram showing the conversion from D to SR, and the K-map for D in terms of S, Rand Qp are shown below. 0 Flip Flop to $-R Flip Flop Convertion ole fepmesfgus | orm Oi ge « Oo Me iat iG wy 1 11 Invacare wa vats ont care JK Hip Flop to T Flip Flop J and K are the actual inputs of the flip flop and T is taken as the external input for conversion. Four combinations are produced with T and Qp. J and K are expressed in terms of T and Qp. The conversion table, K-maps, and the logic diagram are given below. J-K Flip Flop to T Flip Flop ee wa me Tieput | Outputs | )-K Inputs ¥ 74] x 7 7 * a ap ees | of of] x of x] 0 t he xt K Flip Flop to D D is the external input and J and K are the actual inputs of the flip flop. D and Qp make four combinations. J and K are expressed in terms of D and Qp. The four combination conversion table, the K-maps for J and K in terms of D and Qp, and the logic diagram showing the conversion from JK to D are given below. 3°K Flip Flop to O Flip Flop Conversion Table Kemaps Logic Diagram 2° Dinput | Ouputs | 3K Inputs o Boon | ee o| o} x ooo 0 x a o 8 wD % 2D £ <0 ay ee Bi ty oe be 10. . D Flip Flop to JK Flip Flop In this conversion, D is the actual input to the flip flop and J and K are the external inputs. J, K and Qp make eight possible combinations, as shown in the conversion table below. D is expressed in terms of J, K and Qp. The conversion table, the K-map for D in terms of J, K and Qp and the logic diagram showing the conversion from D to JK are given in the figure below 0 Filip Flop to 1 Flip Flop Comerson Table 2x tnput | Qutpts, | Otnout ° ° ° Lope O1agram °° 1 ° 0 = >» Kop 2 2 0 oft nai # cal & 10

You might also like