Jump to content

XOR Gate: Difference between revisions

From Logic World Wiki
Created page with "{{Infobox component|title=XOR gate|id=MHG.XorGate|caption=XOR gate|configurable=0|io.minInputs=2|io.maxInputs=2|io.outputs=1|io.propagationDelay=1}} The '''XOR gate''' is a basic digital logic component whose output will be {{on}} if only '''one''' of its inputs are '''ON'''. An XOR gate is 2 tiles wide and 1 tile tall, and its body is 1 tile long, but its inputs and outputs extend its area to 3 tiles. == Logic == The XOR gate's output will only be active if '''one'''..."
(No difference)

Revision as of 20:47, 7 September 2025

XOR gate

XOR gate
Component info
Internal ID MHG.XorGate
Configurable No
Input and output
Input count 2
Output count 1
Propagation delay 1 tick

The XOR gate is a basic digital logic component whose output will be ON if only one of its inputs are ON.

An XOR gate is 2 tiles wide and 1 tile tall, and its body is 1 tile long, but its inputs and outputs extend its area to 3 tiles.

Logic

The XOR gate's output will only be active if one of its inputs are ON.

XOR Gate Truth Table
Input 1 Input 2Output
000
101
011
110

Timing

A demonstration of two XOR gates being activated. The top XOR gate has one of its inputs active, but its output is not yet active because a delay of 1 tick has not yet passed. The bottom XOR gate has had one of its inputs active for at least 1 tick, and its output is therefore active.

The XOR gate has a latency of 1 tick, so in the instance when all inputs are ON, the output will become active 1 tick later. As demonstrated in the example on the right.

Configurability

The XOR gate cannot have its number of inputs changed, but can have its output position flipped by pressing 'F' on it. The bottom XOR gate in the image on the right has had its output flipped.