Forums - Open Redstone Engineers
Logic gate formulas - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: ORE General (https://forum.openredstone.org/forum-39.html)
+--- Forum: Tutorials (https://forum.openredstone.org/forum-24.html)
+---- Forum: Advanced Tutorials (https://forum.openredstone.org/forum-26.html)
+----- Forum: Concepts (https://forum.openredstone.org/forum-28.html)
+----- Thread: Logic gate formulas (/thread-12558.html)

Pages: 1 2


RE: Logic gate formulas - Matthew - 07-08-2017

(07-08-2017, 06:49 AM)ph1234k Wrote: I am not sure how usage cases outside of the post would be relevant unless they were directly related however you could image a general purpose ALU based on 16 state logic which would be programmed to check outputs of some device (a chest that is part of a sorting machine for example) and then take action on the output (allowing a drain of the chest before filling to prevent the hopper from backing up and ruining the sorting functionality for example). In this example, yes you can do it without a computer and yes you could do it in boolean assuming you convert the output of the comparator but it is just an example. Like all logic devices, the limitations are based on how you can use the signal to interact with other hardware and your imagination.

First of all it still is a computer... i dont know what tf you are on about there... umm and also yes my point still remains doing anything like multiplication, division, or useful logical operations (boolean) require converting to binary. Except in the mult and divs case but if you don't convert it will take you hundreds of time longer to perform them.... in other words fuzzy logic in a cpu meant to do math and arithmetic is trash. idk correct me if i'm wrong.


RE: Logic gate formulas - ph1234k - 07-08-2017

No, you don't have to do any conversion to perform what you refer to as "useful operations". Remember these functions are already equivalent to the boolean functions, there is simply more states. That means you can do everything you can with 2 states, plus more.

It is quite simple to perform the exact equivalent of boolean:

Boolean example:
State 1 AND State 0 = State 0

16 state example:
State 15 AND State 0 = State 0

Actually any state would work for an and gate, however using the max state is particularly useful as boolean 1 is a max state and so the complement of the max state is the min state which also holds true in any number of states in any logic. So in 16 state, NOT 15 = 0. In 2 state, NOT 1 = 0.

The difference in the systems is that adding more states allows more accurate representation of real world concepts where everything is not "TRUE" or "FALSE" while still allowing you to use both "TRUE" and "FALSE". By no means does adding states somehow limit what you can do over systems with less states. The exact same computational power is there, again with the addition of states representing degrees of truth.

EDIT: I didn't address you concern with the word computer in my last post. I used the word computer in reference to a general purpose computer or ALU as was provided in context there. No you do not need one of these devices to perform the example, you connect a comparator to the chest to pull the signal, then place a repeater at the level you want to unload at as your decoder to binary (or wire it so that the level would trigger or subtract from it with another comparator to only output from there when the signal surpasses the threshold and so on), connect that to an inverter which powers the hopper that empties the chest. The point there was that for any application in which a general purpose computer can be made to do, there is always the ability to do it with a specialized circuit which would be more compact and faster. I was simply acknowledging this fact.


RE: Logic gate formulas - Matthew - 07-09-2017

(07-08-2017, 07:18 PM)ph1234k Wrote: No, you don't have to do any conversion to perform what you refer to as "useful operations". Remember these functions are already equivalent to the boolean functions, there is simply more states. That means you can do everything you can with 2 states, plus more.

It is quite simple to perform the exact equivalent of boolean:

Boolean example:
State 1 AND State 0 = State 0

16 state example:
State 15 AND State 0 = State 0

Actually any state would work for an and gate, however using the max state is particularly useful as boolean 1 is a max state and so the complement of the max state is the min state which also holds true in any number of states in any logic. So in 16 state, NOT 15 = 0. In 2 state, NOT 1 = 0.

The difference in the systems is that adding more states allows more accurate representation of real world concepts where everything is not "TRUE" or "FALSE" while still allowing you to use both "TRUE" and "FALSE". By no means does adding states somehow limit what you can do over systems with less states. The exact same computational power is there, again with the addition of states representing degrees of truth.

EDIT: I didn't address you concern with the word computer in my last post. I used the word computer in reference to a general purpose computer or ALU as was provided in context there. No you do not need one of these devices to perform the example, you connect a comparator to the chest to pull the signal, then place a repeater at the level you want to unload at as your decoder to binary (or wire it so that the level would trigger or subtract from it with another comparator to only output from there when the signal surpasses the threshold and so on), connect that to an inverter which powers the hopper that empties the chest. The point there was that for any application in which a general purpose computer can be made to do, there is always the ability to do it with a specialized circuit which would be more compact and faster. I was simply acknowledging this fact.
Everything you're saying is correct... but when it comes to simple arithmetic fuzzy logic is horrible. If we where doing probability calculations or something along those lines its super useful... but the thing is no one is lol... Pretty much everyone builds basic cpus that perform simple arithmetic. Assuming that's what you want to build, fuzzy logic is not the right choice to handle the job. Edit (assuming the fuzzy logic is higher than 2 states)

*mic drop


RE: Logic gate formulas - Matthew - 07-09-2017

(07-08-2017, 07:18 PM)ph1234k Wrote: Remember these functions are already equivalent to the boolean functions, there is simply more states.

Boolean (bit-wise) - 8 AND 1 = 0

Fuzzy (16 state) - 8 AND 1 = 8

suuuurrrreeee......  "equivalent"

its only equivalent when you limit the fuzzy logic to 2 states lol


RE: Logic gate formulas - Matthew - 07-09-2017

In other words hex signal strength arithmetic in redstone is crap. like... really super poopy crap


RE: Logic gate formulas - ph1234k - 07-11-2017

I hope you don't take this the wrong way, but I do not think you have any idea what you are talking about (EDIT: I mean when it comes to fuzzy logic and how to represent binary numbers for arithmetic in logic systems. I don't really mean "no idea" as you have at least some decent understanding of boolean logic).

" but when it comes to simple arithmetic fuzzy logic is horrible."

In what way do you think this could possibly be true? Exactly what part of it seems horrible to you? Please be specific and do not continue making general statements that hold no information about what you are implying.

"If we where doing probability calculations or something along those lines its super useful"

That is just incorrect, while fuzzy logic deals with uncertainties, those uncertainties are not the same as probability.
A probability deals with likelihood, chances that something may happen while fuzzy logic deals with degrees of truth.
In probability, if you were presented with "This chest has a 0.7 probability of being full" we mean that there is a chance that the chest is full or not. I  fuzzy logic, if you are presented with "This chest is 0.7 full" it means that the chest is full by some definition of full. This contrasts deeply with probability where an event's occurrence is uncertain as the only thing that is uncertain is the definition of "full".

"""
Boolean (bit-wise) - 8 AND 1 = 0

Fuzzy (16 state) - 8 AND 1 = 8

suuuurrrreeee......  "equivalent"

its only equivalent when you limit the fuzzy logic to 2 states lol
"""

This is also incorrect. You do not seem to understand what you are representing. There is either one of two possibilities:
1. We are dealing with a single bit(line of redstone indicating a binary signal)
That means your example should be:
Boolean: 1 AND 1 = 1 (A signal strength of 8 in a boolean system is just "ON" or "1")
16 state: 8 AND 1 = 1 (An incorrect way to represent a binary number in 16 state, however in this case it still works as the line is "ON", correctly it should be 15 AND 15 = 15 as you must be able to invert to 0 when dealing with binary)
When you hook these up to a lamp for example, you will see that the lamp turns on in both cases.

2. We are dealing with 4 bits(lines of redstone indicating a binary signal where you are for some reason denoting numerals in decimal while working with binary)
This means your example should be:
Boolean: 1/0/0/0 AND 0/0/0/1 = 0/0/0/0
16 state: 15/0/0/0 AND 0/0/0/15 = 0/0/0/0 (or even with the incorrect representation of state 8 8/0/0/0 AND 0/0/0/8 = 0/0/0/0)
If you hook these to four lamps for example, you will see that none of the lamps turn on.

Binary and boolean are not the same. Boolean is logic dealing with 2 states, binary is a number system which you can represent with absolutely anything that has at least 2 different symbols/states for representation. I am assuming that you were attempting number 2 in this case, sending the binary representation of the decimal number "8" through for a bitwise AND operation. Bitwise implies you are operating on bits (meaning binary digits, not boolean digits), you still have to correctly represent the numbers you are dealing with, no matter what the state limit of the used logic system is.

"In other words hex signal strength arithmetic in redstone is crap. like... really super poopy crap"
Back to my question of "How is it crap?", hoping that you actually explain what your issue with it is.


RE: Logic gate formulas - Splavacado100 - 07-11-2017

(07-09-2017, 10:02 AM)Matthew Wrote:
(07-08-2017, 07:18 PM)ph1234k Wrote: Remember these functions are already equivalent to the boolean functions, there is simply more states.

Boolean (bit-wise) - 8 AND 1 = 0

Fuzzy (16 state) - 8 AND 1 = 8

suuuurrrreeee......  "equivalent"

its only equivalent when you limit the fuzzy logic to 2 states lol

By the way, hexnary and of (8,1) is 1, not 8. Get your facts straight before you argue.

Also ph1234k, matthew was talking about the different answers you get with bitwise binary and 1 digit hexnary, ie:

Bitwise:
8 AND 1 = 1000 AND 0001 = 0000 = 0

Hexnary:
8 AND 1 = min(8, 1) = 1

tldr: 4 bits of bitwise binary are not 1 digit of hexnary.