All Exams Test series for 1 year @ ₹349 only
Question

Which logical gate is included in a binary adder circuit to enable binary addition and subtraction?

The correct answer is

Ex - OR Gate

Understanding Binary Addition and Subtraction Circuits

Binary addition and subtraction are fundamental operations in digital electronics and computer systems. Circuits designed to perform these operations are known as adders (for addition) and subtractors (for subtraction). Often, a single circuit is designed to handle both operations, controlled by a mode selection signal.

The Role of Logic Gates in Binary Operations

Digital circuits are built using logic gates. Different logic gates perform different Boolean functions:

  • AND Gate: Output is high (1) only if all inputs are high.
  • OR Gate: Output is high (1) if at least one input is high.
  • NOT Gate (Inverter): Output is the inverse of the input.
  • XOR Gate (Exclusive-OR Gate): Output is high (1) only if inputs are different.
  • XNOR Gate (Exclusive-NOR Gate): Output is high (1) only if inputs are the same.

Binary adders (like half adders and full adders) primarily use XOR gates to calculate the 'sum' bit and AND/OR gates to calculate the 'carry' bit.

Binary Subtraction using Two's Complement

Binary subtraction is frequently implemented in digital systems by using the method of two's complement addition. To calculate A - B:

  1. Find the two's complement of B. This involves two steps:
    • Invert all the bits of B (one's complement).
    • Add 1 to the one's complement.
  2. Add A to the two's complement of B.

The result of this addition is A - B.

Enabling Both Addition and Subtraction in One Circuit

To create a circuit that can perform both A + B and A - B, a multiplexing or control mechanism is needed. A common approach is to use an XOR gate for each bit of the number B, along with a control signal (let's call it Mode, where Mode = 0 for addition and Mode = 1 for subtraction).

Consider one bit of B, say Bᵢ, passing through an XOR gate with the Mode signal:

  • Input 1 to XOR: Bᵢ
  • Input 2 to XOR: Mode
  • Output of XOR: Bᵢ $\oplus$ Mode

Let's analyze the XOR output based on the Mode signal:

  • If Mode = 0 (Addition): Output = Bᵢ $\oplus$ 0 = Bᵢ. The bit Bᵢ is passed through unchanged.
  • If Mode = 1 (Subtraction): Output = Bᵢ $\oplus$ 1 = Bᵢ'. The bit Bᵢ is inverted (one's complement).

This means the XOR gate, controlled by the Mode signal, allows the circuit to use either B (for addition) or its one's complement (for subtraction) as one of the inputs to the main adder block. To complete the two's complement subtraction, the 'add 1' step is implemented by setting the carry-in of the least significant bit adder to the Mode signal itself. If Mode=1 (subtraction), a 1 is added via the carry-in, thus completing the two's complement addition.

Therefore, the XOR gate is the key logical gate that enables the conditional inversion required to perform subtraction using the two's complement method within a circuit primarily designed for addition.

Analyzing the Options

  • Ex - OR Gate (XOR Gate): As explained above, the XOR gate is used with a control signal to conditionally invert the bits of one operand, which is essential for performing subtraction using two's complement in an adder circuit. This aligns with its function in universal adder/subtractor circuits.
  • AND Gate: AND gates are used in adders (e.g., to generate carry signals) but do not provide the conditional inversion needed to switch between addition and subtraction modes for the input operand.
  • Ex - AND Gate: This term is not standard. Assuming it refers to XNOR (Exclusive-NOR), while related to XOR, the standard implementation for conditional inversion in adder/subtractors uses the XOR gate and a mode control signal.
  • OR Gate: OR gates are used in adders (e.g., to combine carry signals) but do not provide the conditional inversion required for subtraction.

Based on the function of these gates in binary arithmetic circuits, the Ex-OR gate (XOR) is the gate specifically included to enable both addition and subtraction via conditional inversion of the input.

Gate Type Primary Function in Adders/Subtractors Enables Addition/Subtraction Switching?
XOR Gate Generates sum bit; Conditionally inverts operand for subtraction Yes (with control signal)
AND Gate Generates carry bit No
OR Gate Combines carry bits No
XNOR Gate (Ex-AND assumed) Generates inverse of XOR (equality); Could be used with inverted control logic Indirectly (less standard)

Conclusion

The logical gate included in a binary adder circuit to enable both binary addition and subtraction is the Ex-OR (XOR) gate, used in conjunction with a mode control signal.

Revision Table: Binary Adder Subtractor Logic Gates

Component Key Logic Gate(s) Purpose
Half Adder XOR, AND Adds two single binary digits, produces sum and carry.
Full Adder XOR, AND, OR Adds three single binary digits (two inputs + carry-in), produces sum and carry-out.
Parallel Adder (using Full Adders) Multiple Full Adders Adds multi-bit binary numbers.
Adder/Subtractor Circuit Full Adders, XOR Gates (on one input), Control Logic Performs A+B or A-B based on a mode signal. XOR gates conditionally invert the subtrahend for two's complement subtraction.

Additional Information: Two's Complement Subtraction

The two's complement method simplifies binary subtraction using existing adder hardware. For an n-bit number B, its two's complement is calculated as $2^n - B$. In binary arithmetic, this is equivalent to inverting all bits of B (one's complement) and then adding 1. The 'add 1' needed after inversion is often achieved by applying a carry-in of 1 to the least significant bit (LSB) full adder in the parallel adder circuit when performing subtraction. The XOR gates connected to each bit of the subtrahend (B) effectively compute the one's complement when the subtraction mode is selected (Mode=1).

Was this answer helpful?

Important Questions from Logic Gates

  1. Which logical gate is used to represent product of sum expression?

  2. Which gate is represented by the following truth table?

    Input

    Output

    A

    B

    C

    0

    0

    0

    1

    0

    0

    1

    1

    0

    1

    0

    1

    0

    1

    1

    1

    1

    0

    0

    1

    1

    0

    1

    1

    1

    1

    0

    1

    1

    1

    1

    0

  3. Which of the following represents the XNOR gate?

  4. A Circuit that operates in such a way that its output is high only when all its inputs are high

  5. ______ is also known as Inverter.

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App