kids encyclopedia robot

XOR gate facts for kids

Kids Encyclopedia Facts

An XOR gate (which stands for Exclusive OR) is a special kind of logic gate. Think of a logic gate as a tiny electronic switch. It takes one or more inputs and gives out one output. For an XOR gate, its output is 'on' (which we call 1 or true) only when its inputs are different. If both inputs are the same, its output is 'off' (which we call 0 or false).

This gate is very useful in computers and electronics. It helps them make decisions based on different signals. The XOR gate performs what is known as an exclusive disjunction in logic.

How an XOR Gate Works

An XOR gate has two inputs, usually called A and B. It gives one output. The output is 'true' (1) only if one of the inputs is 'true' (1) and the other is 'false' (0). If both inputs are 'true' (1) or both are 'false' (0), then the output will be 'false' (0).

This is often shown in a table called a "truth table." It lists all possible inputs and what the output will be.

INPUT OUTPUT
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0

In this table:

  • '0' means the input or output is 'off' or 'false'.
  • '1' means the input or output is 'on' or 'true'.

Let's look at the rows:

  • If A is 0 and B is 0, the output is 0 (inputs are the same).
  • If A is 0 and B is 1, the output is 1 (inputs are different).
  • If A is 1 and B is 0, the output is 1 (inputs are different).
  • If A is 1 and B is 1, the output is 0 (inputs are the same).

Symbols for XOR Gates

Engineers and scientists use special symbols to draw logic gates in circuit diagrams. There are a few different symbols for the XOR gate, but they all mean the same thing.

XOR ANSI Labelled
MIL/ANSI Symbol
XOR IEC
IEC Symbol
XOR DIN
DIN Symbol
  • The MIL/ANSI Symbol is commonly used in the United States.
  • The IEC Symbol is used internationally, following standards from the International Electrotechnical Commission.
  • The DIN Symbol is a German standard symbol.

No matter which symbol is used, they all represent the same XOR logic function.


Images for kids

See also

Kids robot.svg In Spanish: Puerta XOR para niños

kids search engine
XOR gate Facts for Kids. Kiddle Encyclopedia.