ordermind/logic-gates

Provides classes for logic gates such as AND and OR

1.3.0 2020-10-04 07:05 UTC

This package is auto-updated.

Last update: 2024-04-04 15:29:33 UTC


README

68747470733a2f2f7472617669732d63692e6f72672f6f726465726d696e642f6c6f6769632d67617465732d7068702e7376673f6272616e63683d6d6173746572

logic-gates

This is a generic library that provides logic gates for use by other libraries. It is possible to use the output value of one gate as an input value to another, and thus nesting the gates indefinitely.

Currently supported gates:

Note about the XOR gate

If the number of input values for the XOR gate is greater than 2, it behaves as a cascade of 2-input gates and performs an odd-parity function. In effect that means that the output of the XOR gate is true if the number of true input values is odd, otherwise the output is false.