Design of Power-Efficient High-Speed 4-Bit Compara
Design of Power-Efficient High-Speed 4-Bit Compara
Department of Electronics and Communication Engineering, Vaagdevi College of Engineering, Warangal, India
Abstract
Power, Area, and Delay are the three important performance metrics used for analyzing any digital circuit. This paper explores different
digital circuit design styles to achieve a better trade-off between the performance metrics. 4-bit Comparator based on 2’s complement
addition principle is designed and implemented using these different digital circuit principles. Full adder and the other components
required to implement 4-bit comparator are designed and implemented using Majority Gate Logic (MGL), Mirror Adder Logic (MAL),
Complementary Pass Transistor Logic (CPL), Transmission Gate Logic (TGL) and Gate Diffusion Input Logic (GDI) for studying
their performance under different stringent conditions of Temperature, Power supply, etc. The circuits are realized in the UMC 180 nm
process using the Cadence Spectre Simulator with a power supply of 1.8 V.
1. Introduction very high speeds at the cost of low power. Digital comparator is
one such ALU block that has wide applications in the data
Recent advances in the field of electronics made an enormous processing, encryption applications and more specifically
increase in the usage of portable electronic systems. In such types decoding instructions given to a microprocessor-based system or
of portable applications, power dissipation has one of the most decision-based control system. Several architectures have
important design considerations making it to be vital for many derived in the works of literature for implementing a 2-bit or 4-
researchers in the field of integrated circuit design. The concern bit comparator. In [1], a 2-bit comparator is implemented using
about reducing the power dissipation has been increased with the all-n-transistor (ANT) dynamic CMOS logic based on the tree
scaling down of VLSI technologies. The number of transistors or structure. A comparator based on bit-wise competition logic is
gates per given chip area is increasing while the switching energy proposed in [2]. A low power-based style has been used to design
is not decreasing at the same speed and hence the power a comparator in [3]. [4] Proposes a 2-bit comparator based on
dissipation increases making the removal of accumulated heat reversible logic. In [5], 45 nm and 90 nm technologies are used
more difficult and expensive. To overcome this limitation various for designing a comparator in different logic styles. Various high-
design approaches at different levels of abstraction that include speed comparator architectures have been discussed in [6]. [7]
circuit, architectural, or system have been proposed in various Describes a comparator based on multiplexer architecture with a
existing works of literature. single clock operation. [8] and [9] describes various static circuit
Power dissipation in any digital circuit has three major design styles targeted to achieve low power digital circuits with
contributions Dynamic Power-Indicates loss of energy in countable speeds.
charging and discharging of output capacitance while switching This paper presents the performance of different static logic
the output states, Static Power- Usually termed as leakage power styles to achieve low power consumption and high packing
determined by the total leakage current of the circuit under density by designing a 4-bit comparator based on 2’s complement
steady-state conditions and Short Circuit power- Because of addition and the circuits are realized in UMC 180 nm process
current flowing through the input source to the ground during using the Cadence Spectre Simulator with a power supply of 1.8
short circuit conditions. Most of the design approaches are meant V.
for reducing the dynamic power dissipation as it contributes The proposed architecture of a 4-bit comparator based on 2’s
largely to the total power dissipation. In the existing literature, complement addition is discussed in section 2. While section 3
various digital logic techniques like Majority Gate Logic (MGL), describes the architecture of Full-Adder associated with the
Mirror Adder Logic (MAL), Complementary Pass Transistor proposed architecture using different logic styles. Simulation
Logic (CPL), Transmission Gate Logic (TGL) and Gate results and the conclusions are presented in section 4 and section
Diffusion Input Logic (GDI), etc are discussed to achieve the 5 respectively.
required performance.
In the present day high-performance systems like real-time 2. Architecture of 4-bit comparator
Digital signal processors, Microcontroller based systems consist
of high-speed circuits that include ADCs, Filters, etc which Various comparator architectures are discussed in the
require arithmetic and logic operations that should be executed at existing literature for different speeds, power, and circuit
From Eq. (1) and Eq. (2), the most straight forward approach
Figure 2 FA Architecture using Majority Gate Logic (MGL). for designing the adder is using logic gates like 3-input XOR gate
for sum (SUM) output and 3-2 input AND gates with 1-3 input
OR gate for Carry-out (Cout). From CMOS based circuit
complexity. The basic need of comparator is to find the
implementation of full adder modelled using Eq. (1) and Eq. (2),
arithmetic relation between two variables (say A, B) in terms of
it is found that it requires 40-Transistors for producing SUM and
either lesser than or greater than or equal to. The traditional
Cout outputs. The transistors required to construct the FA can be
method of comparison is the finding of relative magnitudes of the
reduced by modifying the SUM and Cout Boolean equations as
variables. One of the most common approaches to find arithmetic
follows,
relation is based on a bit-wise comparison for digital variables.
In which Most Significant Bits (MSB) are compared and if the ̅̅̅̅̅̅ = A
̅∙B
̅ ∙ ̅̅̅̅ ̅ ∙ B ∙ Cin + A ∙ B
̅ ∙ Cin + A ∙ B ∙ ̅̅̅̅
SUM Cin + A Cin (3)
relationship is found between these bits than that is the output of
comparator else if these two MSB bits found to be equal, then the
comparison result depends on lower-order bits. The bit-wise 𝐶𝑜𝑢𝑡 = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅∙B
A ̅ + ̅̅̅̅
Cin ∙ (A̅+B ̅) = 𝑀𝐴𝐽𝑂𝑅𝐼𝑇𝑌 (A, B, Cin ) (4)
comparison continues until all the bits of two variables are
compared until a relation is found. Since the comparison is bit- From the Eq. (2), it can be observed that the output Cout
wise, it requires more logic gates in-turn transistors and hence exists, whenever the majority of inputs exist and the same is
results in larger power dissipation and longer delays. shown in Eq. (4), termed as called “Majority Gate Equation”, and
To overcome the circuit design complexity in terms of the hence the logic is called Majority Gate Logic (MGL). CMOS
number of transistors, the power consumed and smaller delays, a implementation of FA using Eq. (3) and Eq. (4) is illustrated in
new method of magnitude comparison is proposed. The basic Figure 2.
principle of proposed logic is based on 2’s complement addition. From Figure 2, it can be observed that MGL implementation
To find the arithmetic relation between two variables (say A, B), of FA requires a total of 32 Transistors out of which 6 for
bit-wise (B-A) subtraction is performed using 2’s complement inverters, 10 for the majority gate i.e. for Cout and 16 for SUM
logic. As per the 2’s complement addition, if the addition output. Hence this logic requires 20 % less area compared to
operation results in a carry than the relation is A ≤ B, if all the traditional CMOS implementation of FA based on Eq. (1) and
sum bits are Zero than the relation is A = B and while if carry (2).
don’t exist and if all the sum bits are not Zero than the relation is
A > B. The architecture based on this principle for the 3.2 Full adder design using mirror adder
comparison of two 4-bit inputs (Say, A [3:0] and B [3:0]) is
shown in Figure 1. The transistors count required for implementing FA based on
From the Figure 1, it can be observed that to perform (B-A), Eq. (1) and (2) can be further reduced by reusing Cout for
A is bit-wise complemented using Inverters and applied as the producing SUM. By applying Boolean algebraic rules, the SUM
second input to full adders (FAs), while the first stage full adder expression modelled using Eq. (1) can be factorized such that Cout
42 Engineering and Applied Science Research 2021;48(1)
shown by Eq. (4) can be reused and thus the expression for SUM excellent method for utilizing the pass transistors which
output is, overcomes the disadvantages using static CMOS inverters and is
termed as “Complementary Pass transistor logic (CPL)”. In
SUM = A ∙ B ∙ Cin + (A + B + Cin) ∙ ̅̅̅̅̅̅
Cout (5) general, CPL consists of true and inverted variables; NMOS pass
transistors and level shifter using inverters.
Figure 3 illustrates the CMOS implementation of FA based The full adder modelled using Complementary Pass
on Eq. (5) and Eq. (6). It can be inferred from the circuit transistor logic (CPL) is shown in Figure 4. CPL tries to reduce
implementation that the PMOS and NMOS network are alike the number of transistors for implementing the FA logic by
rather than being the complement, unlike the traditional CMOS driving both gates together with source and drain terminals using
logic. This topology is termed as “Mirror Adder” and hence the the primary inputs unlike traditional CMOS logic [11]. It can be
logic is Mirror Adder Logic (MAL). The simplification involved observed from Figure 4, that FA designed using the CPL [12]
here has reduced the number of series transistors resulted in approach uses 30 Transistors in comparison to 40-Transistors
uniform Layout. 28 transistors are utilized to implement the FA based CMOS static logic [13].
which is 30 % less compared to traditional CMOS logic and
about 12.5 % less than MGL. 3.4 Transmission gate logic (TGL) based full adder design
3.3 FA Using complementary pass transistor logic (CPL) Unlike the digital gates, the Transmission Gate [14] is similar
to a switch that operates in both directions. It consists of an
In contrast to static CMOS logic, Pass transistor logic offers NMOS and PMOS transistors connected in parallel and whose
greater lead in terms of three parameters area, power, and speed. operation can be controlled by a control signal connected in
Even though it provides better performance, it has been avoided complement to their respective gates. The FA modelled by Eq.
in low power applications because of degraded logic voltage (1) and Eq. (2) implemented using these transmission gates is
levels which result in reduced noise Margins. [10] Proposed an illustrated in Figure 5. It can be noticed from Figure 5 that the
Engineering and Applied Science Research 2021;48(1) 43
Table 1 Input Combinations for various Logic operations using GDI logic.
Function G P N Output
OR A B ‘1’ A+B
AND A ‘0’ B A.B
MUX A B C A’.B+A.C
XOR A B B’ A’.B+A.B’
NOT A ‘1’ ‘0’ A’
̅∙P+G∙N
Q=G (6)
VDD B
B
VDD
A A+B VDD
A A+B (A+B)’
Vin Vout
VDD (A+B+C+D)’
A+B+C+D
VDD Gnd
D
Gnd 2-Input GDI NOR
CMOS / GDI Inverter VDD Gnd
C C+D
Cout
A>B
B3 S3
+ VDD
A3 4 Input GDI NOR
A<B
C3
B2 S2
+
A2 A
C2 A=B
B1 S1 B
+ C SUM
A1
C1
B0 S0
+
A0
Cin
10T GDI FA
Figure 9 depicts the power variation of the 4-bit comparator bar diagram, and the same is illustrated in Table 3. Figure 12
depicted in Figure 1 concerning temperature. Figure 10 shows the shows the simulation results of the 4-bit Comparator
power variations with respect to input voltages. It can be implemented using the GDI technique in the 180 nm process
observed from Figure 9, that the power dissipation increases with using the Cadence Spectre environment.
temperature, and this variation found to be very small in GDI
logic. From Figure 10, it can be inferred that the GDI exhibits 5. Conclusion
less power dissipation compared to other logic styles.
Figure 11 illustrates the performance analysis of the 4-bit The performance metrics power, delay, and area of 5
magnitude comparator designed using various design styles in different CMOS logic design styles are studied in this paper. 4-
terms of the number of transistors, power, and speed in terms of Bit comparator using 2’s complement addition technique has
Engineering and Applied Science Research 2021;48(1) 45
Figure 12 Simulation Results of 4-Bit Comparator using GDI logic obtained from Cadence spectre Environment
been designed and implemented using Majority Gate Logic [10] Yano K, Tamanaka T, Nishida T, Saito M, Shimohigashi
(MGL), Mirror Adder Logic (MAL), Complementary Pass K, Shimizu A. A 3.8 ns CMOS 16 x 16-b Multiplier Using
Transistor Logic (CPL), Transmission Gate Logic (TGL) and Complementary Pass-Transistor Logic. . IEEE J Solid State
Gate Diffusion Input Logic (GDI). Simulations are accomplished Circ. 1990;25(2):388-95.
in 180 nm CMOS process technology under the Cadence Spectre [11] Avci M, Yildirim T. Complementary pass transistor logic
environment and are presented. From the simulation results, it is synthesis with 123 decision diagram. J Electr Electron Eng.
found that the GDI technique shows reduced power dissipation, 2004;4(1):1045-9.
increased speed, and a smaller area in terms of the transistor [12] Ghosh D, Nandy SK, Parthasarathy K, Visvanathan V.
count compared to its counter logic design styles. Hence it is NPCPL: Normal process complementary pass transistor
evident that the digital circuits implemented using the GDI logic for low latency, high throughput designs. The Sixth
technique exhibits superior performance and thus GDI technique International Conference on VLSI Design; 1993Jan 3-6;
proves to be the better option of a low-power design principle for Bombay, India. USA: IEEE; 1993. p. 341-6.
VLSI circuit designer. [13] Shams AM, Darwish TK, Bayoumi MA. Performance
analysis of low-power 1-bit CMOS full adder cells. IEEE
6. References Trans Very Large Scale Integr VLSI Syst. 2002;10(1):
20-9.
[1] Wang CC, Wu CF, Tsai KC. 1-GHz 64-bit high-speed [14] Navi K, Maeen M, Foroutan V, Timarchi S, Kavehei O. A
comparator using ANT dynamic logic with two-phase novel low-power Full Adder cell for low voltage.
clocking. IEE Proc Comput Digit Tech. 1998;145(6): Integration. 2009;42(4):457-67.
433-6. [15] Wairya S, Nagaria RK, Tiwari S. Performance analysis of
[2] Kim JY, Yoo HJ. Bitwise competition logic for compact high speed hybrid CMOS full adder circuits for low voltage
digital comparator. 2007 IEEE Asian Solid-State Circuits VLSI design. VLSI Des. 2012;2012:173079.
Conference; 2007 Nov 12-14; Jeju, South Korea. USA: [16] Morgenshtein A, Fish A, Wagner IA. Gate-diffusion input
IEEE; 2007. p. 59-62. (GDI) - a technique for low power design of digital circuits:
[3] Shekhawat V, Sharma T, Sharma KG. Low power analysis and characterization. 2002 IEEE International
magnitude comparator circuit design. Int J Comput Appl. Symposium on Circuits and Systems; 2002 May 26-29;
2014;94(1):22-4. Phoenix-Scottsdale, AZ, USA. USA: IEEE; 2002.
[4] Dubey V, Singh OP, Mishra GR. Design and p. 477-80.
implementation of a two-bit binary comparator using [17] Mukherjee DN, Panda S, Maji B. Performance evaluation
reversible logic. Int J Sci Res Publ. 2012;2(7):1-4. of digital comparator using different logic styles. IETE J
[5] Agrakshi SR. Design and analysis of low power 2-Bit and Res. 2018;64(3):422-9.
4-bit digital comparator in 45nm and 90nm CMOS [18] Sucharitha, D. et al. GDI logic based design of hamming-
technology. Int J Eng Tech Res. 2015;3(5):278-87. code encoder and decoder for error free data
[6] Deb S, Chaudhary S. High-speed comparator architectures communication. 2019 3rd International Conference on
for fast binary comparison. 2012 Third International Computing Methodologies and Communication (ICCMC);
Conference on Emerging Applications of Information 2019 Mar 27-29; Erode, India. USA: IEEE; 2019.
Technology; 2012 Nov 30 – Dec 1; Kolkata, India. USA: p. 1-5.
IEEE; 2012. p. 454-7. [19] Bellaouar A, Elmasry MI. Low power digital VLSI design:
[7] Lam HM, Tsui CY. A MUX-based high-performance circuits and systems. 2nd ed. Norwell: Kluwer academic;
single-cycle CMOS comparator. IEEE Trans Circ Syst II. 1995.
2007;54(7):591-5. [20] Rabaey JM. Digital integrated circuits. USA: Prentice-
[8] Weste N, Harris D. CMOS VLSI design: a circuits and Hall; 1996.
system perspective. 3rd ed. USA: Addison-Wesley; 2004. [21] Rabaey JM, Chandrakasan A, Nikolic B. Digital integrated
[9] Uyemura JP. Circuit design for CMOS VLSI. Norwell: circuits, a design perspective. 2nd ed. New Jersey: Pearson
Khuver Academic; 1992. educational publishers; 2008.
Engineering and Applied Science Research 2021;48(1) 47
[22] Kandasamy N, Ahmad F, Reddy S, Ramesh Babu M, [23] Kandasamy N, Mohan Kumar N, Telagam N, Ahmad F,
Telagam N, Utlapalli S. Performance evolution of 4-b Mishra G. Analysis of self checking and self resetting logic
bit MAC unit using hybrid GDI and transmission in CLA and CSA circuits using gate diffusion input
gate based adder and multiplier circuits in 180 and technique. 2019 International Conference on Smart
90 nm technology. Microprocess Microsyst. 2018;59: Systems and Inventive Technology (ICSSIT); 2019 Nov
15-28. 27-29; Tirunelveli, India. USA: IEEE; 2019. p. 1-6.