Adder-Subtractor Builder

← Back to Unit 3

Description

Explore how a single circuit can perform both addition and subtraction by using XOR gates to conditionally complement the B input and using the mode bit as carry-in.

Learning Objectives

Bloom Level: Create (L6)

After using this MicroSim, students will be able to:

  • Design an adder-subtractor circuit
  • Explain how two's complement enables subtraction
  • Apply the principle of controlled inversion

Key Concepts

Addition Mode (M=0)

  • B passes through XOR unchanged
  • Carry-in = 0
  • Result = A + B

Subtraction Mode (M=1)

  • B is inverted by XOR (one's complement)
  • Carry-in = 1 (completes two's complement)
  • Result = A + B' + 1 = A - B

How to Use

  1. Select Addition or Subtraction mode
  2. Adjust A and B values with sliders
  3. Observe how the circuit adapts
  4. Note the XOR gate behavior changes

References