enter image description here

I am trying to implement magnitude comparators with storage as a D FF. In this picture, if X is equal to 0, second AND gate on magnitude comparator (that comparator in rectangle) will give 1, as Q' > Q. It works as intended, only problem is I cant store the output value. I want to clear the flip flop if input is not equal to 1, so I choose clear input as Q' of third DFF in the picture, but in that case in every clock pulse flip flop always clears. Any help appreciated.

  • \$\begingroup\$ I have no idea what you're trying to accompish here, so just a couple of observations: First, if the D input is zero when the clock edge occurs, the output will go to zero. But it seems you're looking for something else. If you also tie the D input directly to the active-low clear input of the DFF, then the output will go to zero immediately when the D input goes low, without waiting for the next clock edge. Is that what you want? \$\endgroup\$
    – Dave Tweed
    May 7 at 12:33


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.