A Novel Design and Implementation of Reversible Adder cum Subtractor M.Sarada Department of Electronics and Communication Engineering Narayana Engineering College, Nellore, AP, India
M. Muralidhar Professor, Department of Electronics and Communication Engineering Narayana Engineering College, Nellore, AP, India Abstract - According to MOORE’S LAW for every 18 months the density of chip should double. This approach is good in technology revolution. But this leads to so many conflicts like power dissipation; manufacturing difficulties etc.Power dissipation is the main factor which degrades the performance of designs. To get low power dissipation, circuits use reversible logic which ideally give zero power dissipation. In this paper i propose a new gate called reversible adder cum subtractor gate (RACSG). This gate is logically reversible gate. This gate produces both addition and subtraction results of three bits at a time. This gate is useful as a building block to many arithmetic circuits. In this paper two arithmetic blocks (4*4 reversible multiplier and 4 –bit parallel adder) are implemented by using this RACSG gate. Keywords: Power dissipation, Reversibility, logical reversibility, physical reversibility, thermodynamics, injective function, gate count, constant/garbage inputs, garbage outputs, logic width , RACSG gate ,reversible 4*4multiplier, reversible four bit parallel adder/subtractor .
I.INTRODUCTION I.a) Reversible logic: In existing irreversible gates there is loss of information in computation. In 1961, R.LANDAUER, said that for every one bit lost it produces atleast KTln2 Joules energy dissipation in the form of heat. Where ‘K’ is Boltzmann’s constant ‘T ’is temperature at which operation is performed. According to thermodynamics this energy loss produces heat. However , BENNETT proved that KTln2 joules energy is not lost when we use reversible logic. In future power dissipation is the most important consider factor in nano technology, QCA technology etc. Reversibility concept plays a vital role in low power requirements. Reversibility concept meaning is we can get any unknown state by known state. From irreversible gates we get reversible gates by adding constant input and garbage output. Reversibility concept => irreversible gate inputs + constant inputs = irreversible outputs + garbage outputs There are two types of reversibility concepts. x x
Physical reversibility Logical reversibility
Physical reversibility: The reuse of dissipated energy in an organized manner for further actions is called physical reversibility. Logical reversibility: If a gate is logical reversible then that gate has inverse gate also. For example, a reversible gate has input ‘a’ and output ‘b’ then Reversible gate function is: F(a) = b;
Inverse gate function is: F’ (b) = a; Logical reversibility function is also called injective or one –to –one mapping function . NOTE: Logical reversibility along with physical reversibility both can only give low power advantage. By combining both reversibility concepts we get zero heat. (Practically physical reversibility is not perfectly achievable)There are (2^n)! gates are possible for ‘n’ logic width reversible gate.. The most useful area for reversible logic is quantum computing Reversible logic gates are basic elements in quantum computing. I.b) Some characteristics of reversible logic gates: x x x x x x x x
Equal number of inputs and outputs Unique inputs and outputs (one-to-one mapping ) No fan -outs No loops Less gate count Less number of garbage/constant inputs Less number of garbage outputs Low quantum cost
I.c). Terms related to reversible logic: Garbage/constant inputs: The inputs of a gate which are fixed to either ‘0’ or ‘1’ are called constant inputs. Garbage outputs: The outputs of a gate which are not used as neither primary outputs nor input to any other gate are called garbage outputs but, x
Constant inputs and garbage outputs are essential for logical reversibility.
Quantum cost: Number of primitive gates used in the gate is called quantum cost Gate count: Number of reversible gates from input to output is called gate count Logic width: Number of input/output bits is called logic width II.LITERATURE SURVEY Not gate is the basic reversible conventional gate. There are basic reversible gates. They are Feynman gate, Fredkin gate, Toffoli gate. Among those gates toffoli gate and fredkin gate are universal gates . By using these universal gates one can develop any reversible circuits. Adders and multipliers are the essential blocks in digital signal processing applications. Simultaneous addition and subtraction circuits are also required in digital signal processing applications. There are so many reversible adder and multiplier implementation methods[. Different implementations has their own unique speciality. Depending on the application one choose a particular implementation method. In ”design and optimization of reversible multiplier circuit “the multiplier is designed using RAM gate.RAM gate multiplier structure is optimized to give less constant inputs and garbage outputs. In  ‘novel reversible multiplier architecture using reversible TSGgate” multiplier is designed using TSG gate. In “design of a novel reversible multiplier circuit using HNG gate in nano technology “multiplier is designed using HNG gate. In ”an area efficient reversible multiplier circuit design by using low power technique” multiplier area is optimized . In  “design of adder/subtractor circuits based on reversible gates “three methods of adder/subtractor designs are present. They are adder/subtractor by using mux,TR gate,hybrid. In”low power reversible parallel binary adder/subtractor” there are three full adder/subtractor designs present and one reversible eight bit parallel binary full adder/subtractor design is given. In ”design of high speed low power reversible logic adder using HNGgate” different full adder designs with comparision of garbage inputs/outputs is present. II.a) Reversible gate:
Figure 1 : peres gate
Figure 2: Quantum implementation of peres gate
Peres gate is used as half adder in the design of multiplier using RACSG gate.
III. DESIGN OF RACSG GATE:
Figure 3: block diagram of RACSG gate
Table1: Truth table of RACSG gate
Inputs (a,b,c,d) 0000 0010 0100 0110 1000 1010 1100 1110
Outputs (p,q,r,s) 0000 1100 1101 0111 1000 0010 0011 1111
There exists reversible full adder/subtractor gate but, with the control bit it acts as either full adder or full subtractor.Proposed gate gives both full addition and full subtraction results simultaneously. Figure 3 shows the RACSG gate. This gate is a 4*4 reversible gate. This gate gives sum and carry of three bits, as well as difference and barrow of those same three bits. Now we understand that this gate simultaneously acts as both full adder and full subtractor From the table 1 it is clear that there is one-to-one mapping between input and output . That means it obeys logical reversibility. In RACSG gate First output gives sum (or) difference output of full adder (or) full subtractor respectively, Second output gives the barrow output in full subtractor,Third output gives carry in full adder, Fourth output gives second input bit . Consider Fourth output as garbage output in adder and subtractor. III.a).RACSG as half adder/subtractor:
Table2: Truth table of half adder/subtractor a
0000 0100 1000 1100
0000 1101 1000 0011
Figure 4 : block diagram of RACSG half adder Figure 4 shows RACSG gate as reversible half adder as well as half subtractor. At a time this gate gives two bits addition and subtraction results (sum, carry, difference, and barrow.) P = A XOR B ;(sum/difference) Q = (NOT A) AND B;(barrow) R = A AND B;(carry) S=B; C=D=’0’;(garbage output and constant input) IV.AN EXAMPLE USE OF RACSG GATE REVERSIBLE 4*4 MULTIPLIER: Multiplier is the most needed element in computations. There are two units in the multiplier design.
Partial product generator circuit Multiple operand addition circuit
The two units are designed using RACSG gate. Here RACSG gate is the building block. Adder is the basic element in multiplier. Half adders and full adders are needed for multiplier. Single RACSG gate can do half addition, half subtraction,product generation. This multiplier design can be extended to n*n multilpler by the same design method. Instead of RACSG gate as product generator use another reversible gates like toffoli,peres etc. In multiple operand addition unit instead of peres gate as half adder use RACSG gate as half adder. This multipler design gives an idea about the use of RACSG gate as one building block in arithmetic circuits.
IV.a).Partial product generator:
Figure 5 : partial product generator
Figure 5 shows the partial product generator of 4*4multiplier. Here RACSG gate is used as product generator. One RACSG gate gives one product.so, for 16 partial products we need 16 RACSG gates. Here RACSG gate is used as half adder. Half adder carry gives the product of two numbers. Which is the partial product. Here, there are two constant inputs and three garbage outputs for each gate. Logic verification is done by writing VHDL programme in XILINX and simulate using ISIM SIMULATOR. These results are shown in figure 7. IV.b) Multiple operand addition:
Figure 6 : Multiple operand addition In this multiple operand addition unit for half adders Peres gate is used. For one Peres gate there is one constant input and one garbage output. For full adders RACSG gate is used. One RACSG gate has one constant input and two garbage outputs. Carry terms in the middle of addition are moved to next column. N*N multiplier needs x x x
N 2 gates in partial product generation unit N half adders in multiple operand addition 2N full adders in multiple operand addition
Figure 7 : simulation results of multiplier Above figure shows the simulation results of multiplier.From the results it is clear that RACSG gate is suitable as one building block in multiplier.
Figure 8 : Reversible four bit multiplier report Above figure gives the gate count in multiplier. This report gives total number of AND OR NOT, XOR gates V . SECOND EXAMPLE USE OF RACSG GATE RACSG gate is used as reversible parallel adder and subtractor simultaneously. Control bit decides which action takes place whether a parallel adder or parallel subtractor. Every controller has the same control bit for selecting. In this design each RACSG gate has one garbage input and one garbage output.
Figure 9: four bit parallel adder/subtractor This parallel adder and subtractor acts as parallel adder and parallel subtractor separately( not at a time). Depending on control bit it acts as either adder and subtractor. Control bit is same for four controllers. If ctrl = ‘0’ act as parallel adder (carry is forwarded) If ctrl = ‘1’ act as parallel subtractor (barrow is forwarded)
Figure 10: simulation results of reversible parallel adder
VI.CONCLUSION In future reversibility concept is very essential for power reduction. Still research is going on in reversible concept for physical implementation.The proposed gate is used as adder and subtractor simultaneously.RACSG gate cab be used as builsing block in arithmetic designs like adder,subtractor,multiplier etc. VII.FUTURE WORK The proposed gate design is at logical reversibility stage. It may be further extended to physical reversibility,with further decrease in power . By using this gate complex VLSI circuits like ALU can be designed. REFERENCES              
R.LANDAUER 1961. “Irreversibilty and heat generation in the computational process” IBM Journal of Research and Development,vol. 5,no.3,pp.183-191 CH Bennett,1973.”Logical Reversibility of Computation”.IBM Journal of Research and Development,vol.17,no.6,pp.525-532. Edward Fredkin and Tommaso Toffoli,1982.”Conservative Logic”.International Journal of Theoretical Physics,vol.21,pp.219-253. H Thapliyal and M B Srinivas,2006.”Novel Reversible Multilplier Architecture using Reversible TSGgate”.IEEE International Conference on Computer Systems and Applications,pp.110-103. H G rangaraju,Aakash Babu Suresh ,Muralidhara K N,”Design and Optimization of Reversible Multiplier Circuit”International Journal of Computer Applications(0975-8887)Volume52-No.10,August 2012 Majid Haghparast,”Design of a Novel Reversible Multiplier Circuit Using HNG Gate in Nanotechnology”,World Applied Sciences Journal 3(6):974-978,2008 ISSN 1818-4952 G.Amitha,M Chandra sekhar,D Santosh,S Venkatesh,” An Area Efficient Reversible Multilplier Circuit Design By Using Low Power Technique”,International Journal of Engineering Research and Applications(IJERA):2248-9622 www.ijera.com H G Rangaraju,U Venugopal,K N Muralidhara,K B Raja,”Low Power Reversible Parallel Binary Adder/Subtractor” Shefali Mamataj,Dibya Saha,Nahida Banu.research paper”A Review of Reversible Gates and its Application in Logic Design”,Americian Journal of Engineering Research(AJER) e-ISSN :2320-0847 p-ISSN:2320-0936 Volume-03,Issue-04,pp-151-161 www.ajer.org Asima Jamal,Jai Prakash Prasad,”Design of Low Power Counters Using Reversible Logic”,International Journal of Innovative Research in Science Engineering and Technology, ISSN : 2319-8573,Vol..3,Issue 5,2014 Santosh Rani,Amandeep Singh Bhandari,”A Survey on Reversible Logic Gates”,International Journal of Computer Applications(09758887) International Conference on Advancements in Engineering and Technology(ICAET 2015) V.Kamalakannan,V.Shilpakala,H.N.Ravi,”Design of Adder/Subtractor Circuits Based on Reversible Gates”IInternational Journal of Advanced Research in Electrical,Vol 2,issue 8,2013 Manjeet Singh Sankhwar,Rajesh Khatri,”Design of High speed Low Power Reversible Logic Adder Using HNG gate”,International Journal of Engineering Research and Applications ISSN:2248-9622,Vol .4,Issue 1,2014,pp.152-159 M.Arun,S.Saravanan,”Reversible Arithmetic Logic Gate(ALG)for Quantum Computation”,International Journal of Intelligent Engineering and Systems.Vol.6,No.3,2013