Basics of Reversible Logic Gates
Basics of Reversible Logic Gates
Landauers Principle
In 1961, Landauer was considering the smallest amount of heat generated per bit processed in computation. He made several discoveries and innovations. He introduced the distinction of logical and physical irreversibility. A logically irreversible process is defined to be one that cannot be logically reversed, i.e. undone by reversing the flow direction of computation. He noted that a physical implementation of a logically irreversible process must be physically irreversible (i.e. cannot be undone or reversed to its prior physical state). A process is logically reversible if knowing the binary input to a logic gate, one can deduce the output and vice versa. (There is a 1 : 1 mapping between input bit string and output bit string (bijective ,math) e.g. of a logically reversible gate is the NOT gate. An example of a logically irreversible gate is the AND gate.
Landauers Principle
Knowing one has a 0 at the output of an AND gate does not allow one to deduce what the input was. This gate is logically irreversible. This is not surprising because there must be loss of information. The AND gate has 2 input bits and only 1 output bit. Information (one bits worth) has been destroyed! Landauer discovered (rather surprisingly) that the heat coming from computation was due to the destruction of information (wiping out bits of information) and not to the processing of bits. This is Landauers Principle. Landauer thought that since computers used logically irreversible gates, (I.e. typically NAND gates) that computing was inherently physically irreversible, and hence inevitably gave off heat.
This means that, if we forget the value of the input (A, B), knowledge of the output P is not sufficient to calculate backwards and to recover the value of (A, B).
AND
NAND
OR
NOR
XOR
A B X Y 0 0 0 0
0 1 0 1
1 0 1 1 1 1 1 0
Logically Reversible Gates A logically reversible gate must have the same number of inputs as outputs (why?)! Two of the most famous such gates are the Fredkin Gate and the Toffoli Gate, shown below. The Fredkin Gate is a controlled swap gate, i.e. if the control bit C is 1, then the two input bits A and B are swapped at the output. See the figure and the corresponding truth table.
C A B
C A B
CA B 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1
C A B 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 0 1 1 Truth table for the Fredkin Gate. If C=1, A and B swap, otherwise A and B go through unchanged.
The Toffoli Gate is often called a CCNot Gate, i.e. if the two control input bits are both 1, then the 3rd input is reversed. See the figure and its truth table on the next slide. The Toffoli Gate is an important gate in quantum computing as you know already.
C1 C2 A
C1 C2 A
0 0 0 T 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 If the two control input bits C1 and C2 1 0 0 1 0 0 of a Toffoli Gate are both 1, then the 1 0 1 1 0 1 input bit A reverses, else all 3 bits go 1 1 0 1 1 1 through unchanged. 1 1 1 1 1 0 Both gates are computationally universal, i.e. they can be used to generate AND, OR, NOT gates, which together form a computationally universal set of gates (i.e. they can be used to generate any Boolean function (i.e. a function that maps a set of M-bit input strings into a set of N-bit output strings). Ex. Show that these two gates are computationally universal.
C1 C2 A
C1 C2 A
Real-world Applications
Digital signal processing Cryptography Computer graphics Network congestion
Tomasso Toffoli, 1980: There exists a reversible gate which could play a role of a universal gate for reversible circuits.
z
A B
z xy
reversible
A XOR B
Toffoli Gate
y
z
It flips the third bit if the first two bits are 1 and does nothing else
Like the Toffoli gate, it is its own inverse (please prove these two facts)
Of course, a computer built of only this type of gate, even using quantum technology, would have the power of only classical computers
z xy
Sufficient motivation is also that reversible gates can be realized in many other technologies that already exist
It can be shown that a reversible circuit has as many input wires as output wires, and permutes the set of input values
The synthesis of a 2-bit reversible gate: (a) truth table, (b) three different implementations combining NOTs and CONTROLLED NOT. Figure gives a representative example of a 2-bit reversible gate, realized by combining NOT and CONTROLLED NOT gates.
Whereas output Q simply equals input B, output P can be described in three different ways:
P = NOT (A B) P = A (NOT B) P = (NOT A) B .
Note that:
neither the EXCHANGE R nor the NOT is a true 2-bit gate, but the CONTROLL ED NOT is one.
Table 4: The three generators of the 2bit reversible gates: (a) EXCHANGER, (b) NOT, (c) CONTROLLED NOT.
See Table 4
THANK YOU..!!