Question

task 1: In digital electronics and modern computer hardware, a flip-flop is sequential digital circuit used as a basic memory

0 0
Add a comment Improve this question Transcribed image text
Answer #1

C - PROGRAM

#include<stdio.h>

#include<conio.h>

int main()

{

int CP, D, Q, Q_Not;

printf("Enter the Clock Pulse & Input state = ");

scanf("%d %d", &CP, &D);

if(CP==0)

{

printf("There will be no output as the Clock Pulse is zero.\n");

}

else if(CP==1)

{

if(D==0)

{

Q=0;

Q_Not = 1;

}

else {

Q= 1;

Q_Not =0;

}

}

printf("Q = %d\nQ' = %d ", Q, Q_Not);

return 0;

}

Screen shot of C code:

Output:

The steps of the above design are as follows:
1. Draw the Truth table using the formula D = Q(t+1).
2. Take CP & D as inputs for Clock Pulse & Input State.
3. Now use the truth table in C code for putting

conditions.
4. Conditions:
if (CP==0):
No change in States;
else if (CP == 1):
if ( D==0):
Q = 0;
Q' = 1;
else:
Q = 1;
Q' = 0;
5. END.

Add a comment
Know the answer?
Add Answer to:
task 1: In digital electronics and modern computer hardware, a flip-flop is sequential digital circuit used...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT