Controlled NOT Toffoli Gate The Toffoli Gate The

  • Slides: 13
Download presentation
 • Controlled NOT = Toffoli Gate

• Controlled NOT = Toffoli Gate

The Toffoli Gate • The Toffoli gate Q(3) is universal in the sense that

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.

Use of Toffoli Gate • From three-bit Toffoli-Gate Q(3) The first step is to

Use of Toffoli Gate • From three-bit Toffoli-Gate Q(3) The first step is to show that from the three-bit Toffoli Gate Q (3) we can construct an nbit Toffoli Gate Q (n). The n-bit gate works as follows: (x 1, x 2, …, x n-1, xn)==>(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: x 1 x 2 Q 4 from three Q 3 Scratch space

Simple Idea – Toffoli gate with any number of inputs • If we generalize

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 x 1 xn-1 xn xn z z@x 1 x 2 … xn-1 xn One can build Toffoli gate with 3 inputs Can one build Toffoli gate with n inputs? ? ? Of course, from many gates, but directly? ? ?

Simple Idea Karnaugh Maps • A 4 -variable Kmap. 0 0 1 0 1

Simple Idea Karnaugh Maps • A 4 -variable Kmap. 0 0 1 0 1 0 0 1 1 0

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

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

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

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

Simple Idea – build ESOP circuit from Toffoli gates w x y z 0

Simple Idea – build ESOP circuit from Toffoli gates w x y z 0 wx wx yz

Simple Idea • This idea can be generalized to: • Fixed Polarity Reed-Muller Expansions

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

Realizations of binary logic with Toffoli and reversible logic with Toffoli-like circuits • Kronecker

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)

AB C 0 1 g f A + 00 01 11 We use Davio

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

C g A B f A + * X + Y= C B +

C g A B f A + * X + Y= C B + * + C C f 1 B + 0 * C + X Y= C A C 1 + * A

What you have to remember 1. 2. 3. 4. 5. 6. 7. 8. 9.

What you have to remember 1. 2. 3. 4. 5. 6. 7. 8. 9. Toffoli gate equation and symbol. Kmaps for up to 5 variables. The concept of ESOP circuits. How to synthesize ESOP circuit from equation How to synthesize ESOP equation from Kmap. The concept of Mirror Circuit The concept of ancilla bit How to create large Toffoli gates from small Toffoli gates 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.