Вы находитесь на странице: 1из 11

Subtractor

1
Outline

 Binary Subtraction

 Types of Subtractor

 Half Subtractor

 Full Subtractor

 Binary Adder-Subtractor

2
Binary Subtraction

The arithmetic operation, subtraction of two binary digits has four possible
elementary operations, namely,
0-0=0
0-1=1 (with 1 borrow)
1-0=1
1-1=0

3
Subtractor is the one which used to subtract
two binary number and provides Difference and
Borrow as output.

4
Types of Subtractor

There are two types of Subtractor –

1. Half Subtractor

2. Full Subtractor

5
Half Subtractor
Half Subtractor :Half Subtractor is used for subtracting one single bit binary
number from another single bit binary number(in general, subtraction of 2
bits). The truth table of Half Subtractor is shown below.
Half Subtractor Truth Table
Like Adders, here also equation of
Input Output
X Y Difference (D) Borrow (B) Difference and Borrow is calculated
0 0 0 0
Difference (D) = X'Y+XY'=X Y
0 1 1 1
1 0 1 0 Borrow (B) = X'Y
1 1 0 0
6
Half Subtractor block and logic diagram
X

Y X Y
X D
Half
Y Subtractor B

X′Y

7
Full Subtractor
A logic Circuit Which is used for Subtracting Three Single bit Binary numbers is

known as Full Subtractor.

8
Full Subtractor Truth Table SOP Form
Inputs Outputs D (X, Y, Z) = ∑(1, 2, 4, 7)
X Y Z D B
D = X´Y´Z+X´YZ´+XY´Z´+XYZ
0 0 0 0 0
0 0 1 1 1 = X´(Y´Z+YZ´)+X(Y´Z´+YZ) Circuit Diagram
0 1 0 1 1
= X´(Y⊕Z)+X(Y⊕Z)´ z
0 1 1 0 1
= X⊕Y⊕Z y D
1 0 0 1 0
1 0 1 0 0 x
B
1 1 0 0 0
B (X, Y, Z) = ∑(1, 2, 3, 7)
1 1 1 1 1
B = X´Y´Z+X´YZ´+X´YZ+XYZ
= X´(Y´Z+YZ´)+YZ(X´+X)
= X´(Y⊕Z)+YZ

9
Binary Adder-Subtractor
B3 A3 B2 A2 B1 A1 B0 A0

C3 C2 C1 C0
FA FA FA FA

C4 S3 S2 S1 S0

Figure: 4-bit Adder-Subtractor

10
Binary Adder-Subtractor (cont.)
When M=0 the circuit is an adder and when M=1 the circuit becomes a
subtractor. Each Exclusive-OR gate receives input M and one of the inputs of B.
When M=0, we have B 0=B. The full adders receive the value of B, the input
carry is 0, and the circuit performs A plus B. When M=1, we have B 1= B´ and
C0 = 1. the B inputs are all complemented and a 1 is added through the input
carry. The circuit performs the operation A plus the 2’s complement of B. for
unsigned numbers, the result is A-B provided that there is no overflow.

11

Вам также может понравиться