Ambliss-Micro-Lab / ambliss-micro-lab-js

MIT License
3 stars 1 forks source link

create Latches, Fllipflops #3

Open yvkrishna opened 3 years ago

yvkrishna commented 3 years ago

Latches, flip-flops are the important and building part of sequential logic circuits. So we need to introduce sequential circuits to the project.

As part of building latches and flip-flops, we need to use the logic circuits which we already implemented.

As part of Latches, we need to implement

As part of flip-flops, we need to implement

pantinashekhar commented 3 years ago

Screenshot (59)

Please find attached SR latch.

pantinashekhar commented 3 years ago

Screenshot (60)

Please find attached improvised SR latch.

yvkrishna commented 3 years ago

@pantinashekhar, the logic okay but there are few corrections to be made.

we should use inheritance and import logic gates for the underlying logic. The inputs to the latch must be given as function arguments. The class should be sequential and for latches, the methods should be sr_latch, and so on. Similarly, for flip-flops, the methods should be sr_flip_flop and so on.