Using NodeBox to Make Working Circuitry

john's Avatar


21 Apr, 2020 06:30 PM

I made this NodeBox animation to answer a question on Quora about seven segment displays. But it's not merely a depiction of a circuit or a simulation of a circuit. It is an actual working circuit that performs these computations using color instead of electricity.

As you can see in the attached screenshot, there is a one-to-one relationship between the connected nodes on the right and the rendered circuitry on the left. Each node simply draws an element (a wire or gate). It takes other nodes as inputs and looks at the color of each input. Depending on those colors, each gate colors itself and its output wire:

  • a NOT gate colors itself the opposite color of its input drawing
  • an AND gate colors itself red if and only if all inputs are red
  • an OR gate colors itself red if any of its inputs are red
  • each segment colors itself the color of the OR gate feeding into it

The Nodebox network literally draws itself to produce the circuit diagram on the left, and uses the colors in that drawing to do the computations. The end result is a working seven segment display.

This is an intriguing technique, though not a very practical one. It was quite time-consuming connecting all the nodes and adjusting the settings to route all the wires. But it was fascinating to play with. When I clicked checkboxes in the four nodes at the top, color flowed through the whole network, doing real calculation. This is the kind of thing that would be hard to do in any other tool.


  1. Support Staff 1 Posted by Stefan Gabriels on 24 Apr, 2020 03:22 PM

    Stefan Gabriels's Avatar

    Impressive! Highly inefficient code, I can only imagine how many hours you must have worked on this, but I like how color is the guiding principle behind the circuit (it makes it feel more "electricity" like) and it's really beautiful to look at.

  2. Support Staff 2 Posted by john on 25 Apr, 2020 01:12 AM

    john's Avatar

    Thanks, Stefan!

    Yes, inefficient is an understatement. It's what I call a ponarv, a project of no apparent redeeming value. But I do think it's beautiful to look at - and kind of magical.

    In theory you could build arbitrarily complex circuitry that could do just about anything with this technique - a working calculator, a Turing machine, etc. But anyone who attempted it would probably end up in a rubber room.


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • seven_segment.gif 1.41 MB
  • circuit_screenshot.png 624 KB
  • 23.3 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

16 Jun, 2022 05:30 AM
15 Jun, 2022 06:03 AM
06 Jun, 2022 01:07 PM
02 Jun, 2022 11:58 PM
30 May, 2022 07:48 AM


24 May, 2022 06:27 PM
20 May, 2022 04:12 PM
05 May, 2022 02:25 AM
03 May, 2022 04:46 AM
01 May, 2022 09:22 AM
18 Apr, 2022 09:01 PM