Arwa S.Bazmalah:, Noorfazila Kamal
Arwa S.Bazmalah:, Noorfazila Kamal
Arwa S.Bazmalah:, Noorfazila Kamal
2 (2022) 988-997
© Universiti Tun Hussein Onn Malaysia Publisher’s Office
PEAT
Homepage: http://publisher.uthm.edu.my/periodicals/index.php/peat
e-ISSN : 2773-5303
DOI: https://doi.org/10.30880/peat.2022.03.02.098
Received 27 January 2022; Accepted 20 July 2022; Available online 10 December 2022
Keywords: Full adder, Half subtractor, Garbage output, Quantum cost, Reversible
gates
1. Introduction
Power dissipation is one of the most critical aspects of an irreversible circuit. According to
Landauer’s principle, the irreversible circuit produces heat dissipation of around kTln2 Joules for every
bit of missing information during the computation, where k is the Boltzmann's constant, and T is the
absolute temperature [1]. In 1965, Moore proposed Moore’s law which stated the total number of
transistors doubles every 18 months in integrated chips. This led to an increase in the number of
transistors. Hence, the processing power of computers has progressively increased due to the increasing
density of transistors that leads to a growth in heat because of information loss during computing the
data [2]. In 1973, C.H. Bennet proved that there would be no power loss in digital circuits when
redesigning circuits using reversible gates [3]. As a result, researchers are looking for alternatives to
classical computing, which is a quantum computing, as the demand for more processing power and
lower energy consumption. Thus, this has become a major factor in developing reversible computing
[4]. In reversible gates, there is no loss of power during reversible computation. Many technologies
apply reversible logic, such as biotechnology, nanotechnology, adiabatic CMOS design, quantum
computing, optical computing, etc. [5] .
Reversible gates generate a unique one-to-one mapping between inputs and output vectors and vice
versa. In the reversible gate, the number of outputs are the same as the number of inputs [4,6,7]. Thus,
fan-out and feedback are not allowed [8]. If necessary, some additional wires can be added to the inputs
and outputs of a gate to make it reversible. The additional wires that are added to the inputs are called
the ancilla (constant inputs) and the additional wires to the outputs are called garbage outputs.
In the reversible computers, the computational blocks are important circuits such as multiplexer,
decoder, arithmetic logic unit, etc. [9]. The arithmetic units such as adders, subtractors, comparators,
etc. have an effect on the performance and efficiency of the circuit. Thus, research is necessary to
develop new design and synthesis approaches for the implementation of reversible arithmetic circuits
[10,11].
Some researchers designed half and full adders/subtractors using existing reversible gates, while
others made new gates then used them to construct the reversible half and full adder/ subtractor. Rohini
et al. [12] designed a half adder and subtractor as two circuits. The Peres gate is used as the half adder
and the CNOT, NOT, and Peres gate as the half subtractor. Both designs require a large number of
quantum cost, which reduces the performance of the circuits. In 2018, Nayana et al. [13] proposed a
half adder and subtractor circuit using two different gates. Meanwhile, Balaji et al. [14] used two
Feynman Double Gates (FDG) and two Fredkin Gates. A new reversible gate, called R gate, was
introduced by Montaser et al. [9]. They designed a reversible half adder/subtractor by using three R
gates and manage to achieve 4 quantum cost. In actuality, the three R gates combine 3 NOT gates, 1
Toffoli gate, and 2CNOT gates. Thus, the quantum cost of the circuit will be 8. Furthermore, FGE* and
SS are new gates introduced by Orts et al. [15] and Kolay et al. [16], respectively.
Many research have been done on designing the reversible full adder/subtractor circuits using
existing reversible gates. In 2016, Shukla et al. [17] presented two designs for a reversible 8-bit adder-
subtractor circuit. In the first design, the PFAG (Parity Full Adder Gate) gate is applied to construct the
full adder circuit. Thus, the 8-bit adder/subtractor circuit is designed by cascading eight PFAG gates
and eight Feynman gates. This design generated 17 garbage outputs and 72 quantum costs. In the second
design, the 8-bit adder/subtractor circuit is designed by cascading eight WG gates. Then, [18] applied a
different idea to construct a full adder/subtractor. It is built using the 3×8 reversible decoder and the
Feynman gate. Further, the designs of reversible 32-bit BCD (Binary Coded Decimal)
adders/subtractors have been attempted by Anjana et al. [19] depended on the parallel pipelined unit to
improve the speed and the power. Some researchers have made comparisons over existing full adder
and subtractor. In [20], many comparisons are made to realize the most efficient full adder circuits in
terms of power, area, and delay. In 2020, interesting reversible ternary full adder and full subtractor
circuits are proposed by Asadi et al. [10].
Many researchers have proposed different designs for reversible half and full adders/subtractors.
However, the designs still need to be improved in terms of the number of garbage outputs, quantum
cost, and constant inputs in order to obtain better performance and less complexity.
989
Arwa S.Bazmalah et al., Progress in Engineering Application and Technology Vol. 3 No. 2 (2022) p. 988-997
In this paper, a new reversible half adder/subtractor, also a new reversible 1-bit full adder/subtractor
are presented using reversible gates. The most feature of the proposed designs is the optimization of the
main criterions which are garbage outputs, gate counts, quantum cost, and constant inputs. The paper
is organized of the following sections: the second section presents the basic reversible gates. While the
proposed circuits are provided in the third section. The results and performance comparisons are
presented in the fourth section. Finally, Section 5 provides a conclusion and future works.
2. Basic Reversible Gate
A reversible gate is a digital circuit. It is a bijective gate. It has number of inputs equal to the number
of outputs. Thus, it has a mapping one to one. The most terms that should be considered when designing
and synthesis of reversible circuits are garbage output, quantum cost, constant inputs, and gate count
[21]. The garbage output is the number of outputs that are not used as a primary output. They are
necessary to achieve reversibility. While quantum cost refers to the cost of the number of primitive
reversible gates. It is required to realize the circuit and it is important for implementation [22]. In
addition, quantum cost is the total number of 1×1 or 2×2 reversible gates required to design the
reversible gate or circuit. Thus, the quantum cost of a circuit is the total quantum cost of all gates which
are built the circuit. Whereas constant inputs, also known as ancilla inputs, refer to the number of inputs
that are assigned to be constant at either 0 or 1 to synthesize reversible gates and reversible circuits
[12,23]. Meanwhile, the gate count refers to the total number of reversible gates used in a circuit. There
are many reversible gates, such as the NOT gate, which is a 1×1 gate, and many 3×3 reversible gates,
such as the Fredkin gate, Toffoli gate, Peres gate, and TR (Thapliyal Ranganathan) gate.
2.1 Not Gate
A NOT gate is the simplest reversible gate. It is a 1×1 gate with a quantum cost of zero. It has one
input which is A and one output P, where the output is an inversion of the input. Figure 1(a) shows the
symbol of the reversible NOT gate, which consists of input and output. Figure 1(b) shows the quantum
representation which has a target symbol (⊕) works as an Exclusive OR operation. The target symbol
in the NOT gate works as an inverter because the NOT gate has only one input. The equation of the
NOT gate is given by
𝑃 = 𝐴̅ 𝐄𝐪. 𝟏
(a) (b)
Figure 1: Reversible NOT gate (a) symbol and (b) the quantum representation
990
Arwa S.Bazmalah et al., Progress in Engineering Application and Technology Vol. 3 No. 2 (2022) p. 988-997
(a) (b)
Figure 2: Feynman gate (a) symbol and (b) the quantum representation
A B P=A Q=A⊕B
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
𝑄 = 𝐴̅. 𝐵 + 𝐴. 𝐶 𝐄𝐪. 𝟓
𝑅 = 𝐴. 𝐵 + 𝐴̅. 𝐶 𝐄𝐪. 𝟔
2.4 Peres Gate
It is a 3×3 gate [27] with mapping (A, B, C) to (P, Q, R). The quantum cost of the Peres gate is 4
[28]. The equations in Peres gate are given by
𝑃=𝐴 𝐄𝐪. 7
𝑄 =𝐴⊕𝐵 𝐄𝐪. 𝟖
𝑃 = (𝐴. 𝐵) ⊕ 𝐶 𝐄𝐪. 𝟗
2.5 Toffoli Gate
It is a 3×3 gate (TG), which is also known as a controlled-controlled not [29]. It has a quantum cost
of 5. The equations of the Toffoli gate are given by
𝑃=𝐴 𝐄𝐪. 𝟏𝟎
𝑄=𝐵 𝐄𝐪. 𝟏𝟏
𝑅 = (𝐴. 𝐵) ⊕ 𝐶 𝐄𝐪. 𝟏𝟐
2.6 TR Gate
A TR gate is a 3×3. The equations of the TR gate are given by
𝑃=𝐴 𝐄𝐪. 𝟏𝟑
𝑄 = 𝐴⊕𝐵 𝐄𝐪. 𝟏𝟒
𝑃 = (𝐴. 𝐵̅ ) ⊕ 𝐶 𝐄𝐪. 𝟏𝟓
991
Arwa S.Bazmalah et al., Progress in Engineering Application and Technology Vol. 3 No. 2 (2022) p. 988-997
Start
Design requirements
Achieved NO
result?
Yes
End
Figure 3: Flow chart of reversible binary half and full adder and subtractor
992
Arwa S.Bazmalah et al., Progress in Engineering Application and Technology Vol. 3 No. 2 (2022) p. 988-997
993
Arwa S.Bazmalah et al., Progress in Engineering Application and Technology Vol. 3 No. 2 (2022) p. 988-997
𝐵𝑂𝑅𝑅𝑂𝑊 = ̅̅̅̅̅̅̅̅̅̅̅
(𝐴 ⊕ 𝐵). 𝐶) ⊕ (𝐴 ⊕ 𝐵). 𝐴̅ 𝐄𝐪. 𝟐𝟓
994
Arwa S.Bazmalah et al., Progress in Engineering Application and Technology Vol. 3 No. 2 (2022) p. 988-997
The comparisons of the proposed reversible half and full adder/subtractor and other designs are
made in terms of the number of gates, constant bits, garbage bits, and the quantum cost. The comparison
of the proposed reversible half adder and subtractor and other designs is shown in Table 2. Meanwhile,
the comparison of the proposed reversible full adder and subtractor with other designs is shown in Table
3.
Table 2: Comparison of different designs of half adder/subtractor
As shown in Table 2, the proposed half adder/subtractor achieves the lowest quantum cost of six,
similar with work [15]. Although work in [15] obtain lower gate count and zero garbage output, but it
only operates as a half subtractor.
Table 3: Comparison of different designs of full adder/subtractor
As depicted in Table 3, the full adder/subtractor design proposed in this work achieve the lowest
quantum cost of nine. It also has minimum number of garbage output and constant input.
5. Conclusion
In this paper, reversible binary half and full adder/subtractor designs are presented. Both designs
are built using basic reversible logic gates. The circuit is designed and synthesized using Verilog. The
performance comparison results for both reversible half and full adder/subtractor show that the
proposed designs achieve the lowest number of quantum cost. In addition, the reversible
adder/subtractor also efficient in terms of the number of gates, number of garbage output and number
of constant bits when compared to other existing designs. The advancement and development of
synthesis and designing can lead to improving the existing designs. Some possible future work is
investigating a new methodology and a new reversible gate to build a floating adder.
Acknowledgement
This research was supported by grants GUP-2020-014. The authors would like to thank to the
Universiti Kebangsaan Malaysia for supporting this project.
995
Arwa S.Bazmalah et al., Progress in Engineering Application and Technology Vol. 3 No. 2 (2022) p. 988-997
References
[1] R. Landauer, “Irreversibility and heat generation in the computing process,” IBM journal of
Research and Development, vol. 5, no. 3, pp. 183-191, 1961
[2] G. E. Moore. Cramming more components onto integrated circuits. NY, USA, In:McGraw-Hill
New York, 1965
[3] C. H. Bennett, "Logical reversibility of computation,” IBM journal of Research and
Development, vol. 17, no. 6, pp. 525-532, 1973
[4] M. V. Kumar, “Design of Low Power Adder and Multiplier Using Reversible Logic Gates,”
IJISET, vol. 2, no. 9, 2015
[5] V. Kamalakannan, , V. Shilpakala, , and H. N. Ravi, “Design of adder/subtractor circuits based
on reversible gates,” International Journal of Advanced Research in Electrical, Electronics and
Instrumentation Engineering, vol. 2, no. 8, pp. 3796-3804, 2013
[6] A. N. Al-Rabadi, "Reversible logic neural networks," 2004 IEEE International Joint Conference
on Neural Networks (IEEE Cat. No.04CH37541), 2004, vol.4, pp. 2677-2682 doi:
10.1109/IJCNN.2004.1381072
[7] K. S. Perumalla. Introduction to reversible computing. CRC Press, 2013
[8] A.Norouzi Doshanlou, M. Haghparast, and M. Hosseinzadeh, “Novel Quaternary Quantum
Reversible Half Adder and Full Adder Circuits,” IETE Journal of Research, pp.1-7, 2019
[9] R. Montaser, A. Younes, and M. Abdel-Aty, “New design of reversible full adder/subtractor
using R gate,” International Journal of theoretical physics, vol. 58, no. 1, pp. 167-183, 2019
[10] M.A. Asadi, M. Mosleh, and M. Haghparast, “An efficient design of reversible ternary full-
adder/full-subtractor with low quantum cost” Quantum Information Processing, vol. 19, no. 7,
pp. 1-21, 2020
[11] H. Thapliyal, “Mapping of subtractor and adder-subtractor circuits on reversible quantum
gates,” In Transactions on Computational Science XXVII. Springer , Berlin, Heidelberg, 2016,
pp.10-34
[12] H. Rohini, and S. Rajashekar, “Design of reversible logic based basic combinational circuits,”
Communications, vol. 5, pp. 38-43, 2016
[13] D.K. Nayana, and B.K. Sujatha, “The Implementation of Reversible Gates in Design of 1bit, 4-
bit ALU and 8b/10b Encoder & Decoder,” Int J Appl Eng Res, vol. 13, no. 9, pp.6909-6914,
2018
[14] B. Balaji et al., “Full Adder/Subtractor Using Reversible Logic,” International Journal of Pure
and Applied Mathematics, vol.120, no. 6, pp.437-446, 2018
[15] F. Orts, G. Ortega, and E. M. Garzón, “A faster half subtractor circuit using reversible quantum
gates,” Baltic Journal of Modern Computing, vol. 7, no. 1, pp. 99-111, 2019
[16] S. Chowdhury Kolay, S. Chattopadhyay and M. Bandyopadhyay, "Design and Development of
SS Reversible Logic Gate and it’s Application as Adder & Subtractor," 2020 International
Conference on Inventive Computation Technologies (ICICT), 2020, pp. 977-981, doi:
10.1109/ICICT48043.2020.9112514
[17] V. Shukla, O. P. Singh, G. R. Mishra and R. K. Tiwari, "A novel approach for reversible
realization of 8-bit adder-subtractor circuit with optimized quantum cost," 2016 International
996
Arwa S.Bazmalah et al., Progress in Engineering Application and Technology Vol. 3 No. 2 (2022) p. 988-997
997