|
|
|
|
|
by nnq
2562 days ago
|
|
There's a 5-valued logic usable in common everyday live, originating from some Buddhist philosophy I don't care to remember, that I actually use fine in everyday life, similar to yours. I has: - {T}: true - {F}: false - {not-T && not-F}: neither true nor false (yet, for us): eg. "unknown" or NULL (so far we're in SQL-logic territory :P, still familiar) - {T && F}: true and false at the same time: ERROR / paradox / invalid / contradiction / exception / malformed or invalid questions - {}: "ununderstandable/uncommunicable" or "cannot be put in to words", but NOT error/exception/invalid - for a software system this would be "there is a true|false|null|exception value for this but there is no direct access to this information" eg. maybe "the value is somehow stored in a physical artifact or arises as a result of an agent doing and experiencing something, but it can't be communicated as information, you'd have to pass the physical artifact to other agents for them to 'grok it', or to engineer situations where they could have a similar experience" or "you can't explain to someone 'how it is to be inlove' or 'how it is to be on drug X', they need to have the experience or access to the drug themselves' I'm not sure why pentaleans are not as natural to other people as booleans, since they seem way more intuitive to me when dealing with information for the real world... |
|
T - True F - False X - Don't care Z - High-Z, essentially "don't know" or a null input
You can apply "don't care" to inputs to a logic equation to reduce the complexity of it. If you know a certain input will never be true while other inputs are false, then you can ignore all the states where that is the case. For example, the ECU in a car will turn on a certain light on the dashboard whenever the wheels slip. The wheels can't slip when the car isn't in drive and certainly not when the car is off so the ECU can reduce the logic needed to determine when to turn on that light. Instead of (car is on AND car is in drive AND power going to wheels AND wheel is slipping THEN turn on light) you can just reduce it down to (power going to wheels AND wheel is slipping THEN turn on light). This could would also cause the light to go on if the car was off while power was going to the wheels and the wheels were slipping but we know that case is impossible (engine can't send power if it's not on).
The High-Z is more of a "don't know" kind of input or output. It is an undetermined input that is neither true or false. We still care about it since it's not a "don't care" but we have no idea what it is. You could build a circuit to react to this state or have the circuit do nothing until it becomes true or false. You can also use this as an output of a circuit.