48
Digital Electronics
Table 3.1 Binary addition of three bits.
A
B
CarrySum
CarryA
B
CarrySum
Carryin (C in )
out (C o )
i n ( C in )
out (C o )
0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
1
0
0
1
0
1
1
0
1
1
1
1
1
1
numbers, we need to add three bits at a time. Two of the three bits are the bits that are part of the two
binary numbers to be added, and the third bit is the carry-in from the next less significant bit column.
The basic principles of binary subtraction include the following:
1. 0 − 0 = 0.
2. 1 − 0 = 1.
3. 1 − 1 = 0.
4. 0 − 1 = 1 with a borrow of 1 from the next more significant bit.
The above-mentioned rules can also be explained by recalling rules for subtracting decimal numbers.
Subtracting ‘0’ from any digit or number leaves the digit or number unchanged. This explains
the first two rules. Subtracting ‘1’ from any digit or number in decimal produces the immediately
preceding digit or number as the answer. In general, the subtraction operation of larger-bit binary
numbers also involves three bits, including the two bits involved in the subtraction, called the minuend
(the upper bit) and the subtrahend (the lower bit), and the borrow-in. The subtraction operation
produces the difference output and borrow-out, if any. Table 3.2 summarizes the binary subtraction
operation. The entries in Table 3.2 can be explained by recalling the basic rules of binary subtraction
mentioned above, and that the subtraction operation involving three bits, that is, the minuend (AA,
the subtrahend (BB and the borrow-in (B in , produces a difference output equal to (A − B − B in .
It may be mentioned here that, in the case of subtraction of larger-bit binary numbers, the least
significant bit column always involves two bits to produce a difference output bit and the borrow-out
Table 3.2 Binary subtraction.
Inputs
Outputs
Minuend
Subtrahend
Borrow-in
Difference
Borrow-out
(A)
( B)
( B in )
( D)
( B o )
0
0
0
0
0
0
0
1
1
1
0
1
0
1
1
0
1
1
0
1
1
0
0
1
0
1
0
1
0
0
1
1
0
0
0
1
1
1
1
1
Digital Electronics
Table 3.1 Binary addition of three bits.
A
B
CarrySum
CarryA
B
CarrySum
Carryin (C in )
out (C o )
i n ( C in )
out (C o )
0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
1
0
0
1
0
1
1
0
1
1
1
1
1
1
numbers, we need to add three bits at a time. Two of the three bits are the bits that are part of the two
binary numbers to be added, and the third bit is the carry-in from the next less significant bit column.
The basic principles of binary subtraction include the following:
1. 0 − 0 = 0.
2. 1 − 0 = 1.
3. 1 − 1 = 0.
4. 0 − 1 = 1 with a borrow of 1 from the next more significant bit.
The above-mentioned rules can also be explained by recalling rules for subtracting decimal numbers.
Subtracting ‘0’ from any digit or number leaves the digit or number unchanged. This explains
the first two rules. Subtracting ‘1’ from any digit or number in decimal produces the immediately
preceding digit or number as the answer. In general, the subtraction operation of larger-bit binary
numbers also involves three bits, including the two bits involved in the subtraction, called the minuend
(the upper bit) and the subtrahend (the lower bit), and the borrow-in. The subtraction operation
produces the difference output and borrow-out, if any. Table 3.2 summarizes the binary subtraction
operation. The entries in Table 3.2 can be explained by recalling the basic rules of binary subtraction
mentioned above, and that the subtraction operation involving three bits, that is, the minuend (AA,
the subtrahend (BB and the borrow-in (B in , produces a difference output equal to (A − B − B in .
It may be mentioned here that, in the case of subtraction of larger-bit binary numbers, the least
significant bit column always involves two bits to produce a difference output bit and the borrow-out
Table 3.2 Binary subtraction.
Inputs
Outputs
Minuend
Subtrahend
Borrow-in
Difference
Borrow-out
(A)
( B)
( B in )
( D)
( B o )
0
0
0
0
0
0
0
1
1
1
0
1
0
1
1
0
1
1
0
1
1
0
0
1
0
1
0
1
0
0
1
1
0
0
0
1
1
1
1
1
