{"title":"Design of a comparator tree based on reversible logic","authors":"H. Thapliyal, N. Ranganathan, R. Ferreira","doi":"10.1109/NANO.2010.5697872","DOIUrl":null,"url":null,"abstract":"The ex<inf>i</inf>sting design of reversible n-bit binary comparator that compares two n-bit numbers is a serial design [1] having the latency of O(n). In this work, we present a new reversible n-bit binary comparator based on binary tree structure that has the latency of O(log<inf>2</inf>(n)). The reversible designs are based on a new reversible gate called the TR gate, the improved quantum cost of which is also derived in this work. In the proposed reversible binary tree comparator each node consists of a 2-bit reversible binary comparator that can compare two 2-bit numbers x(x<inf>i</inf>, x<inf>i</inf>−1) and y(y<inf>i</inf>, y<inf>i</inf>−1), to generate two 1-bit outputs Y and Z. Y will be 1 if x(x<inf>i</inf>, x<inf>i</inf>−1)> y(y<inf>i</inf>, y<inf>i</inf>−1), and Z will be 1 if x(x<inf>i</inf>, x<inf>i</inf>−1)<y(y<inf>i</inf>, y<inf>i</inf>−1). After careful analysis, we modified the logic equations of Y = x<inf>1</inf> ȳ1 ⨁ kx<inf>0</inf>ȳ<inf>0</inf> and Z =x̄<inf>1</inf>y<inf>1</inf> ⨁ kx̄<inf>0</inf>y<inf>0</inf> to Y = x<inf>1</inf>ȳ<inf>1</inf> ⨁ kx<inf>0</inf>ȳ<inf>0</inf> and Z = x̄<inf>1</inf>y<inf>1</inf> ⨁ kx̄<inf>0</inf>y<inf>0</inf>, respectively. The replacement of + operator with ⨁ operator without affecting the functionality of the design helped us in reversible mapping of the equations of Y and Z on the third output of the TR gate which is R=AB̄ ⨁ C. Further, TR gate can also efficiently generate functions such as x<inf>0</inf>ȳ<inf>0</inf> and x̄<inf>0</inf>y<inf>0</inf>. In the proposed reversible binary comparator, the leaf nodes will consist of 2-bit reversible binary comparators. Each internal node (2-bit reversible binary comparator) of the binary tree receives the partial comparison results from the left and the right children and propagates the 2-bit output of the comparison to its parent. Finally, the root node which is also a 2-bit reversible binary comparator generates the 2-bit result of the comparison of the n-bit numbers x and y to evaluate whether x>y or x<y. The 2-bit result of the root node are passed to the reversible output circuit designed from a Toffoli gate and 4 NOT gates to generate three signals O<inf>0</inf>(x<y), O<inf>1</inf>(x>y) and O<inf>2</inf>(x=y).","PeriodicalId":254587,"journal":{"name":"10th IEEE International Conference on Nanotechnology","volume":"42 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2010-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"75","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"10th IEEE International Conference on Nanotechnology","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/NANO.2010.5697872","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 75
Abstract
The existing design of reversible n-bit binary comparator that compares two n-bit numbers is a serial design [1] having the latency of O(n). In this work, we present a new reversible n-bit binary comparator based on binary tree structure that has the latency of O(log2(n)). The reversible designs are based on a new reversible gate called the TR gate, the improved quantum cost of which is also derived in this work. In the proposed reversible binary tree comparator each node consists of a 2-bit reversible binary comparator that can compare two 2-bit numbers x(xi, xi−1) and y(yi, yi−1), to generate two 1-bit outputs Y and Z. Y will be 1 if x(xi, xi−1)> y(yi, yi−1), and Z will be 1 if x(xi, xi−1)<y(yi, yi−1). After careful analysis, we modified the logic equations of Y = x1 ȳ1 ⨁ kx0ȳ0 and Z =x̄1y1 ⨁ kx̄0y0 to Y = x1ȳ1 ⨁ kx0ȳ0 and Z = x̄1y1 ⨁ kx̄0y0, respectively. The replacement of + operator with ⨁ operator without affecting the functionality of the design helped us in reversible mapping of the equations of Y and Z on the third output of the TR gate which is R=AB̄ ⨁ C. Further, TR gate can also efficiently generate functions such as x0ȳ0 and x̄0y0. In the proposed reversible binary comparator, the leaf nodes will consist of 2-bit reversible binary comparators. Each internal node (2-bit reversible binary comparator) of the binary tree receives the partial comparison results from the left and the right children and propagates the 2-bit output of the comparison to its parent. Finally, the root node which is also a 2-bit reversible binary comparator generates the 2-bit result of the comparison of the n-bit numbers x and y to evaluate whether x>y or x<y. The 2-bit result of the root node are passed to the reversible output circuit designed from a Toffoli gate and 4 NOT gates to generate three signals O0(x<y), O1(x>y) and O2(x=y).