Live data from Hacker News

Show HN: I made a programmable computer from NAND gates

github.com

51–60 of 80 posts

Re: Show HN: I made a programmable computer from NAND gates

#54

Liar. You used NAND gates and a clock.

...a clock which can be made from a ring oscillator, consisting of an odd number of NAND gates wired as NOT gates.

Oh wow, I didn't actually know that. Thanks for the interesting trivia

Re: Show HN: I made a programmable computer from NAND gates

#55

Liar. You used NAND gates and a clock.

...a clock which can be made from a ring oscillator, consisting of an odd number of NAND gates wired as NOT gates.

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!)

Re: Show HN: I made a programmable computer from NAND gates

#56

Earlier quoted context omitted.

One curious idea my friends have entertained is to go one level even deeper and emulate the very transistors that make up the NAND gates on the web, too. It would certainly spell disaster for performance, but it's without-a-doubt interesting.

That would be fascinating! Do you know any resources that document the transistor to logic gate translation?

In https://nandgame.com/ (mentioned elsewhere, a game version of NAND to Tetris) you start by making a NAND gate out of relays. The relays are electromechanical components, but you can choose to think of a transistor (within certain "regimes") as being directly electrically equivalent to one. (This simplification isn't appropriate for all engineering tradeoff purposes, although I don't know the details of how it fails or how we can benefit from knowing more about transistors' actual behavior.)

The electromechanical relay is a very simple device to understand, if you're willing to just believe that electromagnets produce magnetism (without understanding why the universe works according to Gauss's laws on the relationship between electric current and magnetism). It's a coil of wire where an electric current produces magnetism that physically pulls a switch open or closed.

Re: Show HN: I made a programmable computer from NAND gates

#57
post #55

Earlier quoted context omitted.

...a clock which can be made from a ring oscillator, consisting of an odd number of NAND gates wired as NOT gates.

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!)

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

No.

Re: Show HN: I made a programmable computer from NAND gates

#58
post #25

Cool project. It reminds me of a theoretical issue. As the project page says, this system is clearly Turing equivalent. Since it runs software, it even implements a _universal_ Turing machine. But the design uses only (synchronic) sequential logic [1] and Wikipedia seems to suggest that automata theory considers sequential logic only equivalent to finite state machines. Not Turing machines. Isn't that clearly a major…

Real-world computers are equivalent to linear bounded automata, not true Turing machines, because they have finite memory. This technicality is mostly ignored because a computer with a large finite memory is a decent enough approximation to a Turing machine for practical purposes. But, for example, the halting problem is decidable for linear bounded automata — because there are only finitely many states, every comput…

> because there are only finitely many states, every computation must either halt or eventually revisit an earlier state and get stuck in a loop

Yet we know this doesn't happen in practice.

Re: Show HN: I made a programmable computer from NAND gates

#60
post #55

Earlier quoted context omitted.

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!)

>Could you have a few different-sized square waves continue to cycle through the circuit? No.

Could you help improve my intuition about that, or give me a reference where I could learn more?
Post reply on HN