Lurker News
I am proud to present my solo hobby project NAND. This year-long undertaking follows the completed Nand to Tetris course, but ported to the web with its own runtime, user interface, and IDE. Using the "Load example program" selector, you can try out some programs I wrote on NAND's emulated hardware such as 2048, a genetic algorithm, and a manual stack overflow to corrupt the screen.

Check out NAND at https://nand.arhan.sh
Additionally, I've authored an extensive writeup about the project. Read about it on the GitHub repository's readme.

Comments (73) 26 threads

Show all comments

Showing thread 8 of 26

IncreasePosts1 reply#
Liar. You used NAND gates and a clock.
userbinator2 replies#
...a clock which can be made from a ring oscillator, consisting of an odd number of NAND gates wired as NOT gates.
ArchAndStarch#
Oh wow, I didn't actually know that. Thanks for the interesting trivia
schoen1 reply#
How do we know that that will converge to a single constant period of oscillation? Could you have a few different-sized square waves continue to cycle through the circuit?

(I've never built or simulated that, I'm just trying to imagine what could happen!)

rational_indian1 reply#
>Could you have a few different-sized square waves continue to cycle through the circuit?

No.

schoen2 replies#
Could you help improve my intuition about that, or give me a reference where I could learn more?
rational_indian1 reply#
First look up Barkhausen criteria, then read the following. For ring oscillators gain will be greater than unity for only those waves whose period matches the gate delay. Only one such wave exists since the gate delay is a fixed number.

Continue this thread — 2 replies

rational_indian#
Okay, so I was wrong. You can get multiple harmonics if you use a long enough chain of inverters. I will simplify the paper mentioned in a sibling comment. In a long chain at any given point of time certain (variable number of) pairs of inverters drop in and out of the circuit changing the total propagation delay, giving rise to multiple harmonics. You'll have to read the paper for details.