There are two basic types of logic circuitry: combinational circuitry and state circuitry.

• Combinational circuitry behaves like a simple function. The output of combinational circuitry depends only on the current values of its input.
• State circuitry behaves more like an object method. The output of state circuitry does not just depend on its inputs — it also depends on the past history of its inputs. In other words, the circuitry has memory.

This is much like an object method whose value is dependent on the object's state: its instance variables.

#### Logic Circuits

Logic circuits use two different values of a physical quantity, usually voltage, to represent the boolean values true (or 1) and false (or 0). Logic circuits can have inputs and they have one or more outputs that are, at least partially, dependent on their inputs. In logic circuit diagrams, connections from one circuit's output to another circuit's input are often shown with an arrowhead at the input end.

In terms of their behavior, logic circuits are much like programming language functions or methods. Their inputs are analogous to function parameters and their outputs are analogous to function returned values. However, a logic circuit can have multiple outputs.

There are two basic types of logic circuitry: combinational circuitry and state circuitry.

• Combinational circuitry behaves like a simple function. The output of combinational circuitry depends only on the current values of its input.
• State circuitry behaves more like an object method. The output of state circuitry does not just depend on its inputs — it also depends on the past history of its inputs. In other words, the circuitry has memory.

This is much like an object method whose value is dependent on the object's state: its instance variables.

These two types of circuitry work together to make up a processor datapath.

#### State Circuitry

The output of state circuitry does not just depend on its input — it also depends on the past history of its inputs. In other words, the circuitry has memory.

State circuitry includes anything that can "remember" bits of information. This includes memory, registers, and the program counter.

The basic element of state circuitry is a flip-flop. A flip-flop stores one bit of data. Multiple flip-flops can be combined to form a multi-bit state element called a register. Multiple registers can be combined into a register bank.