Presentation is loading. Please wait.

Presentation is loading. Please wait.

Controlled- Controlled NOTControlled- Controlled NOT = Toffoli Gate.

Similar presentations


Presentation on theme: "Controlled- Controlled NOTControlled- Controlled NOT = Toffoli Gate."— Presentation transcript:

1 Controlled- Controlled NOTControlled- Controlled NOT = Toffoli Gate

2 The Toffoli Gate The Toffoli gate Q (3) is universal in the sense that we can build a circuit to compute any reversible function using Toffoli gates alone (if we can x input bits and ignore output bits). It will be instructive to show this directly, without relying on our earlier argument that NAND/NOT is universal for Boolean functions. In fact, we can show the following: –From the NOT gate and the Toffoli gate Q (3), we can construct any invertible function on n bits, provided we have one extra bit of scratchpad space available.

3 Use of Toffoli Gate From three-bit Toffoli-Gate Q (3) Q 4 Scratch space Q 4 from three Q 3 The first step is to show that from the three-bit Toffoli Gate Q (3) we can construct an n- bit Toffoli Gate Q (n). The n-bit gate works as follows: (x 1,x 2,…,x n-1, x n )==>(x 1,x 2,…,x n-1 y@x 1 x 2 …x n-1 ) The construction requires one extra bit of scratch space. For example, we construct Q (4) circuit from Q (3) circuits as follows: x1 x2

4 Simple Idea – Toffoli gate with any number of inputs If we generalize the Toffoli Gate, we can realize any binary function in a very efficient way One can build Toffoli gate with 3 inputs Can one build Toffoli gate with n inputs?????? xn z z@x1 x2 … xn-1 xn xn-1 x1 Of course, from many gates, but directly???

5 Karnaugh Maps A 4-variable K- map. Simple Idea 0 0 1 0 1 1 0 1

6 SOP Cover Simple Idea 0 0 1 0 1 1 0 1

7 ESOP = Positive RM cover Simple Idea 0 0 1 0 1 1 0 1 F=wx @ yz

8 Simple Idea – build ESOP circuit from Toffoli gates wxyzwxyz 0 wx wx  yz

9 Simple Idea This idea can be generalized to: Fixed Polarity Reed-Muller Expansions Generalized Reed-Muller Expansions Exclusive Sum of Products Galois Sum of Galois Products Expansions Boolean Ring based logic Min-Modsum based logic Any Quasi-Group based logic Arithmetic Logic

10 Realizations of binary logic with Toffoli and reversible logic with Toffoli-like circuits Kronecker functional Diagram (uses Davio expansions and Shannon Expansions) Kronecker function-driven Diagram ESOP DSOP (disjunctive SOP = Disjunctive ESOP)

11 * + * + A B B A fg X Y= C + 1C  C C 00 01 11 10 0 1 AB C 00 01 11 10 0 1 AB C 00 01 11 10 0 1 AB C 0 1 1 0 1 1 0 00 01 11 10 0 1 AB C 0 1 f A’ X=f A’  f A 00 01 11 10 0 1 AB C 1 0  C C f B’ 00 01 11 10 0 1 AB C f B’  f B 0 1 Graphical method to calculate decision diagram from Toffoli gates We use Davio expansions Use Toffoli gates to realize Davio expansions

12 * + * + A B B A fg X Y= C + 1C  C C * + * + A B + C + 0 f  C C 1C A X

13 What you have to remember 1.Toffoli gate equation and symbol. 2.Kmaps for up to 5 variables. 3.The concept of ESOP circuits. 4.How to synthesize ESOP circuit from equation 5.How to synthesize ESOP equation from Kmap. 6.The concept of Mirror Circuit 7.The concept of ancilla bit 8.How to create large Toffoli gates from small Toffoli gates 9.The concept of Davio Expansion realized in Toffoli gate. The concepts of Davio expansions and ESOP/DSOP circuits will be more elaborated in next lectures. Now you can just use their ideas for simple circuits.


Download ppt "Controlled- Controlled NOTControlled- Controlled NOT = Toffoli Gate."

Similar presentations


Ads by Google