Hey, friends welcome to the YouTube channel ALL ABOUT ELECTRONICS. So in this video, we will learn about the flip flop conversion. Now in the earlier videos of the sequential circuit, we have already seen the different types of flip flops. Like the SR flip flop, the D flip flop, JK flip flop, as well as the T flip flop. So it is good to have a knowledge about the flip flop conversion. Let's say, you have designed some circuit with the help of the SR flip flop. Now during the implementation, you found that, you do not have the SR flip flop. And instead of the SR flip flop, you only have JK flip flop. So if you have a knowledge about the SR to JK flip flop conversion, then there is a no need to design the entire circuit once again. And just using the few logic gates the same flip flop can be converted into the another flip flop. So let us understand the basic idea about the flip flop conversion. So let's say we have a one flip flop, and we want to convert it into the another flip flop. So for this conversion, we require this combinational circuit. So typically this combinational circuit consists of few logic gates. So as you can see, in this block diagram, the output of the existing flip flop is given to this combinational circuit. And the inputs of the required flip flop will be also given to this combinational circuit. For example, let's say we have a SR flip flop. And we want to convert it into the JK flip flop. That means, here our record flip flop is equal to JK flip flop. So as you can see here, this J and K inputs as well as the output of the SR flip flops are given to this combinational circuit. And as you can see, the output of this combinational circuit is given as an input to this SR flip flop. So if this combinational circuit is designed properly, then the output of this SR flip flop will now behave as the output of the JK flip flop. Or in other words, now this circuit will work as the JK flip flop. So in this way, we can convert the one type of flip flop into the another flip flop. Now in this flip flop conversion, they may not always require to connect the output of the flip flop, back to this combinational circuit. But in general, this is the basic block diagram of the flip flop conversion. So since we have a four types of flip flops, so we have a total 12 different possible flip flop conversions. And in this video we will see that, how to convert the SR flip flop, into the JK flip flop, D flip flop, and the T flip flop. All right. So now let us start with the SR to JK flip flop conversion. And let's see, how we can convert the SR flip flop into the JK flip flop. So since our required flip flop is the JK flip flop, so we should be aware about the behavior of the JK flip flop. Or in other words, we should know the truth table of the JK flip flop. So first of all, let us write down the truth table of this JK flip flop. So for the JK flip flop, we know that, when both inputs are 0, then the next state is same as the present state. Similarly, when this J is 0, and K is 1, then the flip flop will get reset to 0. Likewise, when this J is 1, and K is 0, then in the next state, the output of the flip flop will become 1. And as you know, that both inputs of the JK flip flop are 1, then the output of the flip flop will toggle. That means, in the present state, if output is equal to 0, then in the next state, it will become 1. Or currently, if the output of the flip flop is 1, then in the next state, it will become 0. So that is the truth table of the JK flip flop. Now to get this output transition, let us see, what inputs we should apply to this SR flip flop. So basically, we should be aware about the excitation table of this SR flip flop. So this is the excitation table of this SR flip flop. So as you can see, in the first case, both Qn and the Qn+1 are 0. So we know that, when both S and R inputs are 0, then the SR flip flop will retain its current state. That means, presently if this Qn is 0, then in the next state also, this Qn+1 will remain 0. Similarly, if this S is 0 and R is 1, then also this Qn+1 will become 0. So in general we can say that, to get this transition, this S should be equal to 0, while the R should be either 0 or 1. So in general we can say that, this S input should be equal to 0, while the R input is equal to X. Where this X represents that, this input can be either 0 or 1. Similarly, in the next possible transition, this Qn is 0, while the Qn+1 is equal to 1. So for this transition, this S should be equal to 1, while the R should be equal to 0. Because as you know, when this S is 1, and R is 0, then the output of the SR flip flop will get set to 1. Likewise, in the next possible transition, this Qn is 1, and the Qn+1 is equal to 0. So for this transition to occur, the S should be equal to 0, while the R should be equal to 1. And similarly, in the last possible transition, both Qn and the Qn+1 are 1. So as you know, when both S and R are 0, then the SR flip top will retain its current state. That means presently, if the Qn is 1, then in the next state also it will remain 1. Secondly if this S is 1, and R is 0, in that case also this Qn+1 will become 1. That means, for this last transition to occur, the S can be either 0 or 1, and the R should be equal to 0. Or in general we can say that, this S should be equal to X, when the R should be equal to 0. So this is the excitation table of the SR flip flop. And using this excitation table we can complete our earlier table. So as you can see from this excitation table, when both Qn and the Qn+1 are 0, then this S should be equal to 0, while the R should be equal to X. Similarly for this 1 1, this S should be equal to X, but the R should be equal to 0. Similarly once again for this 0 0, this S should be equal to 0, while the R should be equal to X. Likewise for this 1 0 transition, this S should be equal to 0, while the R should be equal to 1. Similarly for this 0 1, this S is 1 and R is 0. Similarly, for this one to one transition, this S should be equal to X, while the R should be equal to 0. And likewise, we can complete the entire table. So in this way, with the help of this excitation table of the SR flip flop, we can find the required S and R inputs, to get all these transitions. So in this way, during the flip flop conversion, first of all write the truth table of the required flip flop, and then using the excitation table of the existing flip flop, write the required inputs of the existing flip flop, to get the particular transitions. So now let us find the relation of the inputs S and R in terms of the J, K and the Qn. Because as you can see, the input to the required flip flop is the combination of the J , K and the Qn. So once we know this relation, then we can easily design this combinational circuit. So first of all, let us find the expression of the S in terms of the J, K and the Qn. So as you can see, this S is equal to 1, for the two different minterms. That is minterm m4 and the m6, while the m1 and the m5 are the don't care terms. So first of all, let us write down all the minterms in the K map, and let us try to simplify the overall expression. So as you can see in the K map, here we can group the minterm m4 and the m6. And by making this group, we are able to cover all the minterms in the K map. So now if you see, then this group corresponds to J dot Qn'. Because in this group, the variable J is not changing, and its value is equal to 1. Similarly this Qn variable is also not changing, and its value is equal to 0. That means, this group represents J dot Qn'. And therefore, the expression of the S is equal to J dot Qn'. Similarly let us find the expression of the input R in terms of the J, K and the Qn. So as you can see, this R input is 1 for the two different minterms. That is minterm m3 and the m7. And once again, here there are two minterms that is m0 and the m2. So first of all, let us write down all these four minterms in the K map. And let us try to simplify the expression of the R. So as you can see over here, we can make the group of this minterm m3 and the m7. And this group corresponds to K dot Qn. Because in this group, both variable K and Qn are not changing. And as you can see, their value is equal to 1. Therefore the expression of the R is equal to K dot Qn. So in this way, this S is equal to J dot Qn', while the R is equal to K dot Qn. So to implement this expression, we require two AND Gates. And as you can see, with the help of the two AND Gates, we can convert this SR flip flop, into the JK flip flop. So here, this input to the S is equal to J dot Qn', while this input to the R is equal to K dot Qn. So in this way, we can convert the SR flip flop, into the JK flip flop. And in fact, during our discussion of the JK flip flop, using the same technique, we have converted the SR flip flop, into the JK flip flop. So in this way, using this conversion technique, we can convert the one flip flop into the another flip flop. So similarly, now let us see the SR to D flip flop conversion. So here, this D flip flop is our required flip flop. So first of all, let us write down the truth table of the D flip flop. So as you know, for the D flip flop, the output Qn+1 is same as the D input. That means, whenever this D is 0, then the Qn+1 is also equal to 0. And whenever this D is equal to 1, then this Qn+1 is also equal to 1. So that is the truth table of the D flip flop. So now, to get this Qn to Qn+1 transitions, let us find the required S and R inputs. And for that, once again let us use the excitation table of the SR flip flop. So as you can see from the excitation table, for this 0 0 the S should be equal to 0, while the R should be equal to X. Likewise for this 1 0 transition, this S is 0, and R is 1. Similarly, for the 0 1 transition this S is 1, and R is equal to 0. And likewise, in the last case, for this 1 to 1 transition, this S is equal to X, while the R is equal to 0. So in this way, we found the required excitations of the inputs S in R. So here, since the SR flip flop is our actual flip flop, so let us find the expression of the inputs S and R in terms of the D and Qn. And first let us find the expression of the S. So as you can see over here, this S input is 1, for the minterm m2. While the minterm m3, is the don't care term. So first of all, let us write down all these two minterms in the K map, and let us try to simplify the expression. So as you can see over here, with the help of the don't care term, we can make the group of minterm m2 and the m3. And this group corresponds to D. That means here, this S is equal to D. Similarly now let us find the relation of the input R in terms of the D and Qn. So as you can see, this R is equal to 1, for the minterm m1, while the minterm m0 is the don't care term. So first of all, let us write down all these two minterms in the K map. So as you can see in the K map, with the help of the don't care term, here we are able to make the group of two minterms. And this group corresponds to D'. That means here this R is equal to D'. So in this way, this S is equal to D, and the R is equal to D'. And to implement that, we just require one more NOT gate. That means using one NOT gate, we can convert this SR flip flop into the D flip flop. So similarly, now let's see the SR to T flip flop conversion. So here, this T flip flop is our required flip flop. So first of all, let's write down the truth table of this T flip flop. So as you know for the T flip flop, when its input is equal to 0, then it will retain its present state. That means with T is equal to 0, currently if this Qn is 0, then in the next state also, it will remain in the same state. And likewise, currently if the Qn is 1, then in the next state also it will remain 1. That means, whenever, this T input is equal to 0, then the flip flop will retain its current state. And whenever, this T is equal to 1, then the output of the flip flop will toggle. That means, presently if this Qn is 0, then in the next state it will become 1. And likewise if Qn is 1, then in the next state it will become 0. So that is the truth table of this T flip flop. So now to get these transitions, let us find the required S and R inputs. So to complete this table once again let us take the help of the excitation table of the SR flip flop. So as you can see from the excitation table, for this 0 0 transition, this S should be equal to 0, while the R should be equal to X. Similarly for this 1 1 transition, this S is equal to X, while R is equal to 0. Likewise for this 0 to 1 transition, this S is equal to 1, while the R is equal to 0. And likewise in the last case, for this 1 to 0 transition, this S is 0 and R is 1. So in this way, we got our required inputs S and R to get the particular transitions. So now, let us find the expression of the inputs S an R in terms of the T and Qn. And first let us find the expression of the S. So as you can see, this S input is equal to 1, for the minterm m2, while the minterm m1 is the don't ccare term. So first of all, let us write down all these two minterms in the K map, and let us see whether we can further simplify it or not. So if you see over here, then we cannot group these two minterms. So here this minterm m2 corresponds to T.Qn'. So we can say that, the expression of the S is equal to T.Qn'. Similarly let us find the expression of the R. So as you can see over here, this R is equal to 1, for the minterm m3, while the minterm m0 is the don't care term. So once again let us write down these two minterms in the K map. So once again, here we cannot group these two minterms. So here, this minterm m3 corresponds to T.Qn. That means, here the expression of the input R is also equal to T.Qn. That means, for this SR to T flip flop conversion, this S is equal to T.Qn', where the R is equal to T.Qn. And it can be implemented with the help of the two AND Gates. So in this way, we can convert the one type of flip flop into the another flip flop. So similarly, in the next video we will see that how to convert the JK flip flop into the SR, D and the T flip flops. But I hope in this video, you understood the basic technique for the flip flop conversion. And you also learned about how to convert the SR flip flop into the JK, D as well as the T flip flops. So if you have any questions or suggestions, then do let me know here in the comment section below. If you like this video, hit the like button and subscribe to the channel for more such videos.