Binary Clock - dec_to_bin Node

john's Avatar

john

09 Mar, 2022 01:21 AM

Attached is a quick, simple binary clock face. Years ago I used to sell this design as a working analog clock. I still have one hanging in my living room.

I actually made it to demo my latest node: dec_to_bin. Dec_to_bin turns a base 10 number into a binary number (up to 32 binary digits). I already have a general purpose base converting node in my Cartan Node Library (convert_base), but it requires an external code library. Dec_to_bin functions entirely within Nodebox - no batteries required.

Converting to binary is surprisingly hard to do in Nodebox because it basically requires recursion - which Nodebox does not do. I got around this by constructing a chain of identical subnetworks that feed into each other, one for each possible digit required. That's why there's a limit of 32 digits: my chain is 32 nodes long. But if you need more just copy paste that chain to double its length: Voila! 64 digits (or as many as you need). I think for most uses, though, 32 will be plenty.

Binary numbers are surprisingly useful. They are quite beautiful converted to colored squares or circles (or in this case wedges) and can be used for many purposes in combinatorics, etc.

The yin yang symbol, by the way, is the solution to my earlier Yin Yang challenge: a yin yang symbol made from scratch with only seven nodes.

Dec_to_bin will be included in the next version of my Cartan Node Library, COMING SOON!

Enjoy!

John

  1. 1 Posted by joe.s.clay on 09 Mar, 2022 03:05 PM

    joe.s.clay's Avatar

    Cool. I don't have any uses for this currently, but I'll keep it in mind. I've been busy, but this is my notice that I'm still here!

  2. Support Staff 2 Posted by john on 09 Mar, 2022 08:57 PM

    john's Avatar

    Thanks, Joe. MUCH appreciated!

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • binary_clock_screenshot.png 623 KB
  • binary_clock.ndbx.zip 9.72 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

Generic

? 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

14 Mar, 2025 08:32 AM
10 Mar, 2025 06:36 PM
10 Mar, 2025 06:36 PM
10 Mar, 2025 06:36 PM
10 Mar, 2025 12:30 AM

 

02 Mar, 2025 12:34 AM
01 Mar, 2025 12:27 AM
24 Feb, 2025 11:24 PM
24 Feb, 2025 08:19 AM
24 Feb, 2025 01:07 AM
23 Feb, 2025 11:42 PM