Binary calculator

hardware

Binary calculator

This is something I wanted to create while reading Code by Charles Petzold (great book).

In essence, you can input 2 unsigned 8-bit numbers and add them up. It’s very simple, but it does look cool, and like my friend Tyson said, Minecraft has a very limited programming space.

the wage cage

one of the logic gates

left: diagram for a 2-bit adder. right: arrangement of two 2-bit adders, turning into a 3-bit adder.

Problems

I tried some different mechanisms for transmitting the information back because repeaters are extremely slow, but I couldn’t figure out anything better (let me know if you have suggestions).

Also, each bit display has a different amount of repeaters, so changes are not displayed all at once. It’s analogous to disabling VSync and having very noticeable screen tearing.

area that needs improvement

Future

I don’t remember why I hadn’t come up with a better solution for the problem above, but unfortunately I lost this file after nuking my computer storage, so I can’t just hop back on and edit it. It’s very simple so it could be remade in a couple hours.

I would certainly like to upgrade it with more operations, and a decimal number display.


In conclusion, I would say that this, along with the book, was a hands-on way to appreciate how complex systems can arise from simple things. It’s not surprising that we could create computers with crabs, water, or Terraria, with enough effort and insanity.