ARITHMETIC CIRCUITS
Arithmetic logic circuits are the logic circuits which perform arithmetic operations like addition,
subtraction in digital computers.
Half adder: It is a combinational logic circuit which performs the addition of two bits resulting
in two outputs - Sum and Carry.
Block diagram of half adder Logic diagram or logic circuit of half adder
A
Sum = A + B
A Sum B
Half
Inputs Outputs
Adder
B Carry
Carry = AB
Truth table of half adder
Inputs Outputs
A B Sum = A + B Carry = AB
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Timing Diagram
Half adder using universal NAND
gates
A
A
B Sum
B
S
Carry
Boolean expression:
̅B+A𝐁
Sum = A + B = 𝐀 ̅
Carry = AB
Full adder: It is a combinational logic circuit which performs the addition of three bits
resulting in two outputs - Sum and Carry.
DEPARTMENT OF ELECTRONICS, JSSCACS, MYSORE Page 1
Block diagram of full adder
A Sum
Full
Inputs B Outputs
Adder
C Carry
Truth table of full adder
Inputs Outputs
A B C Sum = A + B + C Carry = AB +BC +CA
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Logic circuit of full adder
A
B Sum =A + B + C
C
Carry = AB + B C + AC
Boolean expression for the sum Boolean expression for the carry
Sum == A + B + C
Carry = AB + BC + AC
Sum = A̅B
̅C+A ̅BC ̅ +ABC ̅ + AB C
Timing Diagram
=
A
Sum
Carry
DEPARTMENT OF ELECTRONICS, JSSCACS, MYSORE Page 2
Half Subtractor: It is combinational logic circuits which performs the subtraction of two bits
resulting in two outputs - Difference and Borrow.
Block diagram of half Subtractor Logic diagram or logic circuit of half ubtractor
A
Difference = A + B
A Difference B
Half
Inputs Outputs
Subtractor
B Borrow
̅B
Borrow = A
Truth table of half Subtractor
Inputs Outputs
A B Difference = A + B ̅B
Borrow = A
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Boolean expression: Timing Diagram
̅B+A𝐁
Difference = A + B = 𝐀 ̅
Borrow = 𝐀̅B A
Half subtractor using universal NAND gates
A B
Difference
Difference
B
Borrow
Borrow
w
Full subtractor: It is combinational logic circuits which performs the subtraction of three bits
resulting in two outputs difference and borrow.
Block diagram of full Subtractor
A Difference
Full
Inputs B Outputs
Subtractor
C Borrow
DEPARTMENT OF ELECTRONICS, JSSCACS, MYSORE Page 3
Truth table of full subtractor Logic circuit of full subtractor
Input Output A
A B C ̅C
Difference Borrow = A Difference = A + B + C
B
=A+B+C ̅
+AB+BC
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0 Borrow =
1 0 1 0 0 C ̅C+A
A ̅ B + BC
1 1 0 0 0
1 1 1 1 1
4 BIT PARALLEL BINARY ADDER:
A Parallel Adder is a digital circuit capable of finding the arithmetic sum of two binary numbers
that is greater than one bit in length by operating on corresponding pairs of bits in parallel. It
consists of full adders connected in cascade where the output carry from each full adder is
connected to the carry input of the next higher order full adder
Consider two 4-bit binary numbers B 4B 3B 2B 1 and A 4A 3A 2A 1 are to be added with a carry input
C 1. This can be done by cascading four full adder circuits as shown in Figure. The least significant
bits A 1, B 1, and C 1 are added to the produce sum output S 1 and carry output C 2. Carry output
C 2 is then added to the next significant bits A 2 and B 2 producing sum output S 2 and carry output
C 3. C 3 is then added to A 3 and B 3 and so on. Thus finally producing the four-bit sum output
S 4S 3S 2S 1 and final carry output Cout.
Magnitude Comparator
Data comparison is needed in digital systems while performing arithmetic or logical operations. This
comparison determines whether one number is greater than, equal, or less than the other number.
A Magnitude Comparator is a combinational circuit that compares two binary numbers in order
to find out whether one binary number is equal, less than or greater than the other binary number.
The Block diagram of Magnitude Comparator is as shown below.
DEPARTMENT OF ELECTRONICS, JSSCACS, MYSORE Page 4
Types of Magnitude Comparator:
1. 1-bit magnitude comparator.
2. 2-bit magnitude comparator.
3. 3-bit magnitude comparator.
4. 4-bit magnitude comparator.
2-bit magnitude comparator:
A 2-bit comparator compares two binary numbers, each of two bits and produces their
relation such as one number is equal or greater than or less than the other. The figure below shows
the block diagram of a two-bit comparator which has four inputs and three outputs.
The first number A is designated as A = A1A0 and the second number is designated as B =
B1B0. This comparator produces three outputs as G (G = 1 if A>B), E (E = 1, if A = B) and L (L = 1
if A<B).
The truth table for a 2-bit comparator is given below:
DEPARTMENT OF ELECTRONICS, JSSCACS, MYSORE Page 5
4-Bit Comparator
It can be used to compare two four-bit words. The two 4-bit numbers are A = A3 A2 A1 A0
and B3 B2 B1 B0 where A3 and B3 are the most significant bits.
It compares each of these bits in one number with bits in that of other number and produces
one of the following outputs as A = B, A < B and A>B.
The output logic statements of this converter are
If A3 = 1 and B3 = 0, then A is greater than B (A>B). Or
If A3 and B3 are equal, and if A2 = 1 and B2 = 0, then A > B. Or
If A3 and B3 are equal & A2 and B2 are equal, and if A1 = 1, and B1 = 0, then A>B. Or
If A3 and B3 are equal, A2 and B2 are equal and A1 and B1 are equal, and if A0 = 1 and B0
= 0, then A > B.
Block diagram:
DEPARTMENT OF ELECTRONICS, JSSCACS, MYSORE Page 6
Truth table
Reference Books:
1. Thomas L. Floyd, “Digital Fundamentals,” 11th Edition, Pearson Education, 2015.
2. A.P. Malvino, D. P. Leach, and Saha, “Digital Principles and Applications,” 8 th Edition,
TMH, 2014.
3. [Link]
4. [Link]
DEPARTMENT OF ELECTRONICS, JSSCACS, MYSORE Page 7