Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know digital logic, yet was perplexed by the odd definition of D flip-flop this game uses with both "store" and "clock" inputs, which matches none of the standard variants of DFFs: https://en.wikipedia.org/wiki/Flip-flop_(electronics)#D_flip...

Edit: this continues on with the counter level, where you can use the register but it does not behave like the typical set of edge-triggered flip-flops (or transparent latches) that one would normally use. My best attempt at coming up with an explanation is that it's like two-phase edge-triggered logic.



Yeah. The flip flop, and its corresponding register version would be a DFF with enable pin. That is not actually too abnormal. The traditional implementation is taking a normal DFF and adding the enable feature either by gating the clock or by adding a mux in the input path, that uses the enable signal to select between the input or the existing output.


Everything started making sense after I thought of "store" as "enable", and I made it to the end pretty quickly after that --- except for the "bonus" multiplier level, which is definitely possible but seems like it would take about 10x as much space as the canvas allows.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: