

















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!


















College of Computer and Information Sciences Department of Computer Science
CSC 220: Computer Organization
Remember:
This is almost the same as the increment function!
Selection code Desired arithmetic operation Required adder inputs S 2 S 1 S 0 G (A + B + CI) A B CI 0 0 0 X (transfer) 0000 X 0 0 0 1 X + 1 (increment) 0000 X 1 0 1 0 X + Y (add) Y X 0 0 1 1 X + Y + 1 Y X 1 1 0 0 X + Y’ (1C subtraction) Y’ X 0 1 0 1 X + Y’ + 1 (2C subtraction) Y’ X 1 1 1 0 X – 1 (decrement) 1111 X 0 1 1 1 X (transfer) 1111 X 1
S 2 S 1 A 0 0 0000 0 1 Y 1 0 Y’ 1 1 1111
S 2 S 1 Yi Ai 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1
inputs (^) output
S 1 0 0 1 0 S 2 1 0 1 1 Yi
A (^) i = S 2 Yi’ + S 1 Yi
1 0 1 1 AND 1 1 1 0 1 0 1 0
1 0 1 1 OR 1 1 1 0 1 1 1 1
1 0 1 1 XOR 1 1 1 0 0 1 0 1
S 1 S 0 Output 0 0 Gi = XiYi 0 1 Gi = Xi + Yi 1 0 Gi = Xi ⊕ Yi 1 1 Gi = Xi’