Chip Designing for ASIC/ FPGA Design engineers and Students
Digital-logic Design... Dream for many students… start learning front-end…
Get Noticed:- Submit your own content to be published on fullchipdesign.com
Binary addition or subtraction can be implemented using a single circuit as discussed below. With this implementation any length (no of bits = N) of binary numbers can be used to calculate the results by using N number of full-adders and N number of XOR gates.
Circuit is very similar to binary adder circuit except of a XOR gate at second input to full-adders.
Switch Mode (SM) is a control input to the circuit to switch between addition or subtraction operations.
When SM = 0 the circuit is equivalent to Binary Adder.
B (bit ) XOR 0 = B (bit)
When SM = 1 the circuit is equivalent to Binary subtractor.
B (bit ) XOR 1 = invert(B (bit))
‘B’ input become’s and inverted in this case.
Refer following sections @ fullchipdesign for examples:-
Binary adder example.
Subtraction examples - Unsigned numbers.
Subtraction examples - Signed numbers.
Discussion of Adder-Subtractor circuit
Circuit Level Implementation