Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] RS NOR Latch #149

Open
erich-m opened this issue Feb 14, 2023 · 3 comments
Open

[Feature Request] RS NOR Latch #149

erich-m opened this issue Feb 14, 2023 · 3 comments

Comments

@erich-m
Copy link

erich-m commented Feb 14, 2023

Due to the mechanics of the simulator, RS nor latches do not have an "unstable" state, and so memory chips cannot be created.
image

@erich-m erich-m changed the title RS NOR Latch [Feature Request] RS NOR Latch Feb 14, 2023
@JC3
Copy link

JC3 commented Feb 23, 2023

You can do them with NAND's:

Animation

If you want to make SR flip flops you can use a falling-edge-triggered SR design, see #156

You might also look at D flip flops and JK latches.

@crispeeweevile
Copy link

Would someone mind explaining why you would need this, and what the difference between a memory chip and the registers we've made is?

@erich-m
Copy link
Author

erich-m commented Jul 10, 2023

In digital logic, states are either 0, 1 or undefined (X). The feature request is not so much a request for a feature but to highlight a critical flaw in the design of the program.
If you have a NOT gate and you put a 0 into the input, you will get a one as an output. If you have a 1 as an input, the output will be a 0. This can be done in the software.
If you take two NOT gates and connect them in series, the actual state of both wires should be undefined, as it is in just about every other circuit simulator software. Some of the later figures demonstrate what happens in Digital Logic Sim, and it does not have the same results.
fig3-other softwares
When creating memory latches, having an undefined state is actually very important for making registers. The problem with an RS NOR latch on its own is the fact that it has this instability and undefined state, caused by two inverting logic gates feeding into the other. When both inputs to the latch are 0, the output should be undefined...that is why there is a D flip flop. The extra digital logic actually fixes it and does not allow for an undefined state.
fig1-not gate properties-rs outside
fig2-build of rs nor latch
Since the Digital Logic Sim software does not have an undefined, the two inputs to the latch can both be 0, and there will be an output that is not undefined, but in fact, is 1 (or 0 depending on how the outputs are linked together). This means that there is actually no need to build a D flip flop at all. The flip flop though, is a crucial component in several types of registers that ultimately cannot be built.
fig4-truth table for rs nor latch
I will be happy to answer more questions as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants