Molecular logic gates: the past, present and future

The field of molecular logic gates originated 25 years ago, when A. P. de Silva published a seminal article in Nature. Stimulated by this ground breaking research, scientists were inspired to join the race to simulate the workings of the fundamental components of integrated circuits using molecules. The rules of this game of mimicry were flexible, and have evolved and morphed over the years. This tutorial review takes a look back on and provides an overview of the birth and growth of the field of molecular logics. Spinning-off from chemosensor research, molecular logic gates quickly proved themselves to be more than intellectual exercises and are now poised for many potential practical applications. The ultimate goal of this vein of research became clearer only recently - to "boldly go where no silicon-based logic gate has gone before" and seek out a new deeper understanding of life inside tissues and cells.


Introduction
Molecules respond to changes in their environment. The presence of various ions, neutral species, pH, temperature, and viscosity, among many others, result in colour or emission changes as a result of the complex interplay of many excited state processes and environmental parameters. Rapid growth in the diversity of fluorescent chemosensors following the works of de Silva, Czarnik, Valeur and Tsien in the 1980s laid the groundwork for the emergence of molecule-based logic gates. The clear ''off-on'' fluorescence response of PeT (Photoinduced Electron Transfer) based chemosensors in response to the addition of metal ions sparked the idea of the digital action of molecules, resulting in de Silva's landmark publication. 1 An anthracene derivative with two PeT modulator groups required the addition of both acid and sodium ions for the restoration of the full emission intensity of typical 9,10-disubstituted anthracenes. The alkylamino function and the benzo crown moiety are both independently capable of quenching the emission by an excited state electron transfer. This means that the molecule in solution behaves as an AND logic gate, with H + and Na + being ''inputs'' (Fig. 1) and the emission intensity as the output. In 2012 de Silva appraised the state-of-the-art for this area of research in an RSC Monograph on Supramolecular Chemistry entitled 'Molecular Logic-based Computation'. This book has now been translated into several languages, including Chinese and Japanese, demonstrating the large attraction and impact that this novel field of chemistry has created. We refer to this monograph to those readers who are interested in expanding their knowledge on molecular logic gate mimics and calculations that are beyond the scope of this Tutorial Review. 2 While the modulation of PeT provided clear ''off-on'' or ''on-off'' switching characteristics, colour changes in absorbance or emission, which typically accompany ICT (internal charge transfer) or related processes, increase the chances of signal generation dramatically. Unsurprisingly, the first explicit utilization of a colour change in molecular logic design published by Baytekin and Akkaya 3 demonstrated that multiple logic behaviours can be extracted from a single system by changing the wavelength of excitation and/or detection. With the recruitment of new photophysical processes, the hunt for chemical equivalents of all 16 Boolean logic operators started. More complex digital designs were soon to follow. Thanks to de Silva and co-workers, 1 molecules quickly learned how to add numbers.

Combinational logic gates
Simple molecular Boolean logic gates can be integrated to obtain more complicated combinational molecular gates, allowing a single molecule to process complex operations. It has been shown in the literature that combinational molecular logic gates can be used as a molecular calculator, which performs distinct arithmetic operations such as addition and subtraction; they can be designed as a molecular keypad lock for information safety or can be employed as fluorescence sensors for the detection of several metal ions.
The first molecular scale arithmetic was realized by de Silva and McClenaghan in 2000. 4 In their pioneering study, two separate compounds carrying calcium (Ca 2+ ) and hydrogen ion (H + ) receptor units were synthesized. The first design is a typical push-pull system and has an absorption maximum at 390 nm. Addition of Ca 2+ shifts the absorption signal to a shorter wavelength (hypsochromic shift), while protonation of quinoline results in a bathochromic shift through an intramolecular charge transfer process (ICT). The presence of both Ca 2+ and H + ions at the same time cancels the effect of the individual analytes, yielding no net shift in the absorption peak, which gives a similar peak at 390 nm as in the case of cation-free compounds. When the output signal is taken as transmittance, an XOR gate can be obtained with the first compound. The second compound behaves like an AND gate when Ca 2+ and H + are used as inputs and the fluorescence is viewed as an output. The compound is initially almost nonfluorescent as a result of PeT taking place from both the Ca 2+ and H + ion receptors. A fluorescence output at 419 nm can only be detected when the two receptors are occupied at the same time.
Operating XOR and AND gates in parallel yields a half-adder (2 inputs: Ca 2+ and H + ; and 2 outputs: carry and sum), capable of performing 2-bit binary additions (Fig. 2).
After the invention of molecular half-adders, Langford and Yann developed the first molecular half-subtractor using a porphyrin derivative in 2003. 5 The half-subtractor consists of combinational circuits and requires two inputs and generates two outputs, which are known as borrow (B) and difference (D). In a typical half-subtractor circuit, two Boolean logic gates namely XOR and INHIBIT operate simultaneously to perform a subtraction. In this study, an acid and a base are chosen as two inputs as the tetraphenylporphyrin (TPPH 2 ) absorption and emission profiles are highly dependent on pH. The absorption spectrum of TPPH 2 displays a strong Soret band at 417 nm and several low intensity Q-bands at higher wavelengths. Addition of an acid or a base causes a detectable red shift of the Soret band. On the other hand, when equimolar acid and base are added, the absorption peak resembles the parent TPPH 2 absorption. Transmittance at 417 nm is read as an output to generate the XOR truth table (Fig. 3). In the case of the INHIBIT gate, the fluorescence signal at 440 nm is viewed as the output, as the high emission intensity at that wavelength can only be observed upon addition of a base (Fig. 3). This study showed that a single compound could perform arithmetic operations just like digital computers.
Later, Akkaya and coworkers also combined two logic operations on a BODIPY-based molecule and designed another molecular half-subtractor, which can perform binary subtraction operations. 6 The compound has an absorption maximum at 565 nm and an emission signal at 660 nm. Deprotonation of the meso hydroxyl group by addition of a strong base (potassium tert-butoxide) activates the PeT and consequently quenches the fluorescence. Upon addition of HClO 4 , protonation of the dialkylamino moiety results in 40 nm and 100 nm hypsochromic shifts in absorption and emission signals respectively. In order to obtain a half-subtractor truth table, the inputs are chosen as acid and base and the outputs are viewed as fluorescence intensity either at 565 nm or at 660 nm. When the emission at 565 nm is followed, a strong fluorescence intensity can only be detected in the presence of acid, yielding an INHIBIT logic. On the other hand, an XNOR gate is generated when the emission at 660 nm is collected in a positive logic mode, which means Tony D. James that a significant emission intensity can be observed only if the two inputs are absent or present at the same time. In order to get a half-subtractor operation, the combination of INHIBIT (borrow) and XOR (difference) gates is needed. In this direction, the XNOR gate is switched to an XOR gate by just running the operation in a negative logic mode. Fig. 4 shows the truth table obtained with a molecular subtractor that can carry out an arithmetic operation.
Shanzer et al. reported several examples of molecular arithmetic functions using combinational logic gates. In 2004, a half-subtractor and a half-adder gate were successfully designed with a single molecule by arranging the two chemical inputs carefully and collecting the outputs as fluorescence at different wavelengths. 7 The molecule (siderophore) contains a fluorescein fluorophore connected to a pyrene with a linker unit and the   fluorescence output of the molecule is modulated by fluorescence resonance energy transfer (FRET) (Fig. 5). Irradiation of the pyrene under acidic conditions results in a characteristic blue emission of the pyrene core at 390 nm since the fluorescein is non-emissive and the FRET is off. Under basic conditions, fluorescein emission is activated, so that the FRET can take place from the donor pyrene to the acceptor fluorescein and green emission is observed at 525 nm. The third case is the addition of iron(III), which quenches the green fluorescence although the FRET is active. Importantly, the iron quenching is dependent on pH, such that the mono-anion fluorescein (slightly acidic conditions) shows no emission, whereas at higher pH it is possible to detect weak fluorescence from the iron-molecule complex as a result of further deprotonation of the fluorescein. A half-subtractor logic operation (cooperation of INHIBIT and XOR gates) is conducted with the iron-complex by monitoring the blue and green emissions and using acid and base as inputs. INHIBIT logic gate operation is observed by viewing the emission intensity at 390 nm or 525 nm. On the other hand, the XOR gate is realized by observing the fluorescence at 390 nm and 525 nm simultaneously. The same complex can be operated as a half-adder, by simply changing the acid input to ethylenediamine tetraacetic acid (EDTA). EDTA both protonates the fluorescein and removes the iron from the molecule, resulting in a pyrene blue emission. Addition of a base (sodium acetate) as a second input causes weak green emission, as the iron complex is not broken. Strong green emission at 525 nm can only be seen when two inputs, base and EDTA, are present. An INHIBIT gate is achieved by monitoring the fluorescence at 390 nm, and an AND gate is obtained by tracking the strong green emission at 525 nm. In another study, Shanzer and co-workers used a commercially available fluorescein fluorophore that can switch between a half-adder and a half-subtractor logic operation depending on the choice of inputs and outputs, and resets itself after each algebraic operation. 8 Fluorescein has four different protonation states with different absorption characteristics. At a pH below 2, cationic fluorescein is obtained, which has an absorption maximum at 437 nm. Around pH 3.3, neutral fluorescein is observed with a weak absorption at 434 nm. The mono-anion can be seen around pH 5.5 and has a broad absorption peak with two maxima at 472 nm and 453 nm. When the pH increases above 8, di-anionic fluorescein is formed that has a strong absorption at 490 nm. By choosing the absorption signals at 447 nm and 474 nm as outputs and introducing base and acid as inputs, a half-subtractor operation is achieved through neutral fluorescein. On the other hand, with the neutral fluorescein, a half-adder logic is constructed by reading the output as an absorbance signal at 447 nm and 501 nm, and using base (NaOH) as two inputs. Shanzer and coworkers extended their previous studies and realized 3-bit full addition and full subtraction arithmetic operations with a single fluorescein derivative 9 by introducing a third input (OH À ), named B in , resulting in the truth table of a full-subtractor (Fig. 6). Initially, the pH is adjusted to 3.3, which forces fluorescein to remain in its neutral form and the outputs are viewed as absorption signals at 474 (B out ) and 447 (D) as in the case of their former study. It is important to note that when B in is 0 (a-d) the truth table resembles the half subtractor, and when B in is 1 the output of the equation 0 À 1 À 1 (f) is the only output that cannot be detected with the molecular half subtractor. In that case, a highly basic environment triggers the formation of a fluorescein dianion, which has a strong absorption band around 474 nm and low absorption intensity at 447 nm (B out : 1, D: 0). Similarly, by adding OH À as an additional input (C in ) to their previously reported fluorescein based half adder, a full-adder truth table is constructed successfully. In this case, initially the pH is adjusted to below 2, yielding a cationic fluorescein, and outputs are viewed as absorption signals at 474 (C out ) and % transmittance at 447 (S). When C in is 0 (a-d), the truth table resembles the original half adder, and when the C in is 1, the output of the equation 1 + 1 + 1 (h) is the only output that cannot be detected with the molecular half adder. In that case, when all the inputs are high, a fluorescein dianion is generated, which has a strong absorption band around 474 nm and high % transmittance at 447 nm (C out : 1, S: 1).
Initial examples of molecular scale arithmetic applications and combinational logic operations mostly utilize pH-dependent modulation of the photophysical properties of well-known fluorophores and several push-pull systems. In 2010, Akkaya and coworkers designed and synthesized a BODIPY-based half-adder, in which the inputs are chosen as metal ions such as zinc and mercury (Fig. 7). 10 The parent BODIPY core that carries the zinc and mercury selective ligands has an absorption peak centered at 698 nm. Addition of zinc and mercury ions individually shifts the absorption maximum to 675 nm, whereas co-addition of these metals results in a more pronounced blue shift (630 nm) as a result of the ICT-type modulation of the excited state. When the output is viewed as an absorption signal at 623 nm, an AND gate is obtained. On the other hand, when the second output is chosen as absorption at 664 nm, an XOR gate is generated (Fig. 7). Simultaneous operation of AND and XOR gates built up a half-adder, which can carry out binary addition. In the same study, 2-input and 3-input AND gates were also introduced by the precise control of PeT and ICT mechanisms, in which metal ions were used as inputs.
Magri et al. introduced a 3-input anthracene-based AND logic gate, which hosts a sodium ion selective receptor (crown ether), an acid sensitive group (aminomethyl moiety) and a redox sensitive (ferrocene) (Fig. 8). 11 All of these three moieties are PeT donors and quench the fluorescence of anthracene effectively. The characteristic strong fluorescence of anthracene can only be detected when sodium, protons and Fe 3+ (as an oxidant) inputs exist together, yielding a 3-input AND gate. It is important to note that all the selected inputs are biologically significant, which makes it possible to employ the proposed molecular logic operation in cancer cell imaging and diagnosis applications.
Yoon and co-workers reported probe 1 as a fluorescent chemosensor for multiple tandem logic operations at the molecular level. 12 A Rhodamine B derivative, probe 1 bearing the dansyl moiety, a well-known FRET partner, was further connected to a tryptophan moiety. As shown in Fig. 9, the addition of Fe 3+ induced ratiometric and colorimetric responses via a unique dual FRET process. On the other hand, fluorescence quenching was observed with Hg 2+ . Other metal ions did not induce any significant changes in the absorption or emission. Different excitations, such as 290 nm for the indole moiety, 330 nm for the dansylamide moiety and 550 nm for the rhodamine moiety, were used to construct multiple logic gates. Upon excitation at 290 nm or 330 nm, strong green emission peaks at 510 nm were observed via the FRET process from the indole moiety to the dansylamide moiety. The addition of Fe 3+ induced new emission peaks via the ring-opening process of the rhodamine with the three individual excitations. The multiple logic gates and their corresponding truth value table are given in Fig. 9. Akkaya et al. extended their research on combinational logic operations by physically integrating two independent Boolean logic gates in solution to design more advanced and complex molecular processing systems. 13 Accordingly, two approaches are employed; the first approach is based on the inner filter effect and the second design is based on the excited state energy transfer process (Fig. 10). Thionine plays an important role in the first design. Thionine has a deep purple color with an absorption maximum at 590 nm. It is known in the literature that it can be reduced photochemically by irradiating the thionine solution with white light in the presence of ascorbic acid, yielding a clear and transparent solution. The first AND gate based on thionine is constructed using white light and 560 nm light as inputs and the output is chosen as 560 nm light.  The output can only be detected when the white light, which makes the solution clear, and 560 nm irradiation are turned on. The second independent AND gate is a BODIPY-based Zn 2+ sensor, which is almost non-fluorescent prior to Zn 2+ addition because of PeT and has an absorption peak centered around 560 nm. The output of the second AND gate is the emission of the Zn 2+ sensor at 580 nm and the inputs are Zn 2+ and the 560 nm light transmitted from the first AND gate (the output of the first gate). When two gates are placed into the same solution the output of the first AND gate triggers the operation of the second gate in conjugation with Zn 2+ to yield emission at 580 nm (Fig. 10, design 1). In their second design, the same Zn 2+ sensor that was used to build up the first AND gate is now used with the same inputs (Zn 2+ and 560 nm); however, this time the output was chosen as the excited state energy transfer, which is captured by the BODIPY-based Hg 2+ sensor and activates the emission of the Hg 2+ probe in combination with the added mercury ion (Fig. 10, design 2). These two separately operating molecular logic gates are clicked together so that they are in close proximity for efficient energy transfer.

Sequential logic gates
Conventional molecular logic gate designs involve simple Boolean logic gates and several more complex operations such as adders-subtractors and multiplexers-demultiplexers. In all of these molecular circuits, the outputs depend only on the current inputs. In the case of sequential logic operations, the outputs are functions of both present and previous inputs. Thus, sequential circuits require a memory function in order to remember the outcome of the previous input. The memory element is also known as a feedback loop as it connects the past output that is generated by the previous input to the present input. Sequential logics are key elements in electrical circuits and molecular analogues of this operation have been demonstrated during the last two decades. Raymo and co-workers designed one of the first molecular sequential logic operations in 2003 by the communication between two separate molecular components using a chemical signal (Fig. 11). 14 One of the components is colorless spiropyran (SP), which switches to yellow-green merocyanine upon protonation. Merocyanine releases a proton and switches back to colorless spiropyran upon visible light irradiation. The other component is the 4,4 0 -pyridylpyridinium monocation (BI) that can capture a proton and generate a 4,4 0 -pyridylpyridinium dication (BIH). When equimolar SP and BIH are mixed in a solution, BIH transfers a proton to SP and triggers the formation of MEH in the dark. Re-equilibration can be achieved after 1 day under dark conditions. However, once the MEH is formed, it can be switched to SP in just 15 minutes by visible light irradiation. During the transition of MEH to SP, a proton is released and it  is used to regenerate BIH. This communication cycle was monitored by both absorption signals and differential pulse voltammograms. The remarkable time difference between two operations makes it possible to implement a memory effect into the circuit, which is the characteristic element of a sequential logic operation. Accordingly, the change that is observed by light irradiation can be memorized and retained for at least 11 hours in the dark. When the input is chosen as the visible light and the output is read as electrical current, upon irradiation (input is on (1)), the output can be either below the threshold (0) or above the threshold (1) for 11 hours as a result of memory function. Thus, the input by itself is not sufficient to control the state of the output. There are also sequential events contributing to the input in order to generate the observed outputs. These are the characteristics of a sequential circuit. Shanzer et al. used a previously reported molecule (siderophore) (Fig. 5a) to design a molecular keypad lock, 15 which mimics the very well-known electronic keypad locks that are widely used to restrict the accessibility of valuable data or objects. Electronic keypad locks can be opened only if the password is known, which is also the case in molecular keypad locks. This means that appropriate combination of inputs is not enough to operate a Boolean logic; what is also needed is the introduction of inputs in a correct order to run the logic operations and unlock the molecular locks. Fig. 12 presents the five possible fluorescence outputs (A to E) in the presence of different inputs such as acid, base, iron(III) and EDTA. The first molecular keypad is constructed as an AND gate observed as the transition from the iron complex in ethanol (B state) to a green-emitting D state. This transition can be achieved through two pathways: (i) addition of the base first, which is followed by the addition of EDTA to remove the iron, and (ii) addition of EDTA first and then addition of a base. Both routes give the same output, which is the strong green emission at 525 nm. However, the chelation of iron with EDTA in basic medium takes a longer time compared to direct addition of EDTA into the siderophore before treating the solution with a base. Thus, it is possible to convert a conventional 2-input AND gate into a 2-input-priority-AND logic using the sequential addition of EDTA and a base. This creates a password, EB (E stands for EDTA and B stands for base), that is needed to unlock the molecular keypad lock. In the same study, another molecular keypad lock with a 3-letter password was designed in order to improve the security level of the molecular lock. To do so, an additional input, which is the UV light, was incorporated into the operation. The output, which is again the fluorescence at 525 nm, can only be detected when the inputs are added in the order of EDTA, base and UV irradiation, resulting in a more complicated password, EBU. This work demonstrates the first use of molecular logic gates to design a keypad lock at the molecular scale. Molecular keypad lock designs have attracted great attention as they offer a platform in which sophisticated logic operations can be applied at the molecular level. More complex logic operations have also been introduced in the literature in order to get more complicated passwords. To that end, Ng and coworkers reported a coumarin-rhodamine conjugate that can be bound to several metal ions. 16 In particular, Cu 2+ has a strong binding to the conjugate with a binding constant of B1.6 Â 10 8 M À1 . Another important observation is the sequential binding of Hg 2+ to the coumarin moiety and then the rhodamine group with binding constants of B3.7 Â 10 7 and B2 Â 10 6 respectively. Dual binding that is observed upon Hg 2+ addition decreases the emission intensity of coumarin at 460 nm and activates the rhodamine fluorescence (580 nm) by triggering the ring opening on the rhodamine. Based on these observations a sequential AND logic gate was constructed in which the Cu 2+ and Hg 2+ are two inputs and the rhodamine fluorescence is the output. When 0.5 equivalent of Hg 2+ is introduced, the amount is not enough to activate the rhodamine fluorescence. Upon addition of 1 equivalent of Cu 2+ , it replaces the Hg 2+ as it has greater affinity for the receptor and the removed Hg 2+ ions are bound to rhodamine, which results in a remarkable increase in fluorescence. The system was improved by the addition of an extra input (S 2À ), and an output at 445 nm. This creates the password HCS (Hg 2+ , Cu 2+ , S 2À ) as the inputs have to be in particular order in order to observe the two outputs. Further addition of the fourth input, light irradiation at 365 nm, gives a more complicated password, which is HCSL (L: light). Yao and Shi also introduced several basic and combinatorial molecular logic operations based on DNA hybridization and reaction between small molecules. 17 Moreover, they used their logic operation library to design a biocomputing keypad lock system.  Li and coworkers reported another example of a molecular sequential logic circuit by immobilizing a porphyrin derivative onto a mesoporous silica film (Fig. 13). 18 The porphyrin derivative can switch between neutral and protonated states depending on the pH. The protonated state is defined as state ''0'' and has an absorption maximum at 444 nm. On the other hand, the neutral porphyrin is assigned as state ''1'' with its strong absorption peak centered at 416 nm and an emission maximum at 646 nm. The fluorescence at 646 nm is not observed when the porphyrin is protonated. Using this photophysical behaviour, a 1-input feedback loop is generated. The initial state is chosen as neutral porphyrin (state 1), and when the porphyrin carrying film is immersed in HCl solution, the absorption maximum is red shifted to 444 nm and state 0 is generated. The output is stored into the memory and fed back to the next state, as washing the film with ethanol and deionized water cannot change the state to 1. In order to regenerate state 1, the film is immersed into a NaOH solution, washed and dried, yielding a blue shift in absorption and an increase in emission intensity at 646 nm. Since state 1 can only be accessible upon base treatment, the operation is named a set operation. After treating the film with a basic solution, a reset operation can be employed by just washing the film with an acidic solution. Consequently, once state 0 is generated, it cannot be switched back to state 1 without addition of a base. This operation is basically a 2-input Set/Reset (SR)-latch gate with two chemical inputs (acid and base) and two outputs (absorption at 416 nm and 444 nm) (Fig. 13). The truth table of an SR latch is given in Fig. 13.
Similarly, van der Boom and co-workers extended their studies to design a 1-input sequential logic and a 2-input SR latch operation by covalently fixing an osmium poypyridyl complex onto a solid substrate. 19 In the case of 1-input operation, Cr 6+ ions are used as an input and the output is chosen as the oxidation state of osmium and assigned to 0 for Os 3+ , and 1 for Os 2+ . Os 3+ can only be obtained when the initial state is 1 (Os 2+ ) and Cr 6+ is present. As the osmium complex is immobilized on a substrate, each oxidation state can be stored or memorized even after removing the chemical input, yielding a memory function. In the case of 2-input SR latch operation, an additional input Co 2+ is employed to satisfy the set function and Cr 6+ is used as a Reset tool. The output is read as a metal-to-ligand chargetransfer band at 496 nm of the complex. The input of Co 2+ favours the formation of Os 2+ and preserves the output alternatively, and the reset operation with Cr 6+ forms Os 3+ and stores state 0.

Chemical logic gates in biological media
Molecular logic gates are supposed to provide a greater density of transistor arrays compared to their conventional electronic counterparts and in some cases provide additional properties like configurability and parallel computing. However, even after their initial proposal, they are still far from replacing the conventional transistors. Most of the existing molecular logic gates require wet conditions to perform; hence, a revolutionary adaptation of hardware is necessary and they have a number of other limitations (such as input-output homogeneity). One immediate use of molecular logic gates would be perhaps in a biomedical arena, which does not necessarily require input-output homogeneity in practice. Requiring a wet platform in order to function, most existing molecular logic gates can be used to process chemical/biochemical information, which is suitable for, e.g., accurate diagnostic and/or personal therapeutic applications. Biological processes are connected by various chemical, electrochemical and supramolecular reactions/interactions with information processing and complex feedback loops taking place. In fact, the multi-parameter nature of bioprocesses (including diseases), which all take place in a biological soup of reaction mixtures with a certain degree of compartmentalization, requires a higher order control over these processes and feedback loops are the prefect target for logic gate systems. The aim of the logic gate can be to control these processes or to diagnose a certain stage of a disease. Multiple parameters can be used as inputs for a molecular logic gate and useful outputs such as fluorescence and/or drug release can be obtained. The first direct application of molecular logic gates in biological media was biosensing. The de Silva group extended their first PeT-based system to develop an OR logic gate for Ca 2+ and Mg 2+ sensing. 20 Multiple logic gate operations including concatenated gates with biocatalytic cascades have been studied by the Katz group. 21 Multianalyte sensing is an arena where molecular logic gates can fulfil important roles. This type of sensing would allow detection of more than one analyte simultaneously and using the multiple outputs of a gate and can eliminate false positive results by considering more than one diagnostic parameter at once, thus improving the accuracy of the diagnosis. Logic gates can be used to selectively monitor a certain analyte in a certain region of the body/cell by processing the information regarding the analyte of interest and the regioselective marker with a single molecular processor. A two-input AND molecular logic operation was recently proposed by the Glass group as a regioselective biosensor (Fig. 14). 22 This group developed several sulfonamide functionalized coumarin-3-aldehydes to sense amine bearing neurotransmitters (glutamate, norepinephrine, dopamine and serotonin) following their exocytosis into the synaptic cleft. Sulfonamide moieties with optimized pK a values are expected to be deprotonated readily upon release to the synaptic cleft where the pH increases to a value of around 7.4 when compared to pH 5.0 of the vesicles. This deprotonation results in a 50 nm bathochromic shift in the absorption spectrum of the coumarin dye. Imine formation with the amine moieties of the neurotransmitters and the aldehyde group of the coumarin shifts the absorbance by an additional 40 nm accompanied by an enhancement in fluorescence. This is because of the improved ICT character of the deprotonated sulfonamide. Thus, pH 7.4 and amine-bearing neurotransmitters are necessary to allow excitation of the dye at the selected wavelength and to observe notable fluorescence. Therefore, the sensor that is not bound to the neurotransmitter and the sensor that is bound to the neurotransmitter but still within the vesicle can successfully be eliminated. The Glass group also published a threeinput AND logic gate with a structurally similar fluorophore that contains a pH responsive sulfonamide and a formyl group for imine formation with glutamate. Zn 2+ was chosen as the third input because of its important roles in neural activity. In their study, coordination of Zn 2+ to the imine and carboxylate unit of the glutamate further increased the fluorescence of the dye. 23 Although probes were not tested within neurons, the idea of using a logic gate for selective monitoring of a certain analyte with spatial resolution and/or during an important biological process such as exocytosis is an innovative idea.
Margulies et al. developed a combinatorial single molecule sensor, which can detect the concentration of certain drugs in human urine samples. 24 In another study, AND gate controlled dual sensing of H 2 O 2 and Hg 2+ in the same biological media was achieved through orthogonal reactions catalysed by the two analytes using bis(dimethylthiocarbamate)-derivatized fluorescein in SH-SY5Y neuroblastoma cells (Fig. 15). 25 Hg 2+ mediated conversion of thiocarbamate to carbamate is followed by an addition-elimination reaction using H 2 O 2 . These tandem reactions resulted in a 100-fold increase in the fluorescence of the probe. In a different research study, a thienyl-BODIPY dye was used to detect superoxide radicals in the presence of Hg 2+ . Hg 2+ coordinates to pyridyl sulfide and thienyl bearing receptors, improving the rigidity and thus the fluorescence quantum yield of the probe. 26 Oxidation of sulfide by superoxide further enhances the fluorescence. Even though the probe cannot be investigated in a neuroblastoma cell line in the presence of both inputs due to the chelation of Hg 2+ by cellular thiols, in vitro analysis demonstrates a dual AND logic response of the sensor. A dual-enzyme responsive fluorophore was designed by Prost and Hasserodt in order to achieve tissue specific imaging. 27 Two linkers, para-hydroxybenzylcarbamyl and aminomethyl piperidine, which are responsive to b-galactosidase and leucine amino peptidase, respectively, were attached to the silent fluorophore core. Orthogonal elimination and cyclization reactions mediated by these enzymes through an AND logic operation generates fluorescent microcrystals that can be easily visualized in C17.2 cells.
Shapiro and colleagues developed a nucleic acid-based autonomous molecular computer in 2004 by combining the multiparameter diagnosis of small cell lung carcinoma and prostate cancer with drug release. 28 Disease specific up-and down-regulation of diagnostic mRNAs are processed by the automaton and in a stochastic way either the drug (antisense ssDNA for the MDM2 protein) or the drug suppressor is released. Since the concentrations of four different mRNA species are considered and the level of each mRNA determines the probability of drug/suppressor release, fine tuning of the therapeutic concentration is obtained in accordance with the diagnostic information. Similarly, multiple microRNAs processed by Boolean logic operations are used to initiate apoptosis in HeLa cells by the Weiss and Benenson groups. 29 The Church group   (Fig. 16). 31 Three electron-withdrawing CO coordinating to Mn(I) results in quenching of the dansyl fluorescence. Upon illuminating with light or oxidation with hydrogen peroxide, three of these CO molecules are released, restoring the dansyl emission at 514 nm. CO release was detected by following the change in the absorption of myoglobin as the protein takes up the released CO. Logic gate behavior was demonstrated in HCT116 colon cancer cell lines. Overall, the molecule exhibits the behaviour of two OR gates with fluorescence and CO as output signals. Since CO is known to have an important cellular role including activity during anti-inflammation, controlled release of this gas molecule via a logic operation would enable regulation of associated biochemical pathways.
A different CO-release system with a sequential AND logic gate was introduced by the Berreau group. 32 An acryloyl-derivatized flavonol is used to build sequential gates. The Michael addition reaction takes place between an acryl moiety and biological thiols (especially cysteine), which is then followed by an intramolecular cyclization reaction (Fig. 17). The reaction can easily be monitored by the bathochromic shift in the emission spectrum due to the  excited-state intramolecular proton transfer (ESIPT) taking place in the product. The newly generated product, but not the starting flavonol, reacts with oxygen when illuminated with visible light and generates CO. This is accompanied by a bathochromic shift in absorption and emission spectra. The reaction proceeds at different rates under hypoxic (1% oxygen) and normoxic (20%) conditions. In summary, the compound is activated sequentially by thiol and then oxygen, resulting in two concatenated AND molecular logic gates. The authors highlight the importance of sequential gates for such applications since they minimise false positive results by releasing the bioactive compounds in a well-defined reaction sequence.
Functionalization of a single molecule to have both biological activity, multi-analyte response and a molecular information processing ability, is challenging. Akkaya et al. developed several Boolean logic-gate operated activatable photodynamic therapy agents. Photodynamic therapy is a non-invasive method that relies on the photoactivated generation of singlet oxygen ( 1 O 2 ), which leads to cell death through oxidative damage. Although this method is non-invasive due to the region specific use of light, it is important to improve the site selectivity of the therapy to give minimum harm to neighbouring healthy tissue. The Akkaya group selected two tumour associated marker inputs and designed an AND gate to control the activity of the photosensitizer (PS). High Na + and low pH are reported to be associated with certain cancer types. A BODIPY photosensitizer bearing a crown ether and pyridine in the structure produces 1 O 2 inefficiently when excited at 660 nm with a LED light source due to its low extinction coefficient at this wavelength and competing photoinduced electron transfer (PeT) taking place from the crown ether moiety (Fig. 18a). 33 However, by shifting the absorption spectrum of the photosensitizer using protonation of the pyridine to the wavelength of the LED used in the experiment and by blocking the PeT pathway by the binding of the sodium ion to the crown ether, the PDT activity is enhanced significantly. This proof of concept study demonstrates that a prodrug can be activated in order to achieve personal therapy by means of multiple input control gates, where inputs are chosen to be associated with a certain disease. Similarly, the same group developed an activatable PS that can function under more biologically relevant conditions (i.e. appropriate concentrations of disease-related inputs). For this purpose, the group developed a PS that has a pH responsive 4-hydroxy-3-nitrophenyl styryl moiety with a pK a value 6.92 (Fig. 18b). 34 At near neutral pH, this group is mostly deprotonated having an absorption spectrum that has low absorptivity at the wavelength of the excitation light.
Upon protonation at the relevant pH, the absorption spectrum changes and the PS can be efficiently excited. On the other hand, an energy acceptor is attached to the PS through a disulfide bond. Due to the energy transfer, the excited PS cannot transfer energy to molecular oxygen and therefore generate 1 O 2 in the presence of this fluorophore. In the presence of another tumour marker, glutathione (GSH), the disulfide bond is reduced to the thiol and the PS is liberated as a result. Hence, the presence of both acidic media and GSH is necessary for efficient generation of 1 O 2 , in the guise of an AND logic gate.
Akkaya and co-workers extended their research of activatable photosensitizers using more complex logic operations to include imaging elements and therapeutic outputs. A functionally sophisticated photosensitizer-fluorophore adduct was synthesised to work as a demultiplexer (DEMUX) logic gate, which selects between fluorescence and therapeutic outputs (Fig. 19a). 35 This theranostic device is made up of two modules: one pyridine bearing photosensitizer and one N,N-dimethylaminophenyl bearing fluorophore. Under neutral pH, energy transfer takes place from the photosensitizer module to fluorophore module as the emission spectrum of the former overlaps well with the absorption spectrum of the latter. Energy transfer silences the PS and fluorescence of the FL module is observed. However, once acid is added into the media both the pyridine and N,N-dimethylaminophenyl moieties are protonated. Upon protonation, each module has a different ICT character such that PS undergoes a bathochromic shift and the FL undergoes a hypsochromic shift in both the absorbance and emission spectra. This adverse behaviour results in a change in the direction of energy transfer. The new energy acceptor is the PS, which is activated by the change in the direction of energy transfer and produces 1 O 2 efficiently, whereas the fluorescence of the new donor, FL, is quenched. Thus the acid (a tumour marker) acts as an input for the logic gate and selects between therapy ( 1 O 2 generation) and fluorescence imaging (at 715 nm).
Integration of multiple logic gates to construct molecular computers is particularly challenging mainly due to the inputoutput inhomogeneity of the logic gates currently used. The problem is not necessarily a concern for logic gates used for biological applications. Since the logic gates do not usually need to be reversible and chemical and optical inputs and/or outputs can both be used simultaneously. A smart functional integration of logic gates with potential biological use was demonstrated by the Akkaya group. 36 An acid activatable photosensitizer was concatenated with an activity reporting unit; therefore the activity of an activatable PS can be monitored (Fig. 19b). The first gate is an AND gate (Gate 1) in which photosensitizer Gate 1 (similar to the PS described in Fig. 18b) is used and 1 O 2 is generated only when the medium is acidic enough to protonate the 4-hydroxy-3-nitrophenyl group and the sample is exposed to light. The second information processing unit (Gate 2) is an energy transfer system in which the donor and acceptor modules are linked together using an 1 O 2 reactive (Z)-1,2-bis(alkylthio)ethene bridge. The 1 O 2 produced by the first gate reacts with Gate 2 through the formation of a dioxetane bridge and the subsequent reaction liberates the donor module of the gate. As the donor is no longer near the acceptor its emission is enhanced significantly. For the same molecules using GSH instead of light, a well-known singlet oxygen scavenger, an INHIBIT gate with these second input combinations, is obtained. Overall, the activity of the first PS is controlled by an AND gate with tumor related parameter acid and light, and the activity of the PS is monitored by the second gate by concatenation of the gates and using the output of gate 1, 1 O 2 , as an input in the second gate to obtain fluorescence. An early example for the use of molecular logic gates in drug activation was reported by the Shabat group. 37 The doxorubicin drug is attached to two enzyme responsive units using a selfimmolative linker (Fig. 20). The cleavage of the terminal enzyme responsive units by any of the enzymes (catalytic antibody 38C2 or Penicillin G Amidase (PGA)) results in the formation of a free amine. Spontaneous cyclization followed by 1,6-elimination of the 4-hydroxy benzyl alcohol moiety liberates the active doxorubicin drug. Since any of the two enzymes can initiate the reaction cascade, the overall system reads as an OR gate. Significant growth inhibition was observed when two different cell lines (MOLT-3 and HEL) were treated with the caged Dox in the presence of any of the enzymes. Andréasson and colleagues used photoactive spiropyran that displays acid and UV light dependent DNA intercalation. 38 An AND molecular logic gate is obtained as UV induced generation of the open merocyanine form and the protonation of phenol results in a cationic derivative with enhanced DNA binding, which is measured by flow oriented linear dichroism.
Nanoparticles are also widely used for the biomedical application of logic gates. Although the system is not molecular by      (Fig. 21). 40 An ammonium bearing unit threaded with cucurbit [6]uril (CB [6]) was used to gate the pores in the form of a pseudorotaxane. Deprotonation of the ammonium with a base (NaOH, first input) weakens the interaction with the CB and the gate is opened. In addition, azobenzene units attached within the core of the particle are photoisomerized between cis-trans configurations resulting in a wagging motion, helping the loaded guest to be released from the pores of the nanoparticle. Both 448 nm light and base are necessary to achieve sufficient release of the guest, which makes an AND logic gate. ClRe-(CO)3-2,2-bipyridine was used as the fluorescent guest molecule to follow the release in this work but in theory any drug or indicator can be used.

Miscellaneous applications
Key biological applications such as chemical sensing, drug activation, molecular arithmetic, and construction of memory devices have been mentioned in the previous sections. Information processing by small molecules opens up the door for an even wider range of applications, some of which require creative thinking. 41 Among such applications, a complex macroscopic task was achieved by the de Silva group using small molecules, for edge recognition and outline drawing. Several pH responsive fluorophores and a photoacid generator were used (Fig. 22). 42 The fluorescence of the chromophores F1-F3 was initially quenched by either twisted intramolecular charge transfer or photoinduced electron transfer from the nitrogen lone pair. The photoacid and the chromophore were then absorbed onto a filter paper in the presence of Na 2 CO 3 at pH 9.2. A mask was then used to protect a certain region of the filter paper. When the paper was irradiated with 254 nm light, the photoacid generates H + ions, which protonate the chromophores and blocks the intramolecular quenching pathway. As a result, the irradiated areas fluoresce, whereas regions that are shielded by the mask remain dark. However, over time, the 2-(phenylthiol)biphenyl byproduct accumulates in the media, which acts as an intermolecular quencher. The fluorescence of the chromophore shows an off-on-off behaviour in the unmasked region as the byproduct accumulates. The authors relied on the fact that H + ions diffuse more quickly than the larger quencher molecules in order to detect the edge of the object. As the H + diffuses from the unmasked region into the masked one, chromophores of the region light up by protonation, so the edges become apparent.
For this system, 1 mm edge recognition was obtained for 30 min of irradiation. The behaviour of the chromophores is that of an XOR logic operation. Subsequently, the authors managed to draw outlines of drawings with fine curvatures using this method. 43 In living organisms, the mechanisms namely diffusion and production of inhibitors and/or activators are widely used to form patterns, develop body segments or generate oscillatory reactions.
Although it is a complex task, small molecules can serve as tools to achieve such goals, as demonstrated by the de Silva group. Yoon and Park and co-workers reported 44 the first example of molecular logic gates in a microfluidic device. For example, fluorescein derivative 1 (Green) and rhodamine B derivative 2 (Red) were utilized as pH sensors. Probe 1 showed strong fluorescence at neutral pH; on the other hand, probe 2 displayed strong emission at acidic pH, which were demonstrated in the microfluidic device as shown in Fig. 23. These outputs were applied to XOR and AND gates, respectively, to construct a ''half-adder'' molecular logic gate. In the same paper, the authors also demonstrated an INH logic gate using another fluorescein derivative. The addition of Cu 2+ induced fluorescence quenching and the fluorescence was revived when transferrin (Tf), a copperbinding protein, was added. Molecular logic gates in microfluidic systems can offer a couple of important advantages, such as unprecedented automation with reduced reagent consumption and high throughput.
The development of molecular logic gate systems, or arrays that can operate within, or from the surface of a material, has recently been recognised as being an important stepping stone towards some real applications of molecular logics. This has been addressed by several research groups in the last few years, including Gunnlaugsson, Bradberry and co-workers who have developed two examples of such systems, based on the use of lanthanide luminescence (Eu(III) and Tb(III)) and ligand-centred emissions as the outputs. 45,46 These systems represent one of only a few examples to date for the use of 4f ions as reporters/ outputs in molecular logics. In the former, Fig. 24, the two types of Ln(III) complexes were employed within a poly(HEMA-co-MMA) gel material, with the logic gate inputs being either a proton or a fluoride, and the output being the emission centred at three different wavelengths (occurring within two different time-domains). The incorporation of these complexes within a polymer organogel gave emission changes within the microenvironment in response to both [H + ] and [F À ] inputs, which could be described as mimicking the logic circuit of Reverse-IMPLICATION-TRANSFER-NOR, with these being identical to what was observed when the logic operations were monitored in solution alone.
In the second example, cyclen based Eu(III) and Tb(III) complexes, possessing quinolone moieties, were developed possessing an alkyl spacer with a terminal thiol, which was used to graft these complexes, Fig. 25, onto the surface of 5 nm gold nanoparticles (AuNPs). As in the previous example, the emissions from the lanthanide centres were employed as the outputs; this design gave rise to multi-stimuli responsive luminescence from both Eu(III) and Tb(III). Unlike that discussed above, where all ionic inputs were used, this type of design relied on both the use of ionic and chemical inputs, in the form of pH and the use of non-covalently bound sensitising antennae (4,4,4-trifluoro-1-(naphthalene-2-yl)-butane-1,3-dione (nta) and 4-(dimethylamino)benzoic acid (DMAB), respectively). This work demonstrated that using a 1 : 1 mixture of Eu(III) : Tb(III) AuNPs, the system was highly sensitive to changes in both pH and the nature of the antennae (identities which were used to generate ternary complexes in solution). The outcome allows for the construction of two logic circuits: the XOR-NAND halfsubtractor, with [H + ] inputs, and the TRANSFER-INHIBIT circuit which relied on the nature of the ternary complex formation. The XOR-NAND circuit was shown to be reversible and reusable, while unfortunately, the TRANSFER-INHBIT circuit could not return from the (1,1) state.
As discussed previously for many applications input-output inhomogeneity in logic operations is a concern. Therefore, it is pleasing to report that in recent years all possible photonic molecular logic gates have been reported by the Gust, Andréasson and Pischel groups, which certainly expand and improve the application area of molecular information processing. [47][48][49] Several other sophisticated molecular keypad lock systems 50 have also been reported following the pioneering studies discussed in the previous sections. The Margulies group reported an improved version of the system, which can have repeating codes such as This journal is © The Royal Society of Chemistry 2018 (111) using concentration dependent output differences. 51 A supramolecular information protection was also described by the Pischel group using photodimerization of anthracene within the cucurbituril cavity. 52 In 2017, the Dube group designed a photoswitch that can be photoisomerized by green and red light and then used their system to run complex logic operations, including a molecular keypad lock system with a high level of security in the presence of acid as an additional input. 53

Conclusion and outlook
With more than two decades since de Silva's seminal paper, we can look back on the field of molecular logic gates and observe