Re:HexLogic – Logic gates in a hexagon grid
by sgentle on Monday October 06, 2014 @03:24AM
(#8414668)
Here's my attempt using the "ring of xor" technique posted elsewhere: https://imgur.com/xGHmN9c
It follows the hex structure of the other gates (inputs down and diagonally up, outputs up and diagonally down). It's got a radius 4 (the 5th blocks being the example inputs and outputs) but I think you could probably do better with some judicious bit trickery in the middle.
Edit: Radius 3: https://i.imgur.com/BaI6YLj - I wonder if 2 is possible?
For those who are rusty on boolean algebra or just curious:
not A = A xor true
A and B = ((A xor true) or (B xor true)) xor 1