
Show HN: Wired Logic – a pixel-based logic simulator - mkirsche
https://github.com/martinkirsche/wired-logic
======
blackguardx
If you like this, you will love: [http://www.zachtronics.com/kohctpyktop-
engineer-of-the-peopl...](http://www.zachtronics.com/kohctpyktop-engineer-of-
the-people/)

an IC design game set in Soviet Russia.

~~~
userbinator
That was interesting. I'd love to see a CMOS version.

------
pokpokpok
Awesome! have a gif of a working calculator? Reminds me of the way that people
would build digital electronics in the 'powder-toy' genre of games. Was that
an inspiration for this project?

~~~
jayrhynas
Looks similar to Wireworld[1], although the rules are different

1:
[https://en.wikipedia.org/wiki/Wireworld](https://en.wikipedia.org/wiki/Wireworld)

~~~
mkirsche
Yeah, this was indeed inspired by Wireworld and its frustrating timing
constraints.

~~~
hidroto
why did you choose the number 6 for maxCharge?

~~~
mkirsche
The larger the number the slower the simulation will run. But a numer that is
too low will force you to include repeaters everywhere. So 6 seamed to be
reasonable.

------
zhemao
Now all we need is a Verilog to GIF compiler.

------
userbinator
The part about crossing wires creating a transistor is actually conceptually
very similar to what real IC layouts look like, although in the latter there
are multiple layers and only the bottom two - polysilicon and diffusion -
interact to create transistors:

[http://wiki.nesdev.com/w/index.php/Visual_circuit_tutorial](http://wiki.nesdev.com/w/index.php/Visual_circuit_tutorial)

------
DonHopkins
Reminds me of John von Neumann's 29 state cellular automata [1], which he used
to build a universal constructor [2], but that historic rule made it much
harder to cross signals. (You could easily modify the rule to make that
easier, but then it wouldn't be historically accurate, which is what makes it
so interesting: he designed the rule and the universal constructor in his
extremely powerful mind and on ordinary paper!) It's able to create and
destroy wires, to the extent that it can actually build other machines and
even replicate itself.

[1]
[https://en.wikipedia.org/wiki/Von_Neumann_cellular_automaton](https://en.wikipedia.org/wiki/Von_Neumann_cellular_automaton)

[2]
[https://en.wikipedia.org/wiki/Von_Neumann_universal_construc...](https://en.wikipedia.org/wiki/Von_Neumann_universal_constructor)

------
archagon
This is fantastic! Would be great to get it running in canvas.

~~~
mkirsche
you can now draw your own circuit at [http://martinkirsche.github.com/wired-
logic/](http://martinkirsche.github.com/wired-logic/)

------
to3m
Reminds me a bit of this:
[https://en.wikipedia.org/wiki/Wireworld](https://en.wikipedia.org/wiki/Wireworld)

------
emersonrsantos
Very cool. It reminds redstone circuits from Minecraft.

------
justifier
building simulations is the strength of computation assisted intuition

