XOR Block
Logical XOR gate - output is 1 if inputs are different
Open XOR in BlockWerk →# XOR Gate Block
Overview
The XOR (Exclusive OR) gate outputs 1 when an ODD number of inputs are true.
Truth Table (2 inputs)
| Input 1 | Input 2 | Output | | ------- | ------- | ------ | | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 |
Truth Table (3 inputs)
| A | B | C | Output | | --- | --- | --- | ------ | | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 1 | | 0 | 1 | 0 | 1 | | 0 | 1 | 1 | 0 | | 1 | 0 | 0 | 1 | | 1 | 0 | 1 | 0 | | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 |
Parameters
Number of Inputs
Number of inputs to the XOR gate (2-10).
Default: 2
Logic
- Inputs >= 0.5 are TRUE
- Inputs < 0.5 are FALSE
- Output = 1 if ODD number of inputs are TRUE, else 0
Key Property
- 2 inputs: True when inputs differ (half-adder)
- 3+ inputs: Parity check (true if odd parity)
Typical Applications
- Parity checking (error detection)
- Bit-by-bit comparison
- Toggle signals (alternate between states)
- Conditional switching based on odd/even counts
- Adder circuits (half-adder and full-adder)
See Also
- AND: All inputs true → output true
- OR: Any input true → output true
- NOT: Inverts input