Binary Extractor / Binary Subtractor

In today's article, we will discuss Binary Extractor / Binary Subtractor. If you watch this series from the beginning, you will be much more comfortable with the subject.

As the name suggests, a binary extractor is a decision-making circuit that subtracts two binary numbers from each other, for example, X – Y, to find the difference between two numbers.

From our Math courses at school, we learned that the Minus sign "–" is used for one extraction calculation, and when one number is subtracted from another, a loan must be taken if the lower limit is greater than the reduced number. Consider simple extraction of the following two de tennies (base 10) numbers.

Binary Extractor
Sample Subtraction Process

Removing one binary number from another is exactly the same idea as to subtract two de degers, but large binary numbers that need to be subtracted from each other are therefore represented in terms of "0s" and "1s".

Binary Subtraction

Binary subtraction can be in many ways, but the extraction rules are the same no matter which operation you use. Because there are only two digits in binary notation, removing "0" or "1" from "0" leaves the result unchanged from 0-0 = 0 and 1-0 = 1. Removal of "1" from "1" results in "0", but removing "0" to "1" requires a debt.

Binary Removal of Two Bits

Binary Extractor
Binary Removal of Two Bits

2-Entrance Ex-OR Door

Binary Extractor
2-Entrance Ex-OR Door

As with the Binary Collector, the difference between the two digits is only one "1" when these two entries are not equal as given by the Ex-OR expression. However, we need an additional output to produce the debt bit on entries x = 0 and Y = 1. Unfortunately, there is no standard logic gate to produce an output for this special combination of X and Y inputs.

Binary Extractor

Semi-Extractor Circuit

A half extractor is a logical circuit that performs one subtraction in two binary digits. The half extractor produces some debt bits for the next stage.

Binary Extractor
Half extractor with borrowing
Binary Extractor

From the accuracy table of the half extractor, we can see that the output of the difference (D) is the result of the Exclusive-OR door and the result of the Borrow-out (Bout) NOT-and combination. Then the Boolean expression for the half extractor is as follows.

Binary Extractor

If we compare the Boolean expressions of the half extractor with the half collector, we can see that the two expressions for the total (collector) and the difference (collector) are exactly the same, and therefore should be due to the Ex-OR door function.

One of the biggest drawbacks of the half-extractor circuit when used as a binary extractor is that there is no provision for "borrowing" from the previous circuit when removing multiple data bits from each other. Next, we need to produce what is called the "full binary extractor" circuit to take into account this loan entry from a previous circuit.

A Complete Binary Extractor Circuit

The main difference between the full extractor and the previous half-extractor circuit is that a full extractor has three inputs. Two single-bit data entries x (minuend) and y (subtrahend) are the same as before. As shown below, there is an additional debit entry (B-in) to receive the debt generated by the removal from a previous stage.

Full Extractor Block Diagram

Binary Extractor
Full Extractor Block Diagram

The combination circuit of the "full extractor" then performs the extraction process on three binary bits, which produce outputs for the difference between D and B-out. Just like the dual collector circuit, the full extractor can be considered as two interconnected semi-extractors, transferring the first half extractor debt to the second-half extractor as follows.

Binary Extractor
Full Extractor Accuracy Table