Logic Gates II
Before doing the logic gates, if the 4-bit’s first and third, or second and fourth digits match, replace each digit in 4-bit with the NOT equivalent.
Write down the 30-digit number like in hexOS. It is split into 2 sequences, with the screen cycling 3 digits of α, then 3 digits of β, then 3 digits of α, and so on until it reaches the space.
Make a sequence called γ. Nth digit of γ matches the digit in Nth position of α, if N is odd, or β, if N is even.
Go through each digit in γ from left-to-right and follow all conditions in order. The symbol can be replaced more than once.
- If the difference of the current α & β digits is 5, replace γ’s symbol with =.
- If the current and previous α digits match, replace γ’s symbol with +.
- If the current and previous β digits match, replace γ’s symbol with *.
- If the current and previous γ symbols/numbers match, replace γ’s symbol with >.
Use the logic gate with matching symbols to the current γ symbol. The first 2 digits in 4-bit is the pair.
Take the result, call it an operand, and append it as the last digit in 4-bit, removing the first digit.
If now the second and last digits of the 4-bit are the same, change the newly added digit (operand) to the smallest number not present in 4-bit if NOT was applied on 4-bit before, and biggest otherwise.
Obtain a digit from applying the operand to the α and β digits whose position matches the current γ position.
Record only the rightmost digit. Concatenate each digit to a sequence called δ.
| NOT |
| IN |
OUT |
| 0 |
4 |
| 1 |
3 |
| 2 |
2 |
| 3 |
1 |
| 4 |
0 |
| IN |
OUT |
| # |
Operand |
| IN |
OUT |
| 0 |
α*β |
| 1 |
abs(α-β) |
| 2 |
α+β |
| 3 |
min(α,β) |
| 4 |
max(α,β) |
| IN |
OUT |
| AND (0) |
| LR |
0 |
1 |
2 |
3 |
4 |
| 0 |
0 |
0 |
0 |
0 |
0 |
| 1 |
0 |
1 |
1 |
1 |
1 |
| 2 |
0 |
1 |
2 |
2 |
2 |
| 3 |
0 |
1 |
2 |
3 |
3 |
| 4 |
0 |
1 |
2 |
3 |
4 |
| OR (1) |
| LR |
0 |
1 |
2 |
3 |
4 |
| 0 |
0 |
1 |
2 |
3 |
4 |
| 1 |
1 |
1 |
2 |
3 |
4 |
| 2 |
2 |
2 |
2 |
3 |
4 |
| 3 |
3 |
3 |
3 |
3 |
4 |
| 4 |
4 |
4 |
4 |
4 |
4 |