Pertemuan:7 (Subtractor : Combinational Logic Design)

11/02/2013 02:11:00 PM 0 Comments

In this section, the discusion is about :

• Binary Subtraction
– 2’’s complement
– Extension to r’s complement
– Subtraction with complements
• Binary Adders/Subtractors
– Signed numbers
– Signed Addition/Subtraction
– Overflow problem
• Binary Multipliers



Binary Subtraction
Unsigned numbers: minus sign is not explicitly represented.

• Given 2 binary numbers M and N, find M-N:
– Case I: M ≥ N, thus, MSB of Borrow is 0
B 0 0 0 1 1 0
M 1 1 1 1 0 30
N -1 0 0 1 1 -19 Result is Correct
Dif 0 1 0 1 1 11
– Case II: N > M, thus MSB of Borrow is 1
B 1 1 1 0 0 0
M 1 0 0 1 1 19
N -1 1 1 1 0 -30 Result requires correction!
Dif 1 0 1 0 1 21

• In general, if N > M, Dif = M-N+2n, where n = # bits.
• In Case II of the previous example, Dif= 19-30+25 = 21.
• To correct the magnitude of Dif, which should be N-M, calculate 2n-(M-N+2n).
• This is known as the 2’’s complement of Dif.

Procedur Subtraction:
To subtract two n-bit numbers, M-N, in base 2:
– Find M-N.
– If MSB of Borrow is 0, then M ≥ N. Result is positive and correct.
– If MSB of Borrow is 1, then N > M. Result is negative and its magnitude must be corrected by subtracting it from 2n (find its 2’s complement).



You can download full chapter from this link:
BDT07-Subtractor

Unknown

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard.

0 komentar: