Molecular logic and information processing is a research field in which molecules are designed to emulate functions conventionally performed by electronic hardware.^[@ref1]−[@ref3]^ While the latter is voltage controlled, the molecular versions are not being restricted by this boundary condition. Instead, the researcher can choose the inputs and the outputs freely, to fit the intended use.^[@ref4],[@ref5]^ Photonic and chemical (metal cations, DNA oligomers, acid/base, etc.) inputs enjoy preference, whereas the outputs are typically read by spectroscopic means (e.g., UV--vis absorption or fluorescence emission). The pioneering example was reported by de Silva in 1993.^[@ref6]^ An anthracene fluorophore equipped with two receptors was designed to display strong emission (output) only upon the presence of both Na^+^ ions and protons (inputs), implying the realization of the first molecular logic AND gate. Since then, more and more complex functions have been mimicked by molecule-based systems, often requiring a multitude of inputs and outputs.^[@ref7],[@ref8]^ Special attention has been given to the keypad lock, a device where not only the correct input combination matters but also the sequence in which the inputs are applied.^[@ref9],[@ref10]^ Hence, the keypad locks are so-called sequential logic devices. The first example of a molecular version was realized by Shanzer and Margulies in 2007.^[@ref11]^ Several alternative approaches have been presented, including systems with input combinations of all-photonic, all-chemical, or mixed character.^[@ref12]−[@ref18]^ In the all-photonic case, photochromic systems are *par excellence* candidates as the spectral changes required to perform the desired logic function are conveniently triggered by photonic stimuli. Photoswitches from several different photochromic families have been used including spiropyrans, diarylethenes, and fulgimides.^[@ref19]^ Here, we present the first example of a molecular logic device based on a norbornadiene--quadricyclane photoswitch. Using photons and acid/base chemistry, it performs the function of a three-input keypad lock.

Norbornadiene is a bicyclic organic compound which upon irradiation with UV light is converted to the highly strained and saturated quadricyclane isomer.^[@ref20]−[@ref22]^ Back-isomerization to the norbornadiene form has been observed thermally, electrochemically, catalytically, and photonically.^[@ref21],[@ref23]−[@ref26]^ Norbornadienes have been widely studied over the years for solar thermal energy storage applications.^[@ref27]−[@ref30]^ They have also been studied as molecular electronic components.^[@ref31]^ Synthesis of norbornadiene derivatives has been explored in the past for their importance as synthetic intermediates, and for other applications.^[@ref32]^ Recently, the research area has seen a resurgence, thanks to the contributions of modern coupling reactions and advanced computational tools.^[@ref33]−[@ref39]^ Most often, the unsubstituted norbornadiene is not ideal for these purposes. Thus, different molecular modifications have been explored to optimize the performance, including the introduction of electron donor and acceptor groups on one or both double bonds.^[@ref27],[@ref29],[@ref30],[@ref33],[@ref34]^

![(a) Interconversion scheme for the four molecular species NBD, QC, NBDH^+^, and QCH^+^. Irradiation at 405 nm photoconverts NBD to QC, while QC can isomerize back to NBD photochemically (310 nm) or thermally (over hours at room temperature). Both NBD and QC can be protonated using for example trifluoroacetic acid (TFA), and NBDH^+^ and QCH^+^ can be deprotonated using a base as triethylamine (Et~3~N). Photoisomerization of NBDH^+^ to QCH^+^ is observed upon irradiation at 340 nm, whereas QCH^+^ is thermally isomerized to NBDH^+^ (over hours at room temperature). (b) UV--vis absorption spectra of the four implicated species NBD, QC, NBDH^+^, and QCH^+^. All samples prepared as toluene solutions.](jz-2018-025674_0001){#fig1}

Norbornadiene derivative NBD in [Figure [1](#fig1){ref-type="fig"}](#fig1){ref-type="fig"} has been previously synthesized.^[@ref34]^ The synthesis starts from the commercially available norbornadiene, and it is straightforward and efficient over only three steps. It is a versatile derivative with interesting properties that have been already partially characterized and exploited in previous works but will be here discussed in depth and further expanded, with the introduction of novel features and applications. The structural rearrangement responsible for the isomerization is the breaking of the double bonds to form the corresponding single bonds ([Figure [1](#fig1){ref-type="fig"}](#fig1){ref-type="fig"}a), which interrupts the conjugation in the donor--acceptor system and therefore significantly blue-shifts the absorption of the QC isomer ([Figure [1](#fig1){ref-type="fig"}](#fig1){ref-type="fig"}b). While unsubstituted norbornadiene does not absorb above 300 nm, NBD, thanks to the donor--acceptor groups introduced on the double bond, absorbs up to around 460 nm with absorption maximum at 398 nm.^[@ref34]^ Upon light exposure at wavelengths between ca. 350 and 425 nm it photoisomerizes to the corresponding quadricyclane (QC) form with a measured quantum yield of 28%.^[@ref34]^ As indicated above, breaking the conjugation of the push--pull system blue-shifts the absorption substantially. The QC absorption has an onset at 344 nm and an absorption maximum at 298 nm. The back-isomerization from QC to NBD has been observed to be induced thermally (time constant of 7.3 h at 25 °C in toluene). Quadricyclane units incorporated into polymers have been reported to undergo photoinduced conversion to the norbornadiene isomer, which was achieved by irradiation with short-wave UV light.^[@ref23],[@ref24]^ Quadricyclane to norbornadiene photoisomerization in the newer generations of derivatives with red-shifted absorption is, however, extremely rare.^[@ref40]^ Despite this fact, we decided to irradiate QC with light at 310 nm, and to our surprise it readily and almost completely converted to NBD. This feature is of great interest, since it allows conversion of QC to NBD on a much shorter time scale than the thermal process. Being able to convert readily and on demand between QC and NBD opens the utilization of this system to new applications where a fast and clean conversion between the species is needed. The quantum yield of the QC → NBD photoisomerization was measured as 53% at 300 nm (see [Supporting Information](http://pubs.acs.org/doi/suppl/10.1021/acs.jpclett.8b02567/suppl_file/jz8b02567_si_001.pdf) page 9 for more information). The fatigue resistance of NBD-QC isomers during photothermal and all-photonic processes was tested, showing excellent robustness with no or small degradation over about 100 cycles (see our previous work^[@ref37]^ or [Supporting Information](http://pubs.acs.org/doi/suppl/10.1021/acs.jpclett.8b02567/suppl_file/jz8b02567_si_001.pdf) page 10 for more information).

This system has more interesting features; protonation of the methylamino group allows for the formation of two additional species: NBDH^+^ and QCH^+^. Since the protonation of the amino group reduces the electron-donating character, NBDH^+^ and QCH^+^ are expected to have a more blue-shifted absorption compared to that of the nonprotonated species. This is indeed also observed experimentally ([Figure [1](#fig1){ref-type="fig"}](#fig1){ref-type="fig"}b). The structures and the interconversion scheme of all four implicated forms are shown in [Figure [1](#fig1){ref-type="fig"}](#fig1){ref-type="fig"}a. Here, irradiation of NBD at 405 nm was used to induce full photoisomerization to QC, while irradiation at 310 nm allowed for almost complete back-photoisomerization. Partial isomerization of NBDH^+^ to QCH^+^ was also observed when the sample was irradiated at 340 nm. All photoinduced processes proceed readily at modest light intensities (25--870 mW, less than a minute irradiation). This should be contrasted with the thermal isomerizations occurring on the time scale of several hours (time constants of 7.3 and 2.5 h at room temperature for QC → NBD and QCH^+^ → NBDH^+^, respectively; see also [Supporting Information](http://pubs.acs.org/doi/suppl/10.1021/acs.jpclett.8b02567/suppl_file/jz8b02567_si_001.pdf) page 5).

After identifying all the states and interconversions in the system, the function of NBD as a three-input keypad lock is easily rationalized. We define the three inputs as acid (a), base (b), and light at 310 nm (UV). From [Figure [1](#fig1){ref-type="fig"}](#fig1){ref-type="fig"}a, it is clear that that there is only one input sequence that interconverts QCH^+^ to NBDH^+^, and therefore, a unique output is obtained only by using a unique input sequence, so that the molecular system can serve as a keypad lock. Thus, we define QCH^+^ as the initial state. NBDH^+^ has a characteristic absorption band centered at around 330 nm, a wavelength where all other forms display no or low absorption only. The absorbance at 330 nm is therefore chosen as the output.

Exposing QCH^+^ to 310 nm UV light does not significantly affect the isomeric distribution between QCH^+^ and NBDH^+^. Instead, QCH^+^ must first be deprotonated by the addition of base (triethylamine, Et~3~N, added in excess) to yield QC. QC is isomerized to NBD by 310 nm UV for about 60 s. Subsequent addition of acid (trifluoroacetic acid, TFA, added in excess) results in the formation of NBDH^+^ displaying strong absorption at 330 nm, switching the output to the on-state, equivalent to opening the lock. Thus, due to the intrinsically much slower thermal isomerization processes, there is no other way to produce NBDH^+^ on this time scale than the input order b, UV, a (addition of Et~3~N, irradiation at 310 nm, and addition of TFA).

In order to experimentally verify the above-mentioned performance, all the permutations generated by combinations of one, two, or all three inputs ([Table [1](#tbl1){ref-type="other"}](#tbl1){ref-type="other"}) were subjected to the system in toluene solution. Before each of the input sequences was applied, the initial state QCH^+^ was prepared from the as-synthesized NBD form by photoisomerization at 405 nm followed by addition of TFA. The predicted resulting species after applying the 15 input sequences are shown in [Table [2](#tbl2){ref-type="other"}](#tbl2){ref-type="other"}. Indeed, this is also experimentally verified from the corresponding absorption spectra ([Supporting Information](http://pubs.acs.org/doi/suppl/10.1021/acs.jpclett.8b02567/suppl_file/jz8b02567_si_001.pdf) pages 6--7).

###### All Possible Sequential Combinations of the Inputs, a = Acid, b = Base, UV = Irradiation at 310 nm

  **1**   **2**   **3**   **4**   **5**   **6**   **7**   **8**   **9**   **10**   **11**   **12**   **13**   **14**   **15**
  ------- ------- ------- ------- ------- ------- ------- ------- ------- -------- -------- -------- -------- -------- --------
  a       a       b       b       UV      UV      a       b       a       UV       b        UV       a        b        UV
  b       UV      a       UV      a       b       b       a       UV      a        UV       b                           
  UV      b       UV      a       b       a                                                                             

###### Predicted Resulting Species after Applying the Input Sequences to the Initial State QCH^+^[a](#tbl2-fn1){ref-type="table-fn"}

![](jz-2018-025674_0003){#GRAPHIC-d7e663-autogenerated}

Number 4 is the only expected sequence to produce NBDH^+^ as the main final species indicated at the bottom line (color coded).

Extracting the absorbance values at the output wavelength 330 nm yields the graph shown in [Figure [2](#fig2){ref-type="fig"}](#fig2){ref-type="fig"}. Only one out of the 15 possible input combinations, namely, the anticipated b-UV-a (input sequence 4), yields an absorbance above the threshold level set to 0.25. These proof of principle experiments show that it is possible to use the described system as a three-input molecular keypad lock, where the output signal for the correct input sequence is at least 1.6 times higher (equivalent to the dynamic range) than for all others.

![Output readings of the absorbance at 330 nm after applying sequences 1--15. Number 4 is the only sequence that yields an absorbance above the threshold level, arbitrarily set at *A* = 0.25.](jz-2018-025674_0002){#fig2}

The presented NBD derivative has already many advantages compared to those of previously reported systems, such as the ease of synthesis^[@ref34]^ and the demonstrated robustness over many cycles.^[@ref37]^ Moreover, NBDs synthesis and physical and chemical behaviors and properties are widely studied and quite well understood,^[@ref29],[@ref32],[@ref35],[@ref36],[@ref38]^ implying the facilitation of carefully designing molecular systems with the desired properties and predictable physicochemical behavior. Some limitations and challenges can be identified. For example, the described molecular system is based on metastable states, displaying thermal isomerizations on the time scale of 3--7 h. In the operation of NBD as a keypad lock, however, the time required to apply the photonic and chemical inputs is below 1 min, and in this time the thermal isomerization of the metastable species is minimal (\<4%). A universal reset operation can be suggested, where the sample is basified to induce deprotonation, and heat is applied to induce back-conversion of any QC to the stable form NBD. If multiple cycles are considered, however, the use of chemical inputs results in chemical byproducts and eventual dilution, interfering with the intended function.

To conclude, we have demonstrated the first example of a norbornadiene--quadricyclane photoswitch in the context of molecular logic. Using photons and acid/base as inputs, it performs as a three-input keypad lock. The function is easily rationalized from the underlying isomerization and protonation/deprotonation scheme. The advantage of using NBD derivatives is that NBD chemical modifications have been abundantly explored in the past and more recently,^[@ref29],[@ref30],[@ref32],[@ref34],[@ref39]^ which allows us to access a wide library of compounds and synthetic methods. For these reasons there are certainly great opportunities for improved design aiming at more streamlined keypad locks, or complex multiswitch systems allowing for even more sophisticated logic functions to be performed.

The Supporting Information is available free of charge on the [ACS Publications website](http://pubs.acs.org) at DOI: [10.1021/acs.jpclett.8b02567](http://pubs.acs.org/doi/abs/10.1021/acs.jpclett.8b02567).General methods, NMR spectra, kinetics of thermal back-isomerization of QCH^+^ to NBDH^+^, UV--vis spectra during input sequences 1--15, output readings, quantum yield of photoisomerization, and fatigue test of NBD-QC photoswitching ([PDF](http://pubs.acs.org/doi/suppl/10.1021/acs.jpclett.8b02567/suppl_file/jz8b02567_si_001.pdf))

Supplementary Material
======================

###### 

jz8b02567_si_001.pdf

The authors declare no competing financial interest.

The Swedish Strategic Research Foundation SSF, the Swedish Research Council VR, the European Research Council ERC, and the Knut and Alice Wallenberg Foundation are acknowledged for financial support. We acknowledge M. Quant for providing the norbornadiene used in this work and K. Börjesson for valuable discussion. There are no conflicts to declare.
