# combinatorial logic

Combinatorial logic is a concept in which two or more input states define one or more output states, where the resulting state or states are related by defined rules that are independent of previous states. Each of the inputs and output(s) can attain either of two states: logic 0 (low) or logic 1 (high). A common example is a simple logic gate .

In combinatorial logic, the output is a function of the input at a specific time. An example is the AND gate. Suppose an AND gate has two inputs, X and Y, and one output, Z. The AND operation is symbolized by an asterisk (*). The operation of the two-input AND gate can be represented by the following truth table:

X | Y | X * Y |

1 | ||

1 | ||

1 | 1 | 1 |

The output of this logic gate is high if and only if both inputs are high. If either or both of the inputs are low, the output is low. If the states of the inputs change periodically, the output always obeys the rules depicted in the above truth table. The current state of the device is not affected by preceding states. This contrasts combinatorial logic with sequential logic , in which the current state of the device is affected by previous states.

Logic gates are one of several types of devices that use combinatorial logic. Other forms include encoders, decoders, multiplexer s, comparators, and latches.