Parallel Adder or SubtractorPublished on 24/2/2012 and last updated on 28/8/2018
Hence the design of parallel adder when manipulated in a way so as to provide the 2’s complement of the number whenever necessary can be used as a parallel adder-cum-subtractor. One such design accomplished using the XOR gates is as shown by Figure 1.
Here M-line acts as a control line i.e. depending on the value provided at M, the circuit behaves either as an adder or as a subtractor. The reason for this can be explained below. Suppose, if M-line is driven low, then one of the input to each and every XOR gate would be logic 0. This means that the XOR outputs in this case will be unaltered binary bits of the number . In addition, if M = 0, the carry in pin (Ci1) of the first full adder (FA1) would also be 0. Due to these conditions, the circuit shown will be behave as a n-bit adder adding the number with . Similarly let us now analyze the case where M = 1, meaning which the M control line is pulled high. In this case, one of the inputs to each XOR gate would be logic 1. This means that we get the complement of the bits as the outputs of each XOR gate.
This indicates that the binary number is complemented before being fed as an input to each of the full adder in the circuit. In addition, for the same case, even the Ci1 of the first full adder FA1 would be logically high. As a result, the cascaded arrangement of full adders shown in Figure 1 effectively performsn-bit binary subtraction wherein the binary number is subtracted from .