Skip to content

Compound Gates: XOR and the Half Adder

You've built AND, OR, and NOT from transistors. Now you'll build gates out of those gates — and then wire them into something that actually does arithmetic: a circuit that adds.


Overview

You'll build your first compound gate, the XOR gate, from parts you've already made, then use it to build a half adder — a circuit that adds two bits.

Before you start

Open Antares with your MyNOT, MyAND, and MyOR gates available.

You've got it when…

  • MyXOR outputs 1 only when exactly one input is 1.
  • Your half adder produces the correct SUM and CARRY for every input.
  • You've completed the XOR and half-adder truth tables.

Collaboration & AI

Work: On your own. Compare results with a neighbor to check, but wire your own circuits.

AI — AIAS Level 1, No AI: Reason through how the gates combine yourself. What the levels mean.


A Compound Gate: XOR

A compound gate is a logic gate built from gates you've already made. The XOR ("eXclusive OR") gate works like an OR gate, with one difference:

  • OR gate: output is 1 if A is 1, B is 1, or both are 1.
  • XOR gate: output is 1 only if exactly one input is 1 — not both.

First, complete the truth table for XOR based on that description.

MyXOR

A B O

Now build it in Antares.

  1. Create a new circuit named MyXOR.
  2. Add these components:
    1. Two of your MyNOT gates.
    2. Two of your MyAND gates.
    3. One of your MyOR gates.
    4. Two Circuit Inputs from the Input folder.
    5. One Circuit Output from the Output folder.
  3. Rename the two Circuit Inputs A and B.
  4. Arrange and connect the components as shown below.
  5. Test it in simulation mode. Does it match your truth table?

The MyXOR circuit built from two NOT gates, two AND gates, and one OR gate.


The Half Adder

A half adder adds two single binary digits (bits).

  • Inputs: two bits, A and B.
  • Outputs:
    • Sum — the result of adding the bits (like regular addition without carrying).
    • Carry — 1 if both inputs are 1 (the sum "carries" to the next column).

It's called a half adder because it can't accept a carry in from a previous addition — only the two bits you give it. Remember binary addition: add A + B for the SUM column, and if the result needs to carry, put a 1 in the CARRY column.

Half Adder

A B SUM CARRY

To build the half adder:

  1. Create a new circuit named HA.
  2. Add these components:
    1. One MyXOR gate.
    2. Two Circuit Inputs from the Input folder.
    3. One Circuit Output from the Output folder.
  3. Rename the two Circuit Inputs A and B.
  4. Rename the Circuit Output SUM.
  5. Arrange and connect the components as shown below.
  6. Test it in simulation mode. Does it match the SUM column?

A half adder with a MyXOR gate producing SUM from inputs A and B.

If it's wired correctly, SUM is the correct result of A + B. Now we need to carry a bit out when A and B are both 1 (because binary 1 + 1 = 10 — "zero, carry the one"). Add a few more components:

  1. Add these components:
    1. One MyAND gate.
    2. One Circuit Output from the Output folder.
  2. Rename the added Circuit Output CARRY.
  3. Arrange and connect the components as shown below.
  4. Test it. Does it match both the SUM and CARRY columns?

The complete half adder: MyXOR drives SUM and MyAND drives CARRY.


Turn It In

  • Your completed XOR and half-adder truth tables (in your notebook).
  • A screenshot of each new circuit, MyXOR and HA.

How It's Graded

This lab is worth up to 4 points. One score covers everything you turn in.

Score What it looks like
4 — Excellent MyXOR and HA are both built from your own gates and verified in simulation against complete, correct truth tables — SUM and CARRY right for all four input combinations.
3 — Above Average Both circuits work, with a minor slip — one wrong truth-table row, or a table filled in after testing rather than predicted first.
2 — Average MyXOR works but the half adder doesn't (or is missing its CARRY half), or the circuits work but a truth table is missing or substantially wrong.
1 — Below Average Neither circuit matches its truth table, or screenshots and tables are largely missing.
0 — Failing Nothing turned in, or no evidence of either circuit.