115 points · by ImGameDeving · 6y ago · 44 comments
https://i.imgur.com/cwZe7Zf.png
When both inputs are low, the NORs are equivalent to NOTs and you can see they form a storage loop. When one input is high, it forces the loop into the corresponding state.
That said, I'm disappointed this article doesn't show the transistor-level schematic, because trying to read from a breadboard is extremely difficult.
PS - For what its worth, that image has a transparent background, so when the imgur viewer displays it you get black traces on a black background.
Even if you draw both gates facing the same way, there is feedback and you still need to follow the signals the other way; but instead of simply turning one the gate in the direction its output is actually going, and showing that structure more clearly, you introduce the extra ugliness and confusion of crossing signals.
Certainly there are different fields that follow different rules, for example in schematic representation of feedback systems the feedback blocks are often drawn right-to-left. They get away with it because their schematics are generally much simpler--usually a dozen or so blocks, compared to hundreds or thousands in a nontrivial digital circuit schematic.
Also - I am not sure I understand your comment about 'extra ugliness and confusion of crossing signals'. Flipping the inverter backwards does nothing to remove the signal cross, it just moves the cross outside of the region you showed. Note how one of the inputs to your flipflop is now on the right hand side--in most cases the crossing will reappear when you connect the rest of your circuit.
Good point otherwise on the clearer schematic!
I had been making magnetic snap-together circuits, so I had a bunch of small PCBs with simple 2- and 3-pin footprints and holes that I soldered neodymium disc magnets into.
I put a big TO-220 N-fet on one of them, and stuck it to a laminated whiteboard so that the magnets stuck without shorting together, then I hooked it up to an LED as a simple high-side switch.
When I bent the transistor so that its metal plane rested against the magnetic whiteboard, its gate would latch after briefly tapping either V+ or ground to the magnet which was connected to the pin. When the transistor's metal plane was perpendicular to the board, it didn't latch. Disconnecting and reconnecting the LED didn't perturb the 'saved' value, and neither did removing power overnight. And the same thing happened with a similar P-fet connected as a low-side switch.
It probably wasn't a "real" latch; it was a very over-sized transistor with low gate capacitance, and I didn't try it with something like a 3904. I think it might have had something to do with the principles behind nonvolatile ferroelectric RAM, but I never did get to the bottom of it.
Here is one that he explains the SR latch: https://www.youtube.com/watch?v=KM0DdEaY5sY
Also the lectures by this amazing MIT professor: https://www.youtube.com/watch?v=AfQxyVuLeCs
> A flip-flop is a storage element based on the gated latch principle, which can have its output state changed only on the edge of the controlling clock signal.
I also just pulled out my Fairchild Pocket Designer Guide (published circa 1985; inherited from a retired former colleague) which explicitly differentiates 74/54 series flip-flops from latches both in section and symbology. So there's at least 35+ years of industry convention without citing standard.
To cite one industry standard, from ANSI/IEEE Std 91-1984[2] § 4.2.1:
> Cm should be used to identify an input that produces action, for example, the edge-triggered clock of a bistable circuit or the level-operated data enable of a transparent latch
...or from § 5.9:
> The symbol for a bistable element (for example, a flip-flop) does not contain a general qualifying symbol. ... When a bistable element is controlled by a C input (Symbol 4.3.7-1) it is necessary to indicate whether this element is a latch, or an edge-triggered, pulse-triggered, or data-lock-out bistable.
In fact, symbol 5.9-2 labeled "D-type latch, dual / Part of SN7475" is distinct from symbol 5.9-7 labeled "Edge-triggered D-type bistable / Part of SN7474"...the former being what the blog discusses.
So no, this designer begs to differ.
[1] 3rd Edition, § 7.7 Summary of Terminology
A simple capacitor does not require an external power supply to store the state, but the state decays in time.
A flip-flop requires an external supply to store the state, but the state is stable indefinitely.
The value of an HN comment is its impact on current and future discussion, or (to put it in a pseudo-technical way) the expected value of the subthread it forms the root of [2]. I've been struggling for a way to explain this that doesn't sound smarmy (like "be nice" or "tone"), since it's not about being nice. It's about what leads to richer improvisation and curious conversation, which is what we're trying to optimize for here [3].
Edit: elsewhere in this thread are some great examples of opening-up responses:
https://news.ycombinator.com/item?id=22798780 ("even more interesting...")
https://news.ycombinator.com/item?id=22798746 ("I once...")
If you ask yourself and sense into what kinds of responses such comments invite, you'll get the spirit of what we're going for. I don't mean you personally—I mean all of us. This is a community project.
[1] https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
[2] https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
[3] https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
My approach is halving the number of transistors for the same byte