You are on page 1of 13

DISCUSSION ABOUT SUBTRACTOR

NAME: - ARKOPROVO SARKAR

BATCH: - B

UNIVERSITY ROLL NO: - 30942723030

UNIVERSITY REGISTRATION NO: - 233091010030(2023-24)

SUBJECT: - DIGITAL ELECTRONICS(BCAC101)

STREAM: - Bachelor of Computer Applications(BCA)

SESSION: - 2023-24

SEMESTER: - 1ST

COLLEGE CODE: - 309

YEAR: - 1ST
TITLE

DESCRIBING SUBTRACTOR (HALF


SUBTRACTOR + FULL SUBTRACTOR + 4BIT
PARALLEL ADDER- SUBTRACTOR)
SUMMARY
A subtractor is a digital circuit that performs the subtraction operation. The process involves taking two binary numbers, known as the minuend and the subtrahend,
and producing the result, known as the difference. In binary subtraction, the operation is similar to decimal subtraction, with borrow propagation being a critical
aspect.

**Half Subtractor**
- A half subtractor is a basic digital circuit that performs subtraction for a single bit.
- It takes two input bits: minuend (A) and subtrahend (B).
- Outputs include the difference (DIFF) and the borrow (BORROW).
- The difference represents the result of subtracting B from A, while the borrow indicates if a borrow is needed for the next higher bit.

**Full Subtractor**
- A full subtractor is an extension of the half subtractor to handle borrow from the previous stage.
- It takes three input bits: minuend (A), subtrahend (B), and the borrow input from the previous stage (BIN).
- Outputs include the difference (DIFF) and the borrow (BORROW).
- The difference is the result of subtracting B and the borrow from A, and the borrow indicates if a borrow is needed for the next higher bit.

**4-Bit Parallel Adder-Subtractor**


- A 4-bit parallel adder-subtractor is a circuit that can perform both addition and subtraction operations on 4-bit binary numbers.
- It typically includes four full adders and additional logic for subtraction.
- The mode control input determines whether the circuit performs addition or subtraction.
- For addition, the numbers are added in parallel, and for subtraction, the two's complement method is often employed.
TABLE OF CONTENTS

• INTRODUCTION

• DIFFERENT TYPES OF SUBTRACTORS

• WHAT IS A HALF SUBTRACTOR

• WHAT IS A FULL SUBTRACTOR

• WHAT IS A 4 BIT PARALLEL ADDER SUBTRACTOR

• COMBINING HALF AND FULL SUBTRACTOR

• THE ADDER SUBTRACTOR OPERATION

• CONCLUSION
INTRODUCTION
(What is a Subtractor?)

A subtractor is a digital electronic circuit that performs the mathematical operation of subtraction. In binary arithmetic,
which is commonly used in digital systems, subtraction involves taking two binary numbers (the minuend and the
subtrahend) and producing the difference. The subtractor circuit is designed to handle this subtraction operation and often
includes additional components to account for borrow (in the case of binary subtraction) from one bit to another.

In digital systems, subtractors are essential components in arithmetic logic units (ALUs) within processors, calculators, and
other devices that perform mathematical calculations. They play a crucial role in various applications, ranging from simple
arithmetic tasks to more complex computations. The design of subtractors is based on binary arithmetic principles and logic
gates, enabling them to efficiently process binary numbers and produce accurate subtraction results.
DIFFERENT TYPES OF
SUBTRACTORS
Subtractors are digital circuits designed to perform the subtraction operation on binary numbers. There are different types of subtractors, each catering to specific needs in
digital arithmetic. Here are the main types:
**Half Subtractor**
- Designed to subtract two single bits.
- Inputs: Minuend (A), Subtrahend (B).
- Outputs: Difference (Diff), Borrow (Bout).
- The difference is the result of \(A - B\), and the borrow indicates whether borrowing is needed in the next higher bit during multi-bit subtraction.
**Full Subtractor**
- An extension of the half subtractor to handle borrow from the previous stage.
- Inputs: Minuend (A), Subtrahend (B), Borrow-in (Bin).
- Outputs: Difference (Diff), Borrow (Bout).
- The difference is the result of \(A - B - \text{Bin}\), and the borrow indicates whether borrowing is needed in the next higher bit.
**n-Bit Parallel Subtractor**
- Used for subtracting n-bit binary numbers.
- Typically implemented using multiple full subtractors or a combination of full subtractors and additional logic.
- Each stage (bit) is a full subtractor, and the borrow from one stage is carried to the next.
**Borrow Subtractor (or Borrow Look-Ahead Subtractor)**
- Designed to improve the speed of subtraction by generating borrow signals in advance.
- Uses additional logic to generate borrow signals for all stages simultaneously, eliminating the need for the borrow to ripple through the stages.
**Serial Subtractor**
- Subtracts two binary numbers bit by bit in a sequential (serial) manner.
- Typically implemented using shift registers and combinational logic.
- Useful in applications where parallel processing is not critical.
WHAT IS A HALF SUBTRACTOR?
A half subtractor is a basic digital circuit designed to perform the subtraction of two single-bit binary numbers. It's the simplest form of a subtractor and serves as the
building block for more complex subtractors, such as the full subtractor and n-bit parallel subtractor. The half subtractor takes two inputs, representing the minuend (A)
and subtrahend (B), and produces two outputs: the difference (Diff) and the borrow (Bout).

Here's a detailed explanation of a half subtractor:


**Inputs**
1. Minuend (A): The binary number from which the subtraction is performed.
2. Subtrahend (B): The binary number to be subtracted from the minuend.

**Outputs**
1. Difference (Diff): Represents the result of subtracting B from A. The output is \(A - B\).
2. Borrow (Bout): Indicates whether borrowing is required for the next higher bit during multi-bit subtraction.

**Logic Diagram**
The logic diagram of a half subtractor typically involves XOR (exclusive OR) and AND gates. The XOR gate calculates the difference, and the AND gate calculates the borrow.
The logic equations for the outputs are as follows:

\[ \text{Difference (Diff)} = A \oplus B \]

\[ \text{Borrow (Bout)} = \overline{A} \cdot B \]

Here, \(\oplus\) represents the XOR operation, \(\overline{A}\) represents the complement of A, and \(\cdot\) represents the AND operation.
WHAT IS A FULL SUBTRACTOR?
A full subtractor is an extension of the half subtractor and is designed to handle subtraction operations for multiple bits. It incorporates an additional input called the borrow
input (Bin), which represents the borrow from the previous lower bit. The full subtractor takes three inputs—minuend (A), subtrahend (B), and borrow input (Bin)—and
produces two outputs: the difference (Diff) and the borrow output (Bout).

Here's a detailed explanation of a full subtractor:

**Inputs**
1. Minuend (A): The binary number from which subtraction is performed.
2. Subtrahend (B): The binary number to be subtracted from the minuend.
3. Borrow Input (Bin): The borrow from the previous lower bit.

**Outputs**
1. Difference (Diff): Represents the result of subtracting B and Bin from A. The output is \(A - B - \text{Bin}\).
2. Borrow Output (Bout): Indicates whether borrowing is required for the next higher bit during multi-bit subtraction.

**Logic Diagram**
The logic diagram of a full subtractor includes XOR (exclusive OR), AND, and OR gates. The XOR gates calculate the differences for the two subtracted bits, and the AND and OR
gates generate the borrow output. The logic equations for the outputs are as follows:

\[ \text{Difference (Diff)} = A \oplus B \oplus \text{Bin} \]

\[ \text{Borrow (Bout)} = (\overline{A} \cdot B \cdot \overline{\text{Bin}}) + (\overline{A} \cdot B \cdot \text{Bin}) + (A \cdot \overline{B} \cdot \text{Bin}) \]

Here, \(\oplus\) represents the XOR operation, \(\overline{A}\) represents the complement of A, \(\cdot\) represents the AND operation, and \(+\) represents the OR
operation.
WHAT IS A 4-BIT PARALLEL ADDER-SUBTRACTOR
A 4-bit parallel adder-subtractor is a digital circuit that can perform both addition and subtraction operations on 4-bit binary numbers. It's an extension of the basic concepts of
addition and subtraction, combining them into a single circuit. This type of circuit is commonly used in digital processors and arithmetic units to handle both addition and
subtraction tasks.

Here's an explanation of the 4-bit parallel adder-subtractor:


**Inputs**
1. A (4-bit binary number):The minuend (for addition) or the number from which subtraction is performed.
2. B (4-bit binary number):The subtrahend (for subtraction) or the number to be added.
3. Mode Control Input (M): Determines the operation mode (0 for addition, 1 for subtraction).

**Outputs**
1. Sum (S):Represents the result of addition or subtraction.
2. Borrow (Bout):For subtraction, indicates whether borrowing occurred from the most significant bit.

**Operation**
- For addition (M = 0), the circuit performs a regular 4-bit binary addition, producing the sum.
- For subtraction (M = 1), the circuit uses two's complement arithmetic to perform the subtraction. The two's complement of the subtrahend is formed, and the addition operation
is carried out.

**Logic Diagram**
- A 4-bit parallel adder-subtractor consists of four full adders, each capable of adding two bits and a carry input.

The 4-bit parallel adder-subtractor is a fundamental component in digital arithmetic units, providing the capability to perform both addition and subtraction on 4-bit binary
numbers, which is crucial for the operation of digital processors and other digital systems.
COMBINING HALF AND FULL SUBTRACTOR

When designing a subtractor circuit for multi-bit binary numbers, a combination of half and full subtractors is often used. This approach allows for the efficient subtraction of
multi-bit binary numbers while taking into account borrow propagation.

Here's how you can combine half and full subtractors to create an n-bit parallel subtractor:
**Half Subtractor**
- The half subtractor is used for the least significant bit (LSB) of the subtraction.
- It takes two input bits (A and B) and produces the difference (Diff) and borrow (Bout).
- The output from the half subtractor is the LSB of the subtraction result.

**Full Subtractor**
- Full subtractors are used for the remaining higher-order bits of the subtraction.
- Each full subtractor takes three inputs (A, B, and the borrow from the previous stage) and produces the difference and borrow for its bit.
- The output from each full subtractor represents a higher-order bit of the subtraction result.

This combination of half and full subtractors is a common and efficient way to design parallel subtractors for multi-bit binary numbers. It ensures that borrow propagation is
considered for accurate subtraction across all bits. The structure is modular, making it easy to extend for subtractors of larger bit widths.
THE ADDER SUBTRACTOR OPERATION
An adder-subtractor is a versatile digital circuit that can perform both addition and subtraction operations on binary numbers. It combines the functionality of an adder and a
subtractor into a single circuit, allowing for flexibility in arithmetic operations. The operation of an adder-subtractor is controlled by a mode input, which determines whether the
circuit performs addition or subtraction.

Here's a brief overview of the operation of an adder-subtractor:


**Inputs**
1. A (n-bit binary number): One of the numbers involved in the operation.
2. B (n-bit binary number):The other number involved in the operation.
3. Mode Control Input (M):Determines the operation mode (0 for addition, 1 for subtraction).

**Outputs**
1. Sum (S):Represents the result of addition or subtraction.
2. Borrow (Bout):
- For subtraction (M = 1), Bout indicates whether borrowing occurred during the subtraction.
- For addition (M = 0), Bout is not relevant and can be ignored.

**Operation**
1. Addition (M = 0):
- The circuit operates as a regular binary adder.
- The sum output (S) is the result of adding A and B.

2. Subtraction (M = 1):
- The circuit performs subtraction using two's complement arithmetic.
- The two's complement of the subtrahend (B) is formed.
- The sum output (S) is the result of adding A and the two's complement of B.
- The Bout output indicates whether borrowing occurred during the subtraction.
CONCLUSION
In conclusion, a subtractor is a critical component in digital circuits, enabling the subtraction of binary numbers. The hierarchical structure of
subtractors includes basic building blocks like the half subtractor and full subtractor, which are essential for handling single-bit and multi-bit binary
subtraction. The 4-bit parallel adder-subtractor extends the functionality to perform both addition and subtraction operations on 4-bit binary numbers,
offering versatility in digital arithmetic.

**Half Subtractor**
- Performs subtraction for a single bit.
- Outputs the difference and borrow, critical for multi-bit subtraction.

**Full Subtractor**
- An extension of the half subtractor for handling borrow from the previous stage.
- Takes three inputs: minuend, subtrahend, and borrow.
- Outputs the difference and the borrow for the next higher bit.

**4-Bit Parallel Adder-Subtractor**


- Combines four full adders to perform parallel addition or subtraction on 4-bit binary numbers.
- Incorporates a mode control input to switch between addition and subtraction.
- Utilizes two's complement arithmetic for subtraction.

The synergy of these subtractor components forms the basis for designing efficient and flexible arithmetic units in digital systems. Whether it's a simple
binary subtraction or a complex operation involving multi-bit numbers, the combination of half subtractors, full subtractors, and 4-bit parallel adder-
subtractors provides a comprehensive solution for digital arithmetic. These circuits are integral to the functionality of processors, calculators, and
various digital devices where mathematical computations are essential.

You might also like