Introduction

With the burgeoning developments of Boolean logic computation, various unconventional logic systems1, 2, 3 have been constructed to operate different types of basic,4, 5, 6 advanced7, 8, 9 and concatenated molecular logic devices.10, 11, 12 Although great research achievements have been realized in this area, there is still considerable room for progress.13, 14 One significant limitation is that most of the previously reported advanced logic gates (such as full/half adder/subtractor,15 encoder/decoder,7, 16 and multiplexer/demultiplexer17, 18) were fabricated using luminescent19, 20 or traditional electrochemical platforms,10, 21 whose outputs (luminescence, voltage, current) were often recorded using additional equipment and difficult to visualize by the naked eye. By contrast, colorimetric logic platforms present visual outputs that are rapidly responsive, easy-to-read, and could be observed by the naked eye. To the best of our knowledge, although many basic colorimetric logic gates (for example, AND,22 INHIBIT,23, 24 OR23) have been developed, only few single-output colorimetric advanced logic devices have been reported (keypad locks25, 26 or some simple concatenated logic circuits23, 27). This result is mainly because it is difficult to integrate two separate visible signals, which is necessary for fabricating dual-output advanced logic devices, into one reaction system. To resolve this issue, a universal platform that can operate various visual advanced logic devices with more than one colorimetric output is highly desirable and requires further investigation.

A bipolar electrode (BPE) is an electronic conductor that can act as both an anode and a cathode in solution wirelessly under a power supply.28, 29, 30 Logic computation based on bipolar electrochemistry has attracted tremendous interest recently owing to its ease of construction, integration and control.25, 31, 32, 33 Crooks pioneered the integration of logic circuits with a split BPE using electrochemiluminescence as an output signal in an open BPE system.33 However, the utilization of the open BPE mode limited further applications due to the low current efficiency. Moreover, only basic logic gates were operated in his work. By comparison, closed BPEs with ultrahigh current efficiency and non-interfering reactions at the two poles separated by different reservoirs have become increasingly popular.34, 35, 36 Liu et al.25 fabricated a visual keypad lock based on a closed mode single-electrochromic BPE, but the single-output platform could not efficiently meet the requirements of visual advanced or concatenated logic devices. To overcome these limitations, more than one colorimetric signal should be integrated into one closed BPE system.

Herein, a universal dual-electrochromic logic platform was constructed for the first time by introducing the electrochemical oxidation of 2, 2′-azinobis (3-ethylbenzthiazoline-6-sulfonic acid) (ABTS) and the electrodeposition of Prussian blue (PB) into one closed BPE system. This platform consists of two BPEs separated by three reaction channels in which the color switching of ABTS (no color change/turn green) and PB (no color change/turn blue) at the two poles will not interfere with each other. Based on the smart design of a bipolar electrochemical system, various advanced logic devices whose outputs were recognized via the naked eye, including an encoder, a decoder, a demultiplexer, a keypad lock and a three-input concatenated logic circuit with dual outputs, were constructed easily by modifying the input combinations. This logic platform presented multiple advantages compared with previous ones, as presented in Table 1.

Table 1 The comparison results of this work compared with other proposed platform based logic devices

Materials and methods

Chemicals and reagents

All chemicals were of at least analytical grade and were used without any further purification. ABTS and glutathione (GSH) were purchased from Sigma Aldrich (Shanghai, China) (http://www.sigmaaldrich.com). Polydimethylsiloxane (PDMS) and curing agent were obtained from GE Toshiba Sillicones Co., Ltd (Shanghai, China). Indium tin oxide (ITO)-coated glass substrate (resistance:~6 Ω/square) was obtained from CSG Holding Co., ltd. (Shenzhen, China). In this work, 10 mM phosphate buffer solution with 100 mM KCl, pH=7.4 was used, and high concentrations of ABTS and H2O2 solution were freshly prepared before use and then diluted to the final concentration. The PB deposition solution used in this work was composed of 2.5 mM FeCl3+2.5 mM K3Fe(CN)6+ 0.1 M HCl+0.1 M KCl. The water used in all experiments was purified by a Milli-Q system (Millipore, Bedford, MA, USA).

Device fabrication

As reported in our previous work,36 a standard photolithographic technique was employed to fabricate patterned ITO electrodes. In brief, the clean ITO substrate was spin-coated with RZJ 390 photoresist. The coated ITO substrate was covered by a photomask containing the designed patterns (Supplementary Figure S1A) and exposed to UV irradiation for 9 s. The exposed photoresist layer was removed by 0.1 M NaOH, and the exposed ITO was etched with HCl-FeCl3 solution. Finally, the patterned ITO electrodes were obtained by removing the remaining photoresist with ethanol, and the closed bipolar system was achieved through the bonding of a polydimethylsiloxane membrane with a reservoir onto the patterned ITO substrate (Supplementary Figure S1B).

UV-vis spectra measurement

The UV-vis spectra of the color changes of the ABTS and PB on the surface of the electrodes were measured using a UV-vis spectrophotometer. Because the PB was deposited directly on the electrode, the ITO glass was placed in a suitable position in the UV-vis spectrophotometer so that the incident light source passed through pole IV completely (Supplementary Figure S3). The UV-vis spectrum of PB was collected from 450 nm to 1000 nm. To measure the absorbance of ABTS, the solution on the surface of pole II was collected and transferred to an ultramicro- spectrophotometer/fluorometer (DS-11 FX+, Denovix, Wilmington, DE, USA), and the spectra were collected from 390 nm to 450 nm.

Operation of the developed advanced logic device

Before operating different logic computations, the driving voltage for PB deposition and ABTS electrochemical oxidation were optimized in the absence or presence of 5 mM H2O2. A CHI 760E electrochemical workstation (Chenhua Instruments Shanghai Co., Ltd, China) was used to supply voltage to the driving electrodes for 180 s. The advanced logic devices, including an encoder, a decoder, a demultiplexer, a keypad lock and a three-input concatenated logic gate, were operated at the optimal voltage. Detailed information is provided in Supporting Information.

Results and Discussion

Definition of the initial state and outputs

As shown in Scheme 1a, the closed BPE system was composed of two BPEs (BPE 1 and BPE 2) separated by three reaction channels, designated Ra, Rb and Rc. Before the operation of different logic devices, phosphate buffer, ABTS/H2O2 or ABTS (ABTS/H2O2 for the encoder and decoder; ABTS for the demultiplexer, keypad lock and concatenated logic circuit) and PB deposition solution were added to reservoirs Ra, Rb and Rc, respectively. Two BPEs separated by the three reaction channels, which were filled with the different reaction solutions, constituted the closed BPE system, and this system was defined as the initial platform state. To satisfy the requirements of different logic devices, the driving voltage with different directions and suitable values/supply time, K+, H2O2 and GSH were alternatively used as the inputs. For the voltage input, the negative voltage (left ‘+’, right ‘−’, designated as ‘+/−’) and positive voltage (left ‘−’, right ‘+’, designated as ‘−/+’) were defined as ‘0’ and ‘1’, respectively. For K+, H2O2 and GSH, the absence and presence of these inputs were defined as ‘0’ and ‘1’, respectively.

Before the definition of two outputs, the introduction of H2O2 as an input to this system should be explained initially. As reported by many BPE-based electrochromic works and verified in our experimental results (Supplementary Figure S4), both the electrochemical oxidation of ABTS/ABTS·+ and the electrodeposition of PB induce color changes that could occur at the extremities of the two BPEs under sufficient driving voltage.37, 38 If the voltage was applied as the solely input, only single-input triggered logic device can be achieved. To meet the input requirements of different logic devices and make the system a universal platform, in addition to the voltages, one essential reactant should be introduced into the system to regulate the color change reaction. ABTS can be effectively oxidized by H2O2 and turns green in the typical colorimetric reaction.39 In addition, as H2O2 has a low redox potential,40 the supplied driving voltage can also effectively promote the oxidation of ABTS in Rb and the deposition of PB at the BPE cathode in Rc simultaneously owing to the ‘connected in series’ design of the closed BPE system that can be further confirmed through the current change before and after addition of H2O2 (Supplementary Figure S2). Thus, H2O2 was chosen as another input in the platform to regulate the color changes of ABTS (no color change/turn green) and deposited PB (no color change/turn blue) simultaneously. The driving voltages were optimized initially to obtain the highest signal-to-noise ratio of the absorption values of ABTS·+ and deposited PB in the presence and absence of H2O2, as shown in Supplementary Figure S4. A negative voltage of -4 V (3 min) and a positive voltage +3.8 V (3 min) were used in subsequent experiments. The color changes at pole II were taken as Out X (no color change=‘0’, turn green (ABTS+)=‘1’), and those at pole IV were defined as Out Y (no color change=‘0’, turn blue (deposited PB)=‘1’), as shown in Scheme 1b. Thus, the initial, input and output states of the platform were as defined above. The coloring mechanism of ABTS+ and deposited PB is shown in Supplementary Scheme S1.

Operation of a 2-to-1 encoder and a 1-to-2 decoder

An encoder/decoder is a digital device that converts the data/code into code/data through information storage or transmission.7, 17, 41 The initial state of the encoder and decoder is presented in the center of Figure 1a. To validate the proposed strategy, a single-output 2-to-1 encoder was first designed. The voltage directions were used as one input (IN 1), K+ (IN 2) (which has no effect on the system) was used as an additional input, and the color changes at pole IV were defined as the encoder’s output (left part of Figure 1a). In the presence of a negative voltage (+/-) and K+ (IN 1=‘0’, IN 2=‘1’), PB will be deposited on the right driving cathode and not on the anode of BPE 2 (pole IV), and no color change was observed on pole IV, yielding the output ‘0’, as shown in Figure 1a (a). In the presence of a positive voltage (−/+) and the absence of K+ (IN 1=‘1’, IN 2=‘0’), the polarity of the two BPEs was reversed accordingly. PB was deposited on the cathode of BPE 2 (pole IV), and the color turned blue (Out=‘1’), as shown in Figure 1a (b). The UV-vis spectra (Supplementary Figure S5) and normalized Abs values of deposited PB (700 nm) on pole IV (Figure 1b) were in good agreement with the color changes under different inputs. The input and output states produced a truth table (Figure 1c) that meets the characteristic of a 2-to-1 encoder. For the construction of the 1-to-2 decoder, the driving voltages with different directions and suitable values/supply time were used as the inputs, the color changes at pole IV (no color change=‘0’, turn blue (deposited PB)=‘1’) and at pole II (no color change=‘0’, turn green (ABTS·+)=‘1’) were identified as Out 1 and Out 2, respectively. In the presence of a negative voltage (+/−) (Input=‘0’), as discussed with the 2-to-1 encoder, PB is deposited on the driving cathode, not on pole IV, and no color change was observed at pole IV (Out 1=‘0’). Meanwhile, the electrochemical oxidation of ABTS in the presence of H2O2 will occur at the anode of BPE 1 (pole II), and a green color was observed (Out 2=‘1’), as shown in Figure 1a (a′). After a positive voltage (−/+) (Input=‘1’) was supplied, the polarity of the two BPEs was reversed compared with the previously mentioned negative voltage. PB was deposited on the cathode of BPE 2 (pole IV), and a blue color was observed (Out 1=‘1’). Oxidation of ABTS occurs on the anode of BPE 2 (pole III), not on pole II, and no color change was observed (Out 2=‘0’). The corresponding UV-vis spectra and normalized Abs results of PB (700 nm) and ABTS+ (421 nm) on the two poles are presented in Supplementary Figure S6 and Figure 1d, respectively. All the above results are presented in the truth table (Figure 1e), which features the characteristics of the 1-to-2 decoder.

Figure 1
figure 1

Schematic illustration of the proposed encoder and decoder (a). Column bars of normalized Abs value of PB under different inputs (b), inset is the logic symbol of 2-to-1 encoder; Truth table of the 2-to-1 encoder (c). Column bars of normalized Abs value of deposited PB (black) and ABTS·+ (red) under different inputs (d), inset is the logic symbol of 1-to-2 decoder; Truth table of the 1-to-2 decoder (e).

Operation of a 1-to-2 demultiplexer

In addition to the data/code mutual-conversion by the encoders and decoders through information processing, data compression and decompression also play a key role in molecular logic computation.18, 42 Thus, it is also essential to construct multiplexers and de-multiplexers.43, 44 To demonstrate the applicability of the platform, a conceptual 1-to-2 demultiplexer was fabricated based on the same BPE platform. 1-to-2 demultiplexer can transmit one input signal to two output channels under the control of a selector. The initial state of the demultiplexer is shown in Figure 2a. The voltage directions were taken as the selector (S1), and H2O2 was used as input I1. The color changes at pole II and pole IV were considered as two outputs: Sub1 and Sub2, respectively. In the absence of H2O2 and regardless of the voltage directions (S1& I1=‘0, 0’ or ‘1, 0’), as shown in Figure 2a (a, c), no obvious color change was observed at both pole II and pole IV, resulting in an output of 0 (Sub1=‘0’, Sub2=‘0’). This result is attributed to the fact that the oxidation of ABTS and deposition of PB could not occur efficiently without the participation of H2O2 under insufficient driving voltage (−4 V or +3.8 V). In the presence of a negative voltage (-4 V, +/-) and H2O2 (S1& I1=‘0, 1’), the electrochemical oxidation of ABTS occurs at the anode of BPE 1 (pole II), and a green color was observed (Sub1=‘1’). PB was also deposited on the driving cathode, and no color change was observed at pole IV (Sub2=‘0’), as shown in Figure 2a (b). In the presence of a positive voltage (+3.8 V, −/+) and H2O2 (S1&I1=‘1, 1’), the ABTS color change occurs on the anode of BPE 2 (pole III), and no change is observed at pole II (Sub1=‘0’). PB was deposited on the cathode of BPE 2 (pole IV), and a blue color was observed (Sub2=‘1’). The Abs results under different input combinations (Supplementary Figure S7) were consistent with the corresponding color changes at pole II and pole IV. The corresponding truth table and logic symbol are shown in Figures 2b and c and show the successful construction of the 1-to-2 demultiplexer. A three-input keypad lock based on the same platform was also constructed and is shown in Supplementary Figure S8.

Figure 2
figure 2

Schematic illustration of the proposed 1-to-2 demultiplexer (a); Truth table (b) and logic symbol (c) of the 1-to-2 demultiplexer.

Operation of a three-input concatenated logic circuit

In addition to the frequently operated advanced logic devices, complicated concatenated logic circuits, which are usually difficult to fabricate at the molecular scale, connected by several logic devices can perform sophisticated multi-level logic computations.10, 14, 45 Our bipolar electrochemistry-based universal logic platform can not only operate advanced logic devices but also perform concatenated logic computation. A three-input concatenated logic circuit with dual output was subsequently fabricated. Voltage with different directions and suitable values/supply time (C1), H2O2 (C2) and GSH (C3) were used as the three inputs. The input definitions were the same as in the above constructed logic devices. For the outputs, the color changes at pole II (no color change=‘0’, turn green (ABTS·+) =‘1’) and pole IV (no color change=‘0’, turn blue (deposited PB) =‘1’) were designated output OT 1 and output OT 2, respectively.

The equivalent logic symbol of the three-input concatenated logic circuit shown in Figure 3c can be illustrated using the states of the two outputs as follows. For output OT 1, as discussed above, the electrochemical oxidation of ABTS can only occur in the presence of a negative voltage and H2O2 and the absence of GSH (C1 & C2 & C3= ‘0, 1, 0’), producing a green color at pole II (OT 1= ‘1’), as shown in Figure 3a (b). Voltages with different directions and suitable values/supply time and GSH were used as the inputs of the NOR logic gate, and the outputs were different combinations of voltages and GSH. For the output states of the NOR logic gate, only when both of the two inputs were ‘0’ (negative voltage and without GSH) was the output of the NOR logic gate ‘1’, and other combinations of voltage and GSH generated output ‘0’. The different outputs of the NOR logic gate were transmitted as one input of a downstream AND logic gate, whose other input was H2O2. Thus, a NOR logic gate cascaded by an AND gate (NOR-AND) meets the output states of OT 1. Accompanied by the NOR-AND logic gate achieved at pole II under different inputs, the color changes (PB) at pole IV (OT 2) were also regulated by the same three inputs at the same time. For output OT 2, similar to the reactions of ABTS at pole II, only in the presence of a positive voltage and H2O2 and the absence of GSH (C1 & C2 & C3=‘1, 1, 0’) will PB be deposited on pole IV with an accompanying blue color (OT 2=‘1’), as shown in Figure 3a (f). GSH was used as an inhibitory element of H2O2, and the two reactants composed an INHIBIT logic gate, whose outputs were different combinations of GSH and H2O2. For the output states of the INHIBIT logic gate, the output was ‘1’ only in the presence of H2O2 and absence of GSH (H2O2=‘1’, GSH=’0’). All other combinations of H2O2 and GSH resulted in output ‘0’. The different outputs of the INHIBIT logic gate were then transferred as one input of the subsequent AND logic gate, whose other inputs were the voltage directions and suitable values/supply time. The cascade logic device ‘INHIBIT-AND’ could also feature the output states of OT 2. Two cascade logic devices ‘NOR-AND’ and ‘INHIBIT-AND’ could properly represent the output states of OT 1 and OT 2 under different input combinations of the three same inputs. Two devices composed the three-input concatenated logic circuit with dual outputs, as shown in Figures 3b and c. The color changes of ABTS and PB under different inputs were easily observed, as shown in Figure 3a, and corresponding Abs spectra are shown in Supplementary Figure S9.

Figure 3
figure 3

Schematic illustration of the proposed concatenated logic circuit (a), Truth table (b) and logic symbol (c) of the concatenated logic circuit.

Conclusion

In summary, a universal dual-electrochromic BPE-based logic platform was fabricated for the first time and used to operate various visual advanced logic gates, including an encoder, a decoder, a demultiplexer, a keypad lock and a three-input concatenated logic circuit with two visual outputs. The electrochemical oxidation of ABTS and the electrodeposition of PB were integrated into one closed BPE system, and corresponding color changes at specific poles were used as visual outputs, which are rapidly responsive and can be easily observed by the naked eye by modulating the input combinations. This type of visual color-switch platform provides a prototype for the fabrication of other visual advanced logic devices. We envision that this technology can be miniaturized and operated on one integrated chip driven by a single electric field for lab-on-chip complex data processing, accompanied by further development of the chip technology in the future.

scheme 1

Structure of the closed BPE system with two BPEs separated by three reaction channels and definition of the initial states of the platform (a). Definition of two visual outputs: Out X (Green, on pole II) and Out Y (Blue, on pole IV) under different inputs (b).