# Combinational Circuit II

In the part I, we covered some of the key topics of combinational circuit. Logic circuits, Analyze procedure, Design procedure. In this tutorial we will discuss about adders and substractors. Adder is a combinational digital circuit that perform the addition. Half adder is the basic combinational circuit with two inputs and two outputs. It can add two input binary digits and produce sum(S) and carry(C) bits. If inputs are A and B, then sum is the X-OR of the A and B, carry is the AND of the A and B.

Truth table We can simplify and get the Boolean expression using K-Map. (Go to the K-Map)

S = A’B +AB’ = A ⊕ B

C = AB

Implementation of Half Adder using AND and OR Implementation of Half Adder using AND and X-OR But we can also implement half adder using NAND gates. NAND gate is consider as universal Logic gate. Therefore, all logic gates can be implemented with NAND gates.

Implementation of Half Adder using NAND gates  Full adder is a combinational circuit that perform addition. It adds together two binary digits plus a carry in(C-in) digit and produce two outputs, a sum(S) and a carry out(C-out) bit. Full adders use to get addition of n-bit binary numbers. The addition proceeds on a bit by bit basis, right to left beginning with the least significant bit.

Truth table Simply the Logical expression for C-out in sum using K map.

S = A’B’Cin + A’BC’in +AB’C’in +ABCin

C = AB + ACin +BCin

= AB + ACin +BCin (A + A’)

= ABCin + AB + ACin + A’BCin

=AB (1+Cin) + ACin + A’BCin

=ACin +AB + A’BCin

=AB + ACin (B +B’) + A’BCin

= ABCin + AB + AB’Cin + A’BCin

= AB (Cin + 1) + AB’Cin + A’BCin

= A B’ Cin + A B + A’ B Cin

=AB + Cin (A’B + AB’)

=AB + Cin (A ⊕ B)

Implement a full adder with two Half adders and one OR gate.  Binary adder produces the arithmetic sum of two binary numbers. It is constructed with full adders connected in cascade. The output carry from each full adder is connected to the input carry of the next full adder in chain. Addition of n-bit numbers requires a chain of n full adders or a chain of one-half adder and n-1 full adders. The design of this circuit by the classical method would require a truth table with 29 =512 entries since there are nine inputs to the circuit. but using an alternative method of cascading a standard function, we obtain a simple and straight forward implementation.

## Carry Propagation

In combinational circuits, the signal must propagate through the gates before the correct output sum is available in the output terminals. Total propagation time is equals to the propagation delay of a typical gate, times the numbers of gate levels in the circuit. The longest propagation delay time in an adder is the time it takes the carry to propagate through the full adder. The last output Sum and Carry will settle to their final correct value only after the carry propagates and ripples through all stages. Carry propagation time is an important attribute of the adder. It limits the speed with which two numbers are added. There are two solutions for reducing carry propagation delay.

• Employ faster gates with reduced delays
• Increase the complexity of the equipment in such a way that the carry delay time is reduced.

There are several techniques exist for reducing the carry propagation time in parallel adders. Most widely used technique employs the principle of Carry Look-ahead Logic in most ALU designs. It is faster compared to full adders especially when adding a large number of bits. The signal from the input carry to output carry propagates through an AND gate and an OR gate, which constitute two gate levels. For an n-bit adder, there are 2n gate levels for the carry to propagate from input to output.

Pi = Ai xor Bi

Gi = Ai Bi

Output sum and carry are expressed as follows;

Si = Pi xor Ci

Ci+1 = Gi + PiCi

Boolean function for each carry output at each stage

𝐶0 = 𝑖𝑛𝑝𝑢𝑡 𝑐𝑎𝑟𝑟𝑦

C1 = G0 +P0 C0

C2 = G1 +P1 C1 = G1 + P1 (G0 +P0 C0) = G1 +P1G0 +P1P0C0

C2 = G2 +P2 C2 = G2 +P2G1 +P2P1G0 + P2P1P0C0

Boolean function for each output carry is expressed in sum of products from. It can be implemented with one level of AND gates followed by an OR gate.  Therefore, circuit can add in less time. C3 is propagated at the same time as C1 and C2. So, all output carries are generated after a delay through two levels of gates. Therefore, all output sums have equal propagation delay times.  Binary adder –subtractor is a combinational circuit that capable of both addition and subtraction of binary numbers. The M is the mode control input which is connected to the carry input of the least significant bit of the full adder. The M input decides whether the operation is addition or a subtraction.

There is a xor gate for each Full adder block. One input of xor gate is connected to B while other input is connected to M. When M = 0, the xor gate outputs B. input carry bit (Cin) also 0. Hence the circuit is act as Adder.

When the subtraction operation is performed,

M=1, hence the xor gate outputs complement of B. therefore complement of B added to A.

A – B = A + (2’s complement of B)

(2’s complement of B) = (1’s complement of B) + 1

(1’s complement of B) is implemented with inverters. 1 can be added to the sum through an input carry.

1. 2. 