# Making flip-flops using logic gates in Proteus - I'm getting gray (unknown) signals

for my school project i have to use Proteus to design my circuit. My professor told us that we cannot use any flip-flops and if we had to use them we should make them by using logic gates. I'm trying to make JK flip flops but I'm getting gray signals in the areas shown in picture. Can someone help me how can I get this flip-flop to work?

• What does gray signal mean? Why is that bad? What logic gate types those are, 74, 74LS, 74HC, some other type? Commented May 23, 2020 at 10:01
• @Justme I used the one Digital Primitive ones that came with Proteus, their names are AND, NOR, AND_3 etc. Commented May 23, 2020 at 10:05
• @Justme Gray signal means unknown signal so it's neither 1 nor 0 Commented May 23, 2020 at 10:05
• Undefined state has to be defined First. Then it will work.. Wait i'll write an answer. Commented May 23, 2020 at 10:09
• @SadatRafi If there is a loop, then the circuit is wrong. Commented May 25, 2020 at 20:42

Can someone help me how can I get this flip-flop to work?

With J and K inputs set high (red squares) the output of a JK flip flop is not truly defined - it is in the toggle condition and, the current state of its outputs is defined by the earlier values of $$\Q\$$ and $$\\bar{Q}\$$ on the previous clock edge: -