<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">CS</journal-id><journal-title-group><journal-title>Circuits and Systems</journal-title></journal-title-group><issn pub-type="epub">2153-1285</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/cs.2014.51002</article-id><article-id pub-id-type="publisher-id">CS-41935</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject><subject> Engineering</subject><subject> Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Design of Low Power Comparator Using DG Gate
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>ahram</surname><given-names>Dehghan</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Abdolreza</surname><given-names>Roozbeh</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Jafar</surname><given-names>Zare</given-names></name><xref ref-type="aff" rid="aff3"><sup>3</sup></xref></contrib></contrib-group><aff id="aff2"><addr-line>Department of Electrical Engineering, Zarghan Branch, Islamic Azad University, Zarghan, Iran</addr-line></aff><aff id="aff1"><addr-line>Young Researchers and Elite Club, Sarvestan Branch, Islamic Azad University, Sarvestan, Iran</addr-line></aff><aff id="aff3"><addr-line>Department of Electrical Engineering, Sarvestan Branch, Islamic Azad University, Sarvestan, Iran</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>Bahramdehghan1@gmail.com(AD)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>10</day><month>01</month><year>2014</year></pub-date><volume>05</volume><issue>01</issue><fpage>7</fpage><lpage>12</lpage><history><date date-type="received"><day>November</day>	<month>18,</month>	<year>2013</year></date><date date-type="rev-recd"><day>December</day>	<month>18,</month>	<year>2013</year>	</date><date date-type="accepted"><day>December</day>	<month>25,</month>	<year>2013</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   In recent studies, reversible logic has emerged as a great scene of research, having applications in low power CMOS circuits, optical computing, quantum computing and nanotechnology. The classical logic gates such as AND, OR, EXOR and EXNOR are not reversible. In the existing literature, reversible sequential circuits designs are offered that are improved for the number of the garbage outputs and reversible gates. Minimizing the number of garbage is very noticeable. In the present paper, we show a design of the reversible comparator based on the quantum gates implementation of the reversible DG gate. The reversible DG gate is designed by using 3 &#215; 3 quantum gates such as NOT, CNOT, Controlled-V and Controlled-V<sup>+</sup> gates. Also, we have used the TR gate and various types of quantum gates in the implementation results. Low power three-bit comparator is designed using DG Gate, New Gate and Fredkin Gate. In order to evaluate the benefit of using the DG gate proposed in this paper, one-bit comparator is constructed. The design is useful for the future computing techniques like quantum computers. The proposed designs are implemented using VHDL and functionally investigated using Quartus II simulator. 
 
</p></abstract><kwd-group><kwd>Reversible Logic Comparator; TR and DG Gate; Quantum Cost; Garbage Output</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Conventional combinational logic circuits dissipate heat for every bit of information that is lost during their operation [<xref ref-type="bibr" rid="scirp.41935-ref1">1</xref>]. According to Landauer’s principle, each bit of data lost produces kTln2 joules amount of heat, where k is Boltzmann’s constant and T is the absolute temperature at which the operation is implemented [<xref ref-type="bibr" rid="scirp.41935-ref2">2</xref>]. Moore’s law [<xref ref-type="bibr" rid="scirp.41935-ref3">3</xref>] previses exponential growth of the heat generated due to the information loss, which will be a significant amount of heat loss in the next decade.</p><p>Bennett [<xref ref-type="bibr" rid="scirp.41935-ref4">4</xref>] illustrated that zero energy dissipation would be possible only if the network based on reversible gates. Hence, reversibility will become a necessary property in future circuit design.</p><p>There are two Boolean constants, 0 and 1. Reversible circuits are those circuits that do not lose information.</p><p>These circuits can produce single output vector from each input vector, and conversely, there was a one-to-one mapping between output and input vectors. Hence, an N &#215; N reversible gate can be represented as:</p><p><img src="2-7600304\e9b62202-b3b2-4955-a5e6-aa0926e6a858.jpg" /></p><p><img src="2-7600304\a7136432-5ff1-4b81-a386-efffdda2a7d3.jpg" /></p><p>where Iv and Ov can be shown the input and output vectors respectively; the significant cost metrics in the synthesis of reversible logic circuits are the number of garbage outputs, delay and quantum cost [5,6]. Any unitary operation must be reversible. Thus, quantum networks effecting primary arithmetic operations such as addition, multiplication and exponentiation cannot be directly infered from their classical Boolean counterparts (classical logic gates such as AND or OR or EXOR are irreversible). Therefore, Quantum Arithmetic must be made from reversible logic combinations [<xref ref-type="bibr" rid="scirp.41935-ref7">7</xref>]. Various gates have been proposed over the last decades. Among them are the controlled-not (CNOT) introduced by Feynman [<xref ref-type="bibr" rid="scirp.41935-ref8">8</xref>] Toffoli [<xref ref-type="bibr" rid="scirp.41935-ref9">9</xref>], and Fredkin [<xref ref-type="bibr" rid="scirp.41935-ref10">10</xref>] gates. Digital Comparator is a combinational circuit that compares two inputs binary quantities (A and B) and produces outputs to indicate whether the inputs are equal or which input is greater than the other. Therefore, the circuit has three outputs to indicate whether A = B, A &gt; B or A &lt; B.</p><p>In this paper, we present various designs of a three-bit comparator circuit using existing reversible logic gates. The present paper proposed a new gate, called reversible DG gate which was used in the design of comparator. All the comparators have been modeled and investigated using VHDL and Quartus II.</p></sec><sec id="s2"><title>2. Basic Reversible Gates</title><p>The detailed cost of a reversible gate associates with any specific realization of quantum logic. A short description of the gates are given below.</p><p>A. The NOT Gate A NOT gate is a 1 &#215; 1 gate performed as shown in <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>(a). It has quantum cost of 1.</p><p>B. The Controlled-V and Controlled-V<sup>+</sup> Gates The Quantum cost of a Reversible gate is computed by counting the number of V, V<sup>+</sup> and CNOT gates [<xref ref-type="bibr" rid="scirp.41935-ref11">11</xref>]. The controlled-V and V<sup>+</sup> gates are shown in Figures 1(b) and (c).</p><p>The Controlled-V and Controlled-V<sup>+</sup> quantum gates have some properties that are shown below:</p><p>These equations depict that two V or V<sup>+</sup> gates in series are equivalent to a NOT gate; and two V and V<sup>+</sup> in series, are equivalent a BUFFER gate.</p><p>C. Feynman Gate The most popular (2, 2) one-through reversible gate is the Feynman gate [<xref ref-type="bibr" rid="scirp.41935-ref8">8</xref>]. The logical functions performed by a Feynman gate with input vector (A, B) and output vector (P, Q) are represented in  <xref ref-type="fig" rid="fig2"><xref ref-type="fig" rid="fig">Figure </xref>2</xref>.</p><p>The input double (A, B) depends on its output double (P, Q) as follows.</p><p><img src="2-7600304\4d68d35b-b6f9-4c06-877b-a19168ccf492.jpg" /></p><p>If A = 0 then Q would be equal to B. If A = 1 then showed the complement of the input (B).</p><p>Hence, it is called as quantum XOR and also called as CNOT (1-NOT).</p><p>D. Fredkin gate Fredkin gate [<xref ref-type="bibr" rid="scirp.41935-ref10">10</xref>], depicted in  <xref ref-type="fig" rid="fig3"><xref ref-type="fig" rid="fig">Figure </xref>3</xref>, is a (3, 3) reversible gate which penetrates P = A, Q = A'B ⊕ AC and R = A'C ⊕ AB where (A, B, C) is the input vector and (P, Q, R) is the output vector.</p><p>Figures 4(a) and (b) offer the performance of the Fredkin gate as AND and OR functions respectively.</p><p>E. New gate The New gate [<xref ref-type="bibr" rid="scirp.41935-ref12">12</xref>] is a (3, 3) reversible gate. The most significant aspect of this gate is that it can work as a universal gate.</p><p>The New gate is one of the most popular reversible as represented in <xref ref-type="fig" rid="fig5"><xref ref-type="fig" rid="fig">Figure </xref>5</xref>.</p><p>F. BVF gate This is a (4, 4) reversible logic gate [<xref ref-type="bibr" rid="scirp.41935-ref13">13</xref>] shown in <xref ref-type="fig" rid="fig6"><xref ref-type="fig" rid="fig">Figure </xref>6</xref> with input vector I (A, B, C, D) and the output vector is O (P, Q, R, S) . This can be used for duplication of the required inputs to meet the fan-out requirements. This gate can be specified by P = A, Q = A ⊕ B, R = C and S = C ⊕ D.</p><p>G. TR gate Recently Thapliyal and Ranganathan in [<xref ref-type="bibr" rid="scirp.41935-ref14">14</xref>]&#160; have proposed&#160; a new design of the reversible full subtractor based on the offered quantum gates implementation of the TR gate. TR gate with quantum cost of 4. The quantum cost of TR gate is 4 since it requires 1 V<sup>+</sup> gates, 2 V gate and 1 CNOT gate in its structure.</p><p>TR gate and Quantum implementation of TR gate have represented in Figures 7(a) and (b) respectively.</p></sec><sec id="s3"><title>3. Proposed Gate</title><p>This paper presents a new (3, 3) reversible gate, “DG”,</p><p>with inputs (A, B, C) and outputs P = A, Q = (A ⊕ B)', R = AB' ⊕ C that is shown in <xref ref-type="fig" rid="fig8"><xref ref-type="fig" rid="fig">Figure </xref>8</xref>(a). The gate is one-through, which means one of the input variables is also output. The corresponding truth table of DG gate is shown in <xref ref-type="table" rid="table1">Table 1</xref>. <xref ref-type="fig" rid="fig8"><xref ref-type="fig" rid="fig">Figure </xref>8</xref>(b) shows the quantum implementation of the DG with quantum cost of 5. The corresponding truth table of the DG gate is shown in <xref ref-type="table" rid="table1">Table 1</xref>.</p></sec><sec id="s4"><title>4. Design of the Three Bit Comparator</title><p>The two numbers are equal if all pairs of significant digits are equal; meaning A3 = B3 and A2 = B2 and A1 = B1.</p><p>To check for this equality, we use the XNOR gate as we did previously.</p><p>So we have seen three bit comparator (A = B) using classical gates as shown in <xref ref-type="fig" rid="fig9"><xref ref-type="fig" rid="fig">Figure </xref>9</xref>.</p><p>In the same way, the following classical gate A &gt; B can be considered for a three bit comparator which is shown in  <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>0.</p><p>If we want to have the output A = B, DG and BVF Gates can be used. The results are shown in <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>1. <xref ref-type="table" rid="table2">Table 2</xref> shows the evaluation of the mentioned circuit.</p><p>Two DG Gates can be put instead of BVF Gate to reduce the number of gates. The results are shown in <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>2. <xref ref-type="table" rid="table3">Table 3</xref> shows the evaluation of the mentioned circuit.</p><p>Reversible three bit comparator is implemented with various types of reversible logic gates as shown in Figures 13 and 14 respectively.</p><p>The proposed circuit of the three bit comparator is evaluated in terms of number of reversible gates used and garbage outputs generated. Tables 4 and 5 show the evaluation of the proposed circuits.</p><p>The results show that DG gate reduces the number of gates and garbage outputs.</p><p>In the proposed one-bit comparator design, we have investigated FA &gt; B and FA = B and the third condition FA &lt; B is produced from the first two outputs. Therefore the design recitation leads to</p><p><img src="2-7600304\085dc8a3-b844-4081-bb3a-5e1c91ab643f.jpg" /></p><p><img src="2-7600304\5bfb0d12-e8ac-45d5-925e-3674d38884a6.jpg" /></p><p><img src="2-7600304\72c2f34b-d83f-4dd2-961e-6d00070e5dc0.jpg" /></p><p>The results are shown in  <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>5. DG gate is used in  <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>5 where DG and NG are used in <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>0.</p><p><xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>6 has less garbage outputs but in  <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>5, there are EXOR and EXNOR gates in outputs concur-</p><p>rently. Tables 6 and 7 show the evaluation of the proposed circuits.</p><p>In the mentioned paper one bit comparator has better function in comparison with Nagamani et al. <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>7 is selected as follows, in Nagamani et al.</p><p>A good synthesis for reversible logic should not create an excessive “garbage” or “waste of outputs”. Hence, the components are chosen so that the designed scheme has the desired characteristics. One bit comparator can be represented by 2 DG gates and 1 FG gate, as shown in  <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>8. This structure can be utilized for testing outputs 1 and 3 (AB'). DG gate operates as a signal copying that shown in <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>8. The corresponding table of mentioned circuit is shown in  <xref ref-type="table" rid="table8">Table 8</xref>. The (A'B) output of the  <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>8 is given by the equation:</p><p><img src="2-7600304\f902af24-c036-4ecc-b66c-850934c4c25d.jpg" /></p><p><xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>8 has better performance because of similarity gates and two same outputs. Although garbage outputs seems zero. <xref ref-type="table" rid="table8">Table 8</xref> shows the evaluation of the mentioned circuit.</p><p>Two same outputs of this <xref ref-type="fig" rid="fig">Figure </xref>can be used for concurrent error detection.</p></sec><sec id="s5"><title>5. Simulation Results</title><p>Reversible logic gates are extensively known to be compatible with future computing technologies which approximately dissipate zero heat [<xref ref-type="bibr" rid="scirp.41935-ref15">15</xref>]. For example, Reversible three bit comparators offered using VHDL and Simulated using Quartus II Simulator. Simulation results are shown in Figures 19(a) and  (b). For one bit comparator using DG gate result shown in <xref ref-type="fig" rid="fig1"><xref ref-type="fig" rid="fig">Figure </xref>1</xref>9(c).</p></sec><sec id="s6"><title>6. Discussions and Conclusions</title><p>Conventional computers generate heat and waste much energy. In order to make a computer faster and lower power, consumption proposed reversible logic gates. In this paper, we have presented new designs of reversible one and three-bit comparators based on the quantum gates implementation of the reversible TR and DG. The main goal of this paper is optimized in terms of number of garbage outputs, gate count and quantum cost for comparator designs. The proposed DG gate can be combined with TR gate and various types of reversible logic gates to design minimal quantum cost and garbage less reversible circuits.</p><p>The newly proposed DG gate can be used for imple-</p><p>menting concurrent EXOR and EXNOR output functions. Hence, three outputs of DG gate have efficient results for comparator designs. In this paper, one-bit comparator has better performance comparatively.</p></sec><sec id="s7"><title>REFERENCES</title></sec><sec id="s8"><title>NOTES</title></sec></body><back><ref-list><title>References</title><ref id="scirp.41935-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">A. N. Nagamani, H. V. Jayashree and H. R. Bhagyalakshmi, “Novel Low Power Comparator Design Using Reversible Logic Gates,” 2011 Indian Journal of Computer Science and Engineering (IJCSE), Vol. 2, No. 4, 2011, pp. 566-574.</mixed-citation></ref><ref id="scirp.41935-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">R. Landauer, “Irreversibility and Heat Generation in the Computational Process,” IBM Journal of Research and Development, Vol. 5, No. 3, 1961, pp. 183-191.http://dx.doi.org/10.1147/rd.53.0183</mixed-citation></ref><ref id="scirp.41935-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">G. E. Moore, “Cramming More Components onto Integrated Circuits,” Electronics, Vol. 38, No. 8, 1965.</mixed-citation></ref><ref id="scirp.41935-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">C. H. Bennett, “Logical Reversibility of Computation,” IBM Journal of Research and Development, Vol. 17, 1973, pp. 525-532.</mixed-citation></ref><ref id="scirp.41935-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">M. Mohammadi and M. Eshghi, “On Figureures of Merit in Reversible and Quantum Logic Designs,” Quantum Information Processing, Vol. 8, No. 4, 2009, pp. 297-318.http://dx.doi.org/10.1007/s11128-009-0106-0</mixed-citation></ref><ref id="scirp.41935-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">D. Maslov and G. W. Dueck, “Improved Quantum Cost for n-Bit Toffoli Gates,” IEEE Electronics Letters, Vol. 39, No. 25, 2003, pp. 1790-1791.http://dx.doi.org/10.1049/el:20031202</mixed-citation></ref><ref id="scirp.41935-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">V. Vedral, A. Bareno and A. Ekert, “Quantum Networks for Elementary Arithmetic Operations,” 1995. arXiv:quantph/9511018 v1</mixed-citation></ref><ref id="scirp.41935-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">R. Feynman, “Quantum Mechanical Computers,” Optic News, Vol. 11, 1985, pp. 11-20.http://dx.doi.org/10.1364/ON.11.2.000011</mixed-citation></ref><ref id="scirp.41935-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">T. Toffoli, “Reversible Computing,” Tech memo MIT/ LCS/TM-151, MIT Lab for Comp. Sci, 1980.</mixed-citation></ref><ref id="scirp.41935-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">E. Fredkin and T. Toffoli, “Conservative Logic,” International Journal of Theoretical Physics, Vol. 21, No. 3-4, 1982, pp. 219-253.http://dx.doi.org/10.1007/BF01857727</mixed-citation></ref><ref id="scirp.41935-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">H. G. Rangaraju, V. Hegde, K. B. Raja and K. N. Muralidhara, “Design of Efficient Reversible Binary Comparator,” International Conference on Communication Technology and System Design, 7-9 December 2011.</mixed-citation></ref><ref id="scirp.41935-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">M. H. Azad Khan Md., “Design of Full Adder with Reversible Gate,” International Conference on Computer and Information Technology, Dhaka, 27-28 December 2002, pp. 515-519.</mixed-citation></ref><ref id="scirp.41935-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">H. R. Bhagyalakshmi and M. K. Venkatesha, “Design of a Multifunction BVMF Reversible Logic Gate and Its Applications,” International Journal of Computer Applications (0975-8887), Vol. 32, No. 3, 2011.</mixed-citation></ref><ref id="scirp.41935-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">H. Thapliyal and N. Ranganathan, “A New Design of the Reversible Subtractor Circuit,” 2011 11th IEEE International Conference on Nanotechnology, Portland Marriott, 15-18 August 2011.</mixed-citation></ref><ref id="scirp.41935-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">B. Dehghan, “Survey the Inverse Property of Quantum Gates for Concurrent Error Detection,” Journal of Basic and Applied Scientific Research, 2013, pp. 603-608.</mixed-citation></ref></ref-list></back></article>