









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










-Y ) produces a difference bit D and a borrow out bit B-out.
realize it is called a half subtractor.
Inputs Outputs
X Y D B-out 0 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 X Y
D B-OUT X Y Difference D
Two binary numbers are subtracted by subtracting each pair of bits together with borrowing, where needed. Subtraction Example: 00 00 11 11 11 11 11 00 00 BorrowBorrow X 229 1 1 1 0 0 1 0 1 Y - 46 - 0 0 1 0 1 1 1 0 183 1 0 1 1 0 1 1 1
Y Y Y’ X X X’ B-in B-in B-in’ X’Y’B-in XY’B-in’ X’YB-in’ (^) Difference D X’ X X’ Y’ Y B-in Y B-in’ B-in’ X X’Y YB-in X’ X’B-in B-out X’ Y B-in Y B-in B-in (^) B-in’ XYB-in X Y B-in’
X Y D B-out B-in
Difference D X Y B-in
X Y B-out X’Y YB-in X’ X’B-in B-out X’ Y B-in Y B-in
D B-out B-in
4 bit 2’s complement Subtractor
B A 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 B B A 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
A B A 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 A B A 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 A B A B