Design a 4-bit adder/subtractor circuit with add/sub control line
Answers
Answered by
14
I a 4-bit adder-subtractor circuit CMOS technology.
The instructions I was given for the design portion are as follows:
Given two 4-bit positive binary numbers A and B, you are to design an adder/subtractor circuit to compute (A+B) or (A-B), depending upon a mode input which controls the operation. You may use one’s or two’s compliment of B to perform subtraction. The result with the proper sign is to be displayed in un-complemented binary form.
My approach is to use four full-adders with a 4-bit input A, and a 4-bit input B whose bits may be XOR'd based on the mode chosen. The mode will be decided by bit M in the circuit below.
For subtraction M = 1. 1 is chosen because M acts as the carry-in. Therefore, all bits of B will be inverted and 1 will be added to the LSB to find the 2's complement.
For addition, M = 0. Therefore, carry-in is set to zero as desired.
The instructions I was given for the design portion are as follows:
Given two 4-bit positive binary numbers A and B, you are to design an adder/subtractor circuit to compute (A+B) or (A-B), depending upon a mode input which controls the operation. You may use one’s or two’s compliment of B to perform subtraction. The result with the proper sign is to be displayed in un-complemented binary form.
My approach is to use four full-adders with a 4-bit input A, and a 4-bit input B whose bits may be XOR'd based on the mode chosen. The mode will be decided by bit M in the circuit below.
For subtraction M = 1. 1 is chosen because M acts as the carry-in. Therefore, all bits of B will be inverted and 1 will be added to the LSB to find the 2's complement.
For addition, M = 0. Therefore, carry-in is set to zero as desired.
Attachments:
Similar questions