Electronic – What flip-flop should I use to design a logic circuit with minimum number of logic gates

digital-logic

How can I know with which flip-flop I can design a complex logic circuit with minimum number of logic gates?

In our homework and exams, we are supposed to use minimum number of logic gates. In one problem, we are asked for designing a register with simple binary counter, serial load, 2 bit rotation, and parallel load options(synchronization is not mentioned in problem). We are free to use whatever flip-flop we want to use. Which flip-flop would you use in this case? And why? Is there a way to know with which flip-flop we could design the logic circuit with minimum number of logic gates?

Thanks in advance.

Edit: In this assignment, we're allowed to use D, T, SR, JK flip-flops. The problem is, when we use different flip-flops, our combinational part of the circuit is different, is there a way to know with which flip-flop this part would be smaller(contains less number of logic gates).

The register we are asked to design is holding 4 bits. We have 2 bit input which specifies the operation will be running on register(counting, rotating, parallel loading, serial loading).

And by "rotation", I mean Circular Shift

Also, nothing mentioned about "synchronization", so I think it's up to us.

Best Answer

Serial/parallel-load shift registers and bit rotations are going to work most naturally with a D flip flop, since they just send data straight through; binary counters are going to work most naturally with a T flip flop, since each counter bit Ck = Ck,previous XOR carryk, where carry is the carry bit from the previous stage.

If you look at JK flip-flops, however, they are the "universal" flip-flop that can act as a D- or T- flip-flop depending on the input signals.

To get a D from a T, or vice versa, you need an XOR gate. To get a T from a JK, you just tie the JK inputs together. To get a D from a JK, you need an inverter, as the J/K inputs need to be opposites.

In your application, you've got enough complexity, that I suspect the gate counts are going to be very close, and it's probably not worth worrying about -- unless you have to optimize, in which case you'll just have to try it for each case.

IMHO, the D flip-flop is conceptually the simplest to use, and it works naturally with most of your operations, so I'd start with that.