Flip Flop Implementation using C language


Joined Aug 15, 2007
Sure, a lot of people here CAN do that, but first tell us why we should do your work for you? There are hundreds of "Can you do this for me?" types of requests, and the general answer is "You will learn more if you do it yourself. Show us what you've done, and we'll help you to go further."

Your best bet is to write down the operation of a flip-flop circuit. A timing chart will probably help. Then code it. Oh, and don't freak out. You'll see it's very simple.


P.S., I'm away from AAC on the weekend.


Joined Apr 24, 2011
A flip flop in C would be cake and pie if you had defined how it is being used.

Is it just a pure code beastie?
Is it inside an embedded controller using external pins?
What color do you want that flip flop? (Note: mauve has the most RAM)

Thread Starter


Joined Sep 23, 2011
K i m doing this project as part of my MCA sem1 and i know only working and diagram of flip flop (RS ,JK and master slave)


Joined Nov 24, 2008
1) Look at the truth table of the desired flip-flop.

2) In C, define variables for the inputs and outputs

3) Using the appropriate combination of If and Else constructs and logical (and {&&}, or {||}, not {!} ) operators, code the desired truth table

4) If it does not work, post it here and we will help diagnose the problem.

Thread Starter


Joined Sep 23, 2011
k thanks i have search and understand the RS flip flop now i m going to understand JK flip flop but i don't understand what CP Clock and why it is used in jk flip flop. Can u help to slove this question