Binary to Gray in Minecraft (logic Circuits)

by EnigmaF in Living > Video Games

1350 Views, 2 Favorites, 0 Comments

Binary to Gray in Minecraft (logic Circuits)

2016-07-10_15.16.54.png

We'll be using 'AND' and 'OR' logic gates for construction of our converter, but first we must introduce ourselves with Gray's code, Boolean algebra, Karnaugh's map and etc.

Gray's Code

Gray Code.jpg
max-bb-02.gif
symtab.gif
IMG_20160710_161113.jpg

Gray's code can be easily calculated with formula n 'XOR' (n / 2).

-n is the current number.

For example: binary: 0110 (6 dec.) devided by 2 is 0011 (3 dec.), then we compare bit by bit with 'XOR' table and we end up with 0101 (Gray).

Tables in the second picture represent basic Boolean algebra, which we will use in the designing of our gates.

As a first step we will assign names to our ins and outs. We have 4 bits both in binary numbers and in Gray's numbers, so we assign (like in the third picture) 'D' 'C' 'B' 'A' for binary inputs and 'Z' 'X' 'Y' 'W' for outputs (Gray's).

We can clearly see that input 'D' is equal to the output 'Z', which means that we solved our first output.

Karnaugh's Map and Other Three Outputs

IMG_20160710_171744.jpg
IMG_20160710_172153.jpg

For next three outputs we must use Karnaugh's map, while it would take quite some time to explain Karnaugh's map, i'll just leave a link about it (anyways, if you have any questions about it, just ask):

1: https://www.utdallas.edu/~dodge/EE2310/lec5.pdf

2: https://en.wikipedia.org/wiki/Karnaugh_map

In the first map we will be solving 'X' column, in the second 'Y' column and in the last 'W' column (which means that we take '1' from 'X' column (for example) and lets say that this '1' is from row '3' (not third, because third would be '2') and then we write it in the 'X' map, field '3').

Logic Gates

Untitled.png

Following those equations we got from Karnaugh's maps, we come to the next part, drawing scheme. Basically you follow equations an follow simple rules of Boolean algebra, such as '*' is 'AND' and '+' is 'OR'.

Again, if you have any questions about drawing this, feel free to ask.

*sorry for doing this in paint, i don't have any other software for this things.

Implementing to Minecraft

2016-07-10_23.28.20.png
2016-07-10_15.15.10.png
2016-07-10_15.15.18.png
2016-07-10_15.15.32.png
2016-07-10_15.15.48.png
2016-07-10_15.15.59.png
2016-07-10_15.16.54.png

In the following order:

1. Inverter / NOT

2. AND

3. OR

Now that we now how to make these gates in Minecraft, we can start implementing everything from the scheme that we made previously. And that's it, this converter works with levers, when it's on it counts as 1 and when it's off as 0.

Input binary numbers and see on the other side if you got it right :)