Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Start only with NAND (at least have an option to)

A topic by necauqua created Dec 28, 2022 Views: 790 Replies: 9
Viewing posts 1 to 5
(+3)

Making a computer from a SINGLE basic element is way more epic than starting from AND and NOT. And starting from just the NAND is like the classic way.

The first level (if you're ever going to gamify it and have levels or something, to make it an interactive learning thing) would be to build a NOT from the NAND, and then use it to adapt NAND into AND :)


Also I'm super curious if there's an optimization path (and if you did that already) where if you can somehow determine that the circuit is stateless (no feedback loops down the circuit tree up until nands?) you can just have it be a precomputed truth table internally

Developer(+1)

I'll think about it! Precomputing combinational chips should be a fairly easy optimization to implement, but it's not something I've done yet.

(+1)

I agree, and disagree.

There's nothing more fundamental in digital logic than a transistor and an inverter, but I do think starting off with just one chip would add more satisfaction in the user's progression

What?.

A transistor is not an AND gate, that would be two transistors.. And an inverter is a transistor with a resistor. Anyway, that's one level of abstraction deeper than gates and this sim does not touch that *at all*?.

The fact that all other gates (and thus, all possible logic too) can be built from NAND makes it more or less fundamental, cuts off unnecessary entities. And it's not even a unique propery of NAND, lol

(1 edit)

Two transistors, my apologies.

What do you mean it doesn't touch them? All of the gates are made of them, no?

(3 edits)

It's about levels of abstraction. Transistors aka super tiny solid state switches are one thing, and then from them you can build a few (maybe even just a single NAND one) gates - and now you're only thinking in terms of gates. This model does not simulate transistors, it's basic elements are gates and their combinations (techincally the atoms - the builtin, hardcoded, axioms, things that just *are* and you cannot break them down further are AND and NOT and my suggestion was to make NAND a single fundamental unit).

I feel like my explanation is pretty bad as this is something that seems intuitively obvious to me (separating this ideal abstract model with gates that we're simulating here from reality where everything is quantum physics anyway lol), apologies for that

(10 edits) (+1)

I already understood what you were saying in terms of hardware, but now I understand why you suggested the change, so thanks for clarifying!

Your explanation wasn't bad, and yes, to you and I, having NAND be the initial chip is more intuitive, but hear me out.

Imagine for a second you've never touched digital logic:

"Here's a NAND gate."

".... What on Earth is a NAND gate."

vs.

"Here's an AND gate, and here's a NOT gate."

"I can immediately tell what these two things do."

"Furthermore, I wonder what I'll make if I put one in front of the other and wire them up." (It's a NAND.)


You could, of course, just, well, explain what a NAND is at the start, I suppose. Although, I still think it's not the best option. So, here's why I initially said I both agree and disagree with you...

You are 100% correct when you say starting with the one NAND chip would be simpler.

However, I believe starting with the  two concepts of AND and NOT makes it even more intuitive, to more people in general. It gives new users a clearer picture concerning how segments of logic should fit together going forward.

There are dozens of other logic sims that tick the boxes you described, and I think this one being the way it is helps it better serve as a teaching tool.

Glad we had this talk, can't wait to show you what I'm doing with DLS! Cheers!

Developer

Yeah, your point about AND and NOT being more intuitive building blocks for people starting out was my exact reasoning for starting with those two instead of a single NAND gate in the video series. Currently I think I'd prefer to keep it this way in the app for consistency with the videos, even if NAND is more fundamental.

seems a bit trivial, but i get where you're coming from

Another option is to add an option for people to start with all the basic gates, so they don't have to be made again each time.