Construction of Multiple Switchable Sensors and Logic Gates Based on Carboxylated Multi-Walled Carbon Nanotubes/Poly(N,N-Diethylacrylamide)

In this work, binary hydrogel films based on carboxylated multi-walled carbon nanotubes/poly(N,N-diethylacrylamide) (c-MWCNTs/PDEA) were successfully polymerized and assembled on a glassy carbon (GC) electrode surface. The electroactive drug probes matrine and sophoridine in solution showed reversible thermal-, salt-, methanol- and pH-responsive switchable cyclic voltammetric (CV) behaviors at the film electrodes. The control experiments showed that the pH-responsive property of the system could be ascribed to the drug components of the solutions, whereas the thermal-, salt- and methanol-sensitive behaviors were attributed to the PDEA constituent of the films. The CV signals particularly, of matrine and sophoridine were significantly amplified by the electrocatalysis of c-MWCNTs in the films at 1.02 V and 0.91 V, respectively. Moreover, the addition of esterase, urease, ethyl butyrate, and urea to the solution also changed the pH of the system, and produced similar CV peaks as with dilution by HCl or NaOH. Based on these experiments, a 6-input/5-output logic gate system and 2-to-1 encoder were successfully constructed. The present system may lead to the development of novel types of molecular computing systems.


Introduction
Molecular logic gates can carry out different computations at the molecular level, and the working mechanism or principle is similar to silicon processors [1][2][3][4]. Molecular logic gates, a type of logic gates system, can use biological materials or biomolecules such as enzymes, DNA, or proteins to establish basic or -simple molecular devices and equipment [3][4][5][6][7]. For example, Liu's group successfully established 4-input/7-output biomolecular logic gates, and provided a new method to construct complex biomolecular logic gate system based on bio-electrocatalysis of natural DNA [8]. An adjustable electrocatalysis was constructed on the basis of multiple responsive interface poly (N-isopropylacrylamide co-N,N'-dimethylaminoethylmethacrylate) (P(NiPAAm-DMEM) films while the immobilization of glucose oxidase (GOD) and horseradish peroxidase (HRP) on the surface of pyrolytic graphite (PG) electrodes was also used to construct logic gates by Liu and coworkers [9].

pH Responsive Behaviors of Poly(N,N-Diethylacrylamide) Films
The pH-sensitive property of PDEA film electrodes was demonstrated by the CV responses of matrine and sophoridine. From pH 9.0 to 4.0 at 25 °C, the Ipa of matrine and sophoridine decreased drastically with decrease of pH (Figure 2A,B). If the Ipa in NaCl solutions at pH 9.0 was set as the "on" state, whereas that at pH 4.0 as the "off" state, the CV response could be switched between the "on" and "off" state by switching the film electrode in the solutions between 9.0 and 4.0. This pH-dependent switchable CV behavior of the system could be repeated several times with good reversibility ( Figure 2C,D). The response time of the on-off transitions was greatly influenced by the thickness of the PDEA hydrogel films. The average thickness of the films in water estimated by stereomicroscopy was 410 ± 30 μm at pH 9.0 and 25 °C. The response time increased with the thickness of PDEA hydrogel films (data not shown), implying that the diffusion of the drug molecules through the films to theelectrode surface for electron exchange became more difficult when the hydrogel films become thicker. In addition, oxidation peak currents of the drug molecules showed a linear relationship with the square root of scan rates from 0.05 to 1.0 V s -1 at pH 9.0 and 25 °C, suggesting diffusion-controlled behavior of the drug molecules.
The probable changes of structure and the average thickness of PDEA films at different pHs of solution were investigated by SEM ( Figure S3) and stereomicroscopy ( Table 1). The results showed that PDEA films have a similar network structure and surface morphology at pH 4.0 and 9.0 ( Figure  S3A,B). The PDEA component carries no charge regardless of the surrounding pH. In addition, the average thickness of the films at pH 9.0 (410 μm) estimated by stereomicroscopy was nearly the same as that at pH 4.0 (405 μm) ( Table 1). In the control experiments, matrine and sophoridine demonstrated pH-sensitive CV properties at the bare GC electrode. When the pH increased from pH 4.0 to 9.0, the Ipa of matrine and sophoridine increased correspondingly ( Figure S4A,B). Thus, the main mechanism was attributed to the property of matrine and sophoridine, which are alkaloid drugs with pKa value of about 7.80−8.20 [31,32]. Their structure contains a tertiary amine nitrogen atom ( 1 N), and an amide structure ( 2 N) which has alkalinity. Amides cannot hydrolyze easily, so its main basicity is derived from 1 N. The nitrogen atom in solution can provide lone pair electrons, and so the solutions become alkaline. When the pH decreased to 4.0, matrine was present in the form of a nitrogen cationic radical, which cannot transfer electrons to the electrode. As the amount of matrine in molecular form decreased, the oxidation peaks also decreased or even disappeared. When the pH increased to 9.0, matrine existed as a moleculer form, and the Ipa increased. In addition, the effect of the solution pH on the peak potentials was investigated ( Figure S4). The oxidation peak potentials Epa hardly shift with increasing pH 4.0-9.0, which means that the voltammetric behaviors of matrine and sophoridine are not a proton transfer process, just an

pH Responsive Behaviors of Poly(N,N-Diethylacrylamide) Films
The pH-sensitive property of PDEA film electrodes was demonstrated by the CV responses of matrine and sophoridine. From pH 9.0 to 4.0 at 25 • C, the I pa of matrine and sophoridine decreased drastically with decrease of pH (Figure 2A,B). If the I pa in NaCl solutions at pH 9.0 was set as the "on" state, whereas that at pH 4.0 as the "off" state, the CV response could be switched between the "on" and "off" state by switching the film electrode in the solutions between 9.0 and 4.0. This pH-dependent switchable CV behavior of the system could be repeated several times with good reversibility ( Figure 2C,D). The response time of the on-off transitions was greatly influenced by the thickness of the PDEA hydrogel films. The average thickness of the films in water estimated by stereomicroscopy was 410 ± 30 µm at pH 9.0 and 25 • C. The response time increased with the thickness of PDEA hydrogel films (data not shown), implying that the diffusion of the drug molecules through the films to theelectrode surface for electron exchange became more difficult when the hydrogel films become thicker. In addition, oxidation peak currents of the drug molecules showed a linear relationship with the square root of scan rates from 0.05 to 1.0 V s -1 at pH 9.0 and 25 • C, suggesting diffusion-controlled behavior of the drug molecules.
The probable changes of structure and the average thickness of PDEA films at different pHs of solution were investigated by SEM ( Figure S3) and stereomicroscopy ( Table 1). The results showed that PDEA films have a similar network structure and surface morphology at pH 4.0 and 9.0 ( Figure S3A,B). The PDEA component carries no charge regardless of the surrounding pH. In addition, the average thickness of the films at pH 9.0 (410 µm) estimated by stereomicroscopy was nearly the same as that at pH 4.0 (405 µm) ( Table 1). In the control experiments, matrine and sophoridine demonstrated pH-sensitive CV properties at the bare GC electrode. When the pH increased from pH 4.0 to 9.0, the I pa of matrine and sophoridine increased correspondingly ( Figure S4A,B). Thus, the main mechanism was attributed to the property of matrine and sophoridine, which are alkaloid drugs with pK a value of about 7.80−8.20 [31,32]. Their structure contains a tertiary amine nitrogen atom ( 1 N), and an amide structure ( 2 N) which has alkalinity. Amides cannot hydrolyze easily, so its main basicity is derived from 1 N. The nitrogen atom in solution can provide lone pair electrons, and so the solutions become alkaline. When the pH decreased to 4.0, matrine was present in the form of a nitrogen cationic radical, which cannot transfer electrons to the electrode. As the amount of matrine in molecular form decreased, the oxidation peaks also decreased or even disappeared. When the pH increased to 9.0, matrine existed as a moleculer form, and the I pa increased. In addition, the effect of the solution pH on the peak potentials was investigated ( Figure S4). The oxidation peak potentials E pa hardly shift with increasing pH 4.0-9.0, which means that the voltammetric behaviors of matrine and sophoridine are not a proton transfer process, just an electron transfer process between the drugs and the GC electrode under the experimental conditions.   To verify the electron transfer mechanism between matrine and the electrodes, the electrochemical behavior of oxymatrine was further studied. The structures of oxymatrine and matrine are similar ( Figure 3). No oxidation peak exists in the same potential window on the bare  To verify the electron transfer mechanism between matrine and the electrodes, the electrochemical behavior of oxymatrine was further studied. The structures of oxymatrine and matrine are similar  The pH of the solution can be controlled by in situ enzymatic catalysis [33][34][35]. The hydrolysis reaction of ethyl butyrate and urea was catalyzed by esterase (Est) and urease (Ur). For example, the film was immersed into the pH 6.5 NaCl solution containing esterase, urease, and matrine ( Figure 2E, curve b). After the addition of ethyl butyrate, the pH of the solution began to decrease because of the production of butyric acid, and eventually reached 4.0. CV testing showed a small electrocatalytic oxidation peak ( Figure 2E, curve c). Then urea was added, and the ammonia produced under urease catalysis caused an increase of pH. CV scanning was performed again, and the Ipa was markedly enhanced ( Figure 2E, curve a). By adding ethyl butyrate and urea alternately to the enzyme solution of esterase and urease, the switchable behavior could be repeated many times between 4.0 and 9.0 ( Figure 2F).

Temperature-Responsive Behaviors of Poly(N,N-Diethylacrylamide) Films
The CV responses of matrine and sophoridine at the PDEA-film electrode were extremely sensitive to ambient temperature, with a lower critical phase transition temperature (LCST) of about 32 °C ( Figure 4A,B), which was similar to that found in the literature [25,36]. When the solution temperature was below 32 °C, the Ipa values of matrine and sophoridine on PDEA-film electrode were extremely large in NaCl solutions at pH 9.0, but the CV peak current considerably decreased when the temperature exceeded 32 °C. The temperatures at 25 °C and 40 °C were selected to study the thermal-sensitive switching behavior of the film system: the film was at the "on" state at 25 °C and the "off" state at 40 °C. The temperature sensitive properties of PDEA hydrogel could be repeated many times, and the response time was about 3-6 min ( Figure 4C,D). In the control experiments, the peak currents of matrine and sophoridine at the bare electrode showed no obvious change ( Figure S6), and thus confirmed that the temperature sensitive property of this system mainly depends on the PDEA hydrogel films. The pH of the solution can be controlled by in situ enzymatic catalysis [33][34][35]. The hydrolysis reaction of ethyl butyrate and urea was catalyzed by esterase (Est) and urease (Ur). For example, the film was immersed into the pH 6.5 NaCl solution containing esterase, urease, and matrine ( Figure 2E, curve b). After the addition of ethyl butyrate, the pH of the solution began to decrease because of the production of butyric acid, and eventually reached 4.0. CV testing showed a small electrocatalytic oxidation peak ( Figure 2E, curve c). Then urea was added, and the ammonia produced under urease catalysis caused an increase of pH. CV scanning was performed again, and the I pa was markedly enhanced ( Figure 2E, curve a). By adding ethyl butyrate and urea alternately to the enzyme solution of esterase and urease, the switchable behavior could be repeated many times between 4.0 and 9.0 ( Figure 2F).

Temperature-Responsive Behaviors of Poly(N,N-Diethylacrylamide) Films
The CV responses of matrine and sophoridine at the PDEA-film electrode were extremely sensitive to ambient temperature, with a lower critical phase transition temperature (LCST) of about 32 • C ( Figure 4A,B), which was similar to that found in the literature [25,36]. When the solution temperature was below 32 • C, the I pa values of matrine and sophoridine on PDEA-film electrode were extremely large in NaCl solutions at pH 9.0, but the CV peak current considerably decreased when the temperature exceeded 32 • C. The temperatures at 25 • C and 40 • C were selected to study the thermal-sensitive switching behavior of the film system: the film was at the "on" state at 25 • C and the "off" state at 40 • C. The temperature sensitive properties of PDEA hydrogel could be repeated many times, and the response time was about 3-6 min ( Figure 4C,D). In the control experiments, the peak currents of matrine and sophoridine at the bare electrode showed no obvious change ( Figure S6), and thus confirmed that the temperature sensitive property of this system mainly depends on the PDEA hydrogel films.  The pH of the solution can be controlled by in situ enzymatic catalysis [33][34][35]. The hydrolysis reaction of ethyl butyrate and urea was catalyzed by esterase (Est) and urease (Ur). For example, the film was immersed into the pH 6.5 NaCl solution containing esterase, urease, and matrine ( Figure 2E, curve b). After the addition of ethyl butyrate, the pH of the solution began to decrease because of the production of butyric acid, and eventually reached 4.0. CV testing showed a small electrocatalytic oxidation peak ( Figure 2E, curve c). Then urea was added, and the ammonia produced under urease catalysis caused an increase of pH. CV scanning was performed again, and the Ipa was markedly enhanced ( Figure 2E, curve a). By adding ethyl butyrate and urea alternately to the enzyme solution of esterase and urease, the switchable behavior could be repeated many times between 4.0 and 9.0 ( Figure 2F).

Temperature-Responsive Behaviors of Poly(N,N-Diethylacrylamide) Films
The CV responses of matrine and sophoridine at the PDEA-film electrode were extremely sensitive to ambient temperature, with a lower critical phase transition temperature (LCST) of about 32 °C ( Figure 4A,B), which was similar to that found in the literature [25,36]. When the solution temperature was below 32 °C, the Ipa values of matrine and sophoridine on PDEA-film electrode were extremely large in NaCl solutions at pH 9.0, but the CV peak current considerably decreased when the temperature exceeded 32 °C. The temperatures at 25 °C and 40 °C were selected to study the thermal-sensitive switching behavior of the film system: the film was at the "on" state at 25 °C and the "off" state at 40 °C. The temperature sensitive properties of PDEA hydrogel could be repeated many times, and the response time was about 3-6 min ( Figure 4C,D). In the control experiments, the peak currents of matrine and sophoridine at the bare electrode showed no obvious change ( Figure S6), and thus confirmed that the temperature sensitive property of this system mainly depends on the PDEA hydrogel films.  Scanning electron microscopy (SEM) also supported the structural changes of PDEA films with temperature. After being immersed in NaCl solutions with pH 9.0 at different temperatures, the films showed a network structure with numerous microsized pores and channels at 25 °C ( Figure 5, panel a), whereas they displayed a compact and smooth surface at 40 °C ( Figure 5, panel c). The structure change with temperature was further verified by the change of films thickness with temperature in water. The average film thickness estimated by stereomicroscopy at 40 °C became 276 μm, much smaller than that at 25 °C (410 μm) ( Table 1).  Scanning electron microscopy (SEM) also supported the structural changes of PDEA films with temperature. After being immersed in NaCl solutions with pH 9.0 at different temperatures, the films showed a network structure with numerous microsized pores and channels at 25 • C ( Figure 5, panel a), whereas they displayed a compact and smooth surface at 40 • C ( Figure 5, panel c). The structure change with temperature was further verified by the change of films thickness with temperature in water. The average film thickness estimated by stereomicroscopy at 40 • C became 276 µm, much smaller than that at 25 • C (410 µm) ( Table 1).  Scanning electron microscopy (SEM) also supported the structural changes of PDEA films with temperature. After being immersed in NaCl solutions with pH 9.0 at different temperatures, the films showed a network structure with numerous microsized pores and channels at 25 °C ( Figure 5, panel a), whereas they displayed a compact and smooth surface at 40 °C ( Figure 5, panel c). The structure change with temperature was further verified by the change of films thickness with temperature in water. The average film thickness estimated by stereomicroscopy at 40 °C became 276 μm, much smaller than that at 25 °C (410 μm) ( Table 1).

Na 2 SO 4 -Responsive Behaviors of Poly(N,N-Diethylacrylamide) Films
The CV responses of matrine and sophoridine at PDEA-film electrodes were also sensitive to the salt concentration in solution. When the testing solution contained no Na 2 SO 4 at 25 • C, matrine and sophoridine showed relatively large oxidation peaks, and the films were at the "on" state. When the solution contained 0.35 M Na 2 SO 4 under the same conditions, the matrine and sophoridine oxidation peaks were undetectable, and the films were at the "off" state. The Na 2 SO 4 -sensitive switching behaviors of matrine and sophoridine were also reversible. The "on" and "off" states of the system could be repeated several times ( Figure 6C,D). For the control experiments, the peak currents of the drug probes at the bare electrode showed no distinct change in solutions containing 0 and 0.35 M Na 2 SO 4 ( Figure S7). That is, the Na 2 SO 4 -sensitive CV behaviors of matrine and sophoridine also should be ascribed to the PDEA component in the films.

Na2SO4-Responsive Behaviors of Poly(N,N-Diethylacrylamide) Films
The CV responses of matrine and sophoridine at PDEA-film electrodes were also sensitive to the salt concentration in solution. When the testing solution contained no Na2SO4 at 25 °C, matrine and sophoridine showed relatively large oxidation peaks, and the films were at the "on" state. When the solution contained 0.35 M Na2SO4 under the same conditions, the matrine and sophoridine oxidation peaks were undetectable, and the films were at the "off" state. The Na2SO4-sensitive switching behaviors of matrine and sophoridine were also reversible. The "on" and "off" states of the system could be repeated several times ( Figure 6C,D). For the control experiments, the peak currents of the drug probes at the bare electrode showed no distinct change in solutions containing 0 and 0.35 M Na2SO4 ( Figure S7). That is, the Na2SO4-sensitive CV behaviors of matrine and sophoridine also should be ascribed to the PDEA component in the films. Other types of salts, such as MgSO4, NaNO3, and NaCl, can also cause the phase transition of PDEA film and the CV switchable behavior of drug probes ( Figure S8). The main difference between these salts was their different critical phase change concentration (SO4 2− (0.20 M) < Cl − (0.54 M) < NO3 − (0.95 M). Na2SO4, NaCl, and NaNO3 contain the same cationic Na + but different anions. The result is consistent with previous work [28]. The main difference is that this salt sensitivity can be used as an input signal to construct a logic gate system of drug molecules. According to the above test results, we selected Na2SO4 as the representative salt to discuss the sensitivity of the PDEA films. Na2SO4 caused the phase transition of the PDEA film, which was essentially the same as the temperature-induced phase change [37,38]. When the Na2SO4 concentration was lower than the critical concentration, PDEA exhibited a loose linear structure in which drugs easily diffused, resulting in increased CV response. When the Na2SO4 concentration became higher than its critical concentration, the hydrogen bonds between PDEA and water molecules considerably weakened, leading to a dense globular structure and preventing the drug molecules from reaching the electrode surface for electron exchange. The structural changes caused by the salt concentration can be further demonstrated by SEM ( Figure 5, panel a and b) and stereomicroscopy ( Table 1). The Other types of salts, such as MgSO 4 , NaNO 3 , and NaCl, can also cause the phase transition of PDEA film and the CV switchable behavior of drug probes ( Figure S8). The main difference between these salts was their different critical phase change concentration (SO 4 2− (0.20 M) < Cl − (0.54 M) < NO 3 − (0.95 M). Na 2 SO 4 , NaCl, and NaNO 3 contain the same cationic Na + but different anions.
The result is consistent with previous work [28]. The main difference is that this salt sensitivity can be used as an input signal to construct a logic gate system of drug molecules. According to the above test results, we selected Na 2 SO 4 as the representative salt to discuss the sensitivity of the PDEA films. Na 2 SO 4 caused the phase transition of the PDEA film, which was essentially the same as the temperature-induced phase change [37,38]. When the Na 2 SO 4 concentration was lower than the critical concentration, PDEA exhibited a loose linear structure in which drugs easily diffused, resulting in increased CV response. When the Na 2 SO 4 concentration became higher than its critical concentration, the hydrogen bonds between PDEA and water molecules considerably weakened, leading to a dense globular structure and preventing the drug molecules from reaching the electrode surface for electron exchange. The structural changes caused by the salt concentration can be further demonstrated by  (Table 1). The average thickness of PDEA films was 207 µm in the presence of 0.35 M Na 2 SO 4 , much smaller than 410 µm in the absence of Na 2 SO 4 ( Table 1).

Methanol-Responsive Behaviors of Poly(N,N-Diethylacrylamide) Films
The CV response of matrine and sophoridine on the PDEA electrode is also sensitive to the fraction of methanol in the mixture of water. When the content of methanol was lower than 20%, the CV responses of the drug molecular probes were very large and the peak currents were basically the same, indicating that the methanol content had little effect on the CV response. However, the CV peak current decreased to the minimum value at 10 µA when the content of methanol was between 20% and 30%. The behavior is reversible and can be repeated over several cycles ( Figure 7C,D). When the content of methanol continues to increase, the CV response signals of the drug probes will increase with the increasing methanol content ( Figure 7A,B). The switchable behavior is reversible and can be repeated over several cycles ( Figure 7C,D), and only a very small decrease of I pa is observed with the increase of cycles, although the reason for the decrease is not yet clear.  (Table 1).

Methanol-Responsive Behaviors of Poly(N,N-Diethylacrylamide) Films
The CV response of matrine and sophoridine on the PDEA electrode is also sensitive to the fraction of methanol in the mixture of water. When the content of methanol was lower than 20%, the CV responses of the drug molecular probes were very large and the peak currents were basically the same, indicating that the methanol content had little effect on the CV response. However, the CV peak current decreased to the minimum value at 10 μA when the content of methanol was between 20% and 30%. The behavior is reversible and can be repeated over several cycles ( Figure  7C,D). When the content of methanol continues to increase, the CV response signals of the drug probes will increase with the increasing methanol content ( Figure 7A,B). The switchable behavior is reversible and can be repeated over several cycles ( Figure 7C,D), and only a very small decrease of Ipa is observed with the increase of cycles, although the reason for the decrease is not yet clear. In the control experiments, the oxidation peak currents of matrine and sophoridine at the bare electrode showed no significant difference between the solution containing 0% and 20% methanol ( Figure S9). We assumed that this is related to the structure change of PDEA. In previous literature, it was reported [39][40][41] that due to the inability of the tertiary amide groups in PDEA structures to form intramolecular hydrogen bonds, a compact spherical structure could not be formed, unlike PNIPAM which has a secondary amide group, which can form both intramolecular hydrogen bonds and extramolecular hydrogen bonds. Therefore, PNIPAM has a coil-to-globule-to-coil transition in water/methanol solutions of different proportions. This was further demonstrated by electrochemical signal testing (Figure 7). When the methanol fraction reaches 20%, the oxidation peak current heights of matrine and sophoridine decrease to 4.2 μA and 4.1 μA on the PNIPAM film electrode, respectively. However, their oxidation peak current heights merely reach 10 μA and 8.5 μA on PDEA film electrode, respectively. Meanwhile, we compared PDEA surface with PNIPAM using SEM ( Figure S10). We found that the pore diameter of PNIPAM was much smaller than PDEA after 20% methanol treatment, which further supported the view that PDEA cannot form a compact In the control experiments, the oxidation peak currents of matrine and sophoridine at the bare electrode showed no significant difference between the solution containing 0% and 20% methanol ( Figure S9). We assumed that this is related to the structure change of PDEA. In previous literature, it was reported [39][40][41] that due to the inability of the tertiary amide groups in PDEA structures to form intramolecular hydrogen bonds, a compact spherical structure could not be formed, unlike PNIPAM which has a secondary amide group, which can form both intramolecular hydrogen bonds and extramolecular hydrogen bonds. Therefore, PNIPAM has a coil-to-globule-to-coil transition in water/methanol solutions of different proportions. This was further demonstrated by electrochemical signal testing (Figure 7). When the methanol fraction reaches 20%, the oxidation peak current heights of matrine and sophoridine decrease to 4.2 µA and 4.1 µA on the PNIPAM film electrode, respectively. However, their oxidation peak current heights merely reach 10 µA and 8.5 µA on PDEA film electrode, respectively. Meanwhile, we compared PDEA surface with PNIPAM using SEM ( Figure S10). We found that the pore diameter of PNIPAM was much smaller than PDEA after 20% methanol treatment, which further supported the view that PDEA cannot form a compact spherical structure. The structural changes caused by the methanol fraction could be further demonstrated by stereomicroscopy ( Table 1). The average thickness of PDEA films was 328 µm in the presence of 20% methanol. The result proves that PDEA hydrogel was not fully contracted (Table 1).

Electrocatalysis by Carboxylated Multi-Walled Carbon Nanotubes
In the logic gate system, adding an input is relatively easy, but adding an output signal is difficult. Even so, people are still working in this direction, because the logic gate with more output has a faster processing speed and stronger processing capacity, which can solve more complex practical problems. To increase the complexity of the logic gate circuit in this experiment, we used electrocatalytic amplification to increase the oxidation peak current of the drug probes and the number of threshold values.
Due to their unique properties and potential applications, carbon nanotubes (CNTs) have become a hot topic worldwide. CNTs are divided into MWCNTs and single-walled carbon nanotubes (SWCNTs). MWCNTs consist of cylindrical graphene sheets of nanometer-scale diameters [42][43][44], which show unique properties, such as high electrical conductivity [45][46][47], high chemical stability [48,49], and extremely high mechanical strength and modulus [44,46]. However, their application is limited by the poor dispersion of MWCNTs. Hence, we prepared carboxylated multiwalled carbon nanotubes (c-MWCNTs) with good dispersion. The preparation methods and characterization are described in Supplementary materials. c-MWCNTs are often constructed on the electrode surface and used as electrochemical sensors to determine compounds. For example, Heidarimoghadam's group [50] developed a novel method for quantifying furosemide in biological fluids based on the electro-reduction of Zn(II)-furosemide complex at a GC electrode modified with c-MWCNTs. The sensor was used for quantifying furosemide in drug and biological fluid samples. Bhawna and coworkers [51] explored an improved amperometric glutamate biosensor fabricated by immobilization of glutamate oxidase onto a hybrid of c-MWCNTs and gold nanoparticles attached onto a gold electrode through chitosan film, which showed remarkably enhanced sensitivity and selectivity for glutamate.
In our work, we constructed c-MWCNTs as the catalytic layer and PDEA as the outside stimulus response layer. Electrocatalytic amplification enables higher oxidation peak currents, which can increase the sensor's threshold and the complexity of the logic gate. Through continuous testing, the optimum concentration of c-MWCNTs in combination with drug probes was 5 mg mL −1 ( Figure 8A). The I pa of matrine at c-MWCNTs/PDEA-film electrode increased considerably in comparison with the PDEA-film electrode ( Figure 8A, curves a and f). The effective area of the electrode surface can be increased because of the large specific surface area of c-MWCNTs. The electron transfer between the electroactive molecules and electrode can be greatly promoted by c-MWCNTs due to its excellent conductivity. In addition, the coverage of c-MWCNTs on the electrode surface can also improve the porosity of the films. The linear range of the calibration curve for matrine is from 1.50 to 13.10 mM (Figure 8B, Inset) and could be expressed by the equation I (MT) (µA) = 2.895 + 4.040·c (MT) (mM) (R = 0.995), the detection limit is 2.01 × 10 −4 M (S/N = 3). Similarly, the oxidation peak current of sophoridine is also proportional to its concentration range of 5.40-18.70 mM in solution, and the linear equation is I (SR) (µA) = 3.642 + 3.681·c (SR) (mM), (R = 0.996) and the detection limit is 1.98 × 10 −4 M (S/N = 3). To examine the repeatability of the system, five c-MWCNTs/PDEA film electrodes were fabricated independently under the same conditions, and each of the five sensors was used to detect 10.00 mM matrine and sophoridine by repeated elution and determination in triplicate. The relative standard deviations (RSD) are 4.5% and 4.8%, respectively, suggesting that the system has good repeatability.

Switchable Electrocatalysis Controlled by pH, Temperature, SO4 2− Concentration and Methanol
Matrine and sophoridine exhibited pH-, temperature-, SO4 2− -and methanol-sensitive CV behavior on the c-MWCNTs/PDEA electrodes (Figure 9). For example, at pH 9.0 and 25 °C, when the c-MWCNTs/PDEA-film electrode was placed in the solution containing matrine without SO4 2− and methanol, a large CV catalytic oxidation wave was observed ( Figure 9A, curve a). However, when the same c-MWCNTs/PDEA film was placed in the same solution at 40 °C, the electrocatalytic response became extremely small ( Figure 9A, curve c) because the film was turned "off" for matrine at 40 °C, leading to the disruption of catalytic reactions. Therefore, the electrocatalytic oxidation of matrine can be switched "on-off" states by regulating the temperature of the solution between 25 °C and 40 °C. This temperature-sensitive and controllable electrocatalysis is reversible and can be repeated many times ( Figure S11B). In addition, the CV oxidation peak current ratio, Ipa25/Ipa40, could be amplified by electrocatalysis, where Ipa25 and Ipa40 represented CV oxidation peak currents at 25 °C and 40 °C for the same c-MWCNTs/PDEA films, respectively. At the PDEA-film electrode in NaCl supporting solutions containing 0.010 M matrine, the Ipa25/Ipa40 ratio was about 8.3, whereas the ratio increased to about 15 at the c-MWCNTs/PDEA-film electrode. The electrocatalysis of matrine for the system can be modulated by SO4 2− concentration. This electrocatalytic behavior was at the "on" state in NaCl solutions containing matrine without SO4 2− at 25 °C ( Figure 9A, curve a). By contrast, the system was turned "off" when the SO4 2− concentration was 0.35 M ( Figure 9A, curve b). SO4 2− -triggered electrocatalysis of matrine can also be switched between the "on" and "off" states repeatedly and reversibly ( Figure S11C). The electrocatalysis of matrine can be modulated by pH, but the regulation mechanism is different from the temperature and SO4 2− . Temperature and SO4 2− primarily affected the PDEA part of the binary c-MWCNTs/PDEA structure, whereas pH primarily affected the existing forms of the drug probes, causing them to exist as either molecules or ions. For example, matrine exists as a molecule at pH 9.0; when the c-MWCNTs/PDEA-film electrode was placed in the solution containing 0.010 M matrine without SO4 2− at 25 °C, a large CV catalytic oxidation wave appeared ( Figure 9A, curve a). However, at pH 4.0, the electrocatalytic response became extremely small ( Figure 9A, curve e). pH-triggered electrocatalysis of matrine could also be switched between the "on" and "off" states repeatedly and reversibly ( Figure S11A). The effect of methanol is the most special. The presence of methanol can actually make the Ipa height of the drug probes change at the PDEA film electrode, however, when the fraction of methanol is 25%, the peak current cannot reach the minimum point, that is, the PDEA film cannot be completely closed. In

Switchable Electrocatalysis Controlled by pH, Temperature, SO 4 2− Concentration and Methanol
Matrine and sophoridine exhibited pH-, temperature-, SO 4 2− -and methanol-sensitive CV behavior on the c-MWCNTs/PDEA electrodes ( Figure 9). For example, at pH 9.0 and 25 • C, when the c-MWCNTs/PDEA-film electrode was placed in the solution containing matrine without SO 4 2− and methanol, a large CV catalytic oxidation wave was observed ( Figure 9A, curve a). However, when the same c-MWCNTs/PDEA film was placed in the same solution at 40 • C, the electrocatalytic response became extremely small ( Figure 9A, curve c) because the film was turned "off" for matrine at 40 • C, leading to the disruption of catalytic reactions. Therefore, the electrocatalytic oxidation of matrine can be switched "on-off" states by regulating the temperature of the solution between 25 • C and 40 • C. This temperature-sensitive and controllable electrocatalysis is reversible and can be repeated many times ( Figure S11B). In addition, the CV oxidation peak current ratio, I pa25 /I pa40 , could be amplified by electrocatalysis, where I pa25 and I pa40 represented CV oxidation peak currents at 25 • C and 40 • C for the same c-MWCNTs/PDEA films, respectively. At the PDEA-film electrode in NaCl supporting solutions containing 0.010 M matrine, the I pa25 /I pa40 ratio was about 8.3, whereas the ratio increased to about 15 at the c-MWCNTs/PDEA-film electrode. The electrocatalysis of matrine for the system can be modulated by SO 4 2− concentration. This electrocatalytic behavior was at the "on" state in NaCl solutions containing matrine without SO 4 2− at 25 • C ( Figure 9A, curve a). By contrast, the system was turned "off" when the SO 4 2− concentration was 0.35 M ( Figure 9A, curve b). SO 4 2− -triggered electrocatalysis of matrine can also be switched between the "on" and "off" states repeatedly and reversibly ( Figure S11C). The electrocatalysis of matrine can be modulated by pH, but the regulation mechanism is different from the temperature and SO 4 2− . Temperature and SO 4 2− primarily affected the PDEA part of the binary c-MWCNTs/PDEA structure, whereas pH primarily affected the existing forms of the drug probes, causing them to exist as either molecules or ions. For example, matrine exists as a molecule at pH 9.0; when the c-MWCNTs/PDEA-film electrode was placed in the solution containing 0.010 M matrine without SO 4 2− at 25 • C, a large CV catalytic oxidation wave appeared ( Figure 9A, curve a). However, at pH 4.0, the electrocatalytic response became extremely small ( Figure 9A, curve e). pH-triggered electrocatalysis of matrine could also be switched between the "on" and "off" states repeatedly and reversibly ( Figure S11A). The effect of methanol is the most special. The presence of methanol can actually make the I pa height of the drug probes change at the PDEA film electrode, however, when the fraction of methanol is 25%, the peak current cannot reach the minimum point, that is, the PDEA film cannot be completely closed. In other words, when the solution contains no methanol, matrine showed a large oxidation peak current, however, when the methanol proportion increased to 20%, the peak currents decreased to 30 µA and 28 µA, respectively ( Figure 9A,B, curve b), and this behavior could be repeated over many cycles ( Figure S11D). The temperature-, salt-and methanol-sensitive behavior of the film electrodes mainly depends on the morphological changes and swelling, which have good reproducibility and were demonstrated by SEM and stereomicroscopy results ( Figure 5 and Table 1). However, the structure change of the films with pH is less possible for our system.
other words, when the solution contains no methanol, matrine showed a large oxidation peak current, however, when the methanol proportion increased to 20%, the peak currents decreased to 30 μA and 28 μA, respectively ( Figure 9A,B, curve b), and this behavior could be repeated over many cycles ( Figure S11D). The temperature-, salt-and methanol-sensitive behavior of the film electrodes mainly depends on the morphological changes and swelling, which have good reproducibility and were demonstrated by SEM and stereomicroscopy results ( Figure 5 and Table  1). However, the structure change of the films with pH is less possible for our system.

Establishment of a 6-Input/5-Output Logic Gate
The foundation of advanced and more complicated molecular logic devices is composed of basic or simple binary logic gates. A 6-input/5-output logic gate was developed on the basis of the above experimental results. The definitions of the six inputs are described in Table 2. The Ipa absolute values of matrine and sophoridine at the c-MWCNTs/PDEA-film electrodes within five different ranges were divided into five outputs with four thresholds (35, 25, 15, and 5 μA) according to different mechanisms. The 64 possible combinations of the six inputs and corresponding outputs are listed in Table S1, and the corresponding diagram is presented in Figure  10A. The Output A (Ipa ≥ 35 μA), of which input combinations were (011011), (111011), and (101011), was at the "1" state, and Outputs B, C, D, and E were at the "0" state. In these three cases, the films not only assumed a swollen structure but also the inner layer of the GC electrode contained c-MWCNTs. The electrocatalysis of drug probes by c-MWCNTs thus resulted in the largest CV response. The Output B (35 μA < Ipa ≤ 25 μA), which input combinations were (101001), (011001)and (111001), was at the "1" state, and Outputs A, C, D, and E were at the "0" state. When the methanol content was 20%, PDEA was not completely closed. c-MWCNTs would catalyze matrine and sophoridine to increase the oxidation peak current. With input combinations of (011010), (111010), and (101010), Output C (25 μA < Ipa ≤ 15 μA) was at the "1" state, while Outputs A, B, D, and E were at the "0" state. In these three cases, the PDEA films also assumed a swollen structure, but the inner layer of the GC electrode did not contain c-MWCNTs. Electrocatalysis is almost impossible in this situation, but the drugs were still able to diffuse through the films and easily transfer electrons to the electrode, thus resulting in a mid-range CV response. With input combinations of (011000), (111000), or (101000), Output D (15 μA < Ipa ≤ 5 μA) was at the "1" state, while Outputs A, B, C, and E were at the "0" state. When the solution contains 20% methanol and there is no c-MWCNTs layer assembled in the film electrode, PDEA hydrogel films cannot completely close and drug molecules can partially penetrate to the electrode surface and generate electrochemical signals. Output E (Ipa < 5 μA) was at "1" state in the remaining 52 combinations, while Outputs A, B, C, and D were at the "0" state. Under these conditions, the PDEA films changed into a compact structure, the drug

Establishment of a 6-Input/5-Output Logic Gate
The foundation of advanced and more complicated molecular logic devices is composed of basic or simple binary logic gates. A 6-input/5-output logic gate was developed on the basis of the above experimental results. The definitions of the six inputs are described in Table 2. The I pa absolute values of matrine and sophoridine at the c-MWCNTs/PDEA-film electrodes within five different ranges were divided into five outputs with four thresholds (35,25,15, and 5 µA) according to different mechanisms. The 64 possible combinations of the six inputs and corresponding outputs are listed in Table S1, and the corresponding diagram is presented in Figure 10A. The Output A (I pa ≥ 35 µA), of which input combinations were (011011), (111011), and (101011), was at the "1" state, and Outputs B, C, D, and E were at the "0" state. In these three cases, the films not only assumed a swollen structure but also the inner layer of the GC electrode contained c-MWCNTs. The electrocatalysis of drug probes by c-MWCNTs thus resulted in the largest CV response. The Output B (35 µA < I pa ≤ 25 µA), which input combinations were (101001), (011001)and (111001), was at the "1" state, and Outputs A, C, D, and E were at the "0" state. When the methanol content was 20%, PDEA was not completely closed. c-MWCNTs would catalyze matrine and sophoridine to increase the oxidation peak current. With input combinations of (011010), (111010), and (101010), Output C (25 µA < I pa ≤ 15 µA) was at the "1" state, while Outputs A, B, D, and E were at the "0" state. In these three cases, the PDEA films also assumed a swollen structure, but the inner layer of the GC electrode did not contain c-MWCNTs. Electrocatalysis is almost impossible in this situation, but the drugs were still able to diffuse through the films and easily transfer electrons to the electrode, thus resulting in a mid-range CV response. With input combinations of (011000), (111000), or (101000), Output D (15 µA < I pa ≤ 5 µA) was at the "1" state, while Outputs A, B, C, and E were at the "0" state. When the solution contains 20% methanol and there is no c-MWCNTs layer assembled in the film electrode, PDEA hydrogel films cannot completely close and drug molecules can partially penetrate to the electrode surface and generate electrochemical signals. Output E (I pa < 5 µA) was at "1" state in the remaining 52 combinations, while Outputs A, B, C, and D were at the "0" state. Under these conditions, the PDEA films changed into a compact structure, the drug molecular probes hardly diffused through the films to reach the electrode surface, or the drugs were present in the form of a nitrogen cationic radical, or both of these things happened at the same time, leading to an extremely small CV signal. The response characteristics and thresholds of each output are summarized in Table 3. The symbolic representation of the 6-input/5-output logic gate is visualized in Figure 10B, which shows the combination of OR, NOT, INHIBIT, AND, and IMP (IMPLICATION) gates [2,10,52].
Sensors 2018, 18, x FOR PEER REVIEW 13 of 18 molecular probes hardly diffused through the films to reach the electrode surface, or the drugs were present in the form of a nitrogen cationic radical, or both of these things happened at the same time, leading to an extremely small CV signal. The response characteristics and thresholds of each output are summarized in Table 3. The symbolic representation of the 6-input/5-output logic gate is visualized in Figure 10B, which shows the combination of OR, NOT, INHIBIT, AND, and IMP (IMPLICATION) gates [2,10,52].    The phase transition of PDEA was appeared or drugs were present in the form of nitrogen cationic radical or both of these things happen at the same time

Fabrication of a 2-to-1 Encoder
An encoder is a logic device that can compress information. Thus, the function of the 2-to-1 encoder is to compress 2 inputs into 1 output [53]. Herein, to establish the 2-to-1 encoder, pH (Input A) and c-MWCNTs/PDEA binary electrode (Input F) were chosen as the two inputs, and one of the CV peak currents at 1.02 V or 0.91 V (Output C) was selected as the single output in the 0.010 M drug probe solution with no SO 4 2− and methanol at 25 • C. Output C in the above logic gate system was selected as the sole output, so that these definitions were consistent with those in the above logic gate system. For this device, if the input was set at (1,0), Output C would be at the "1" state at PDEA film electrodes in NaCl solutions at pH 9.0, the presence of the drug in the pH 9.0 solution is molecular, which would lead to a CV response larger than the threshold of 15 µA. If the input changed to (0,1), however, Output C would be at the "0" state because neither matrine nor sophoridine can exist in molecular form. The truth table of this simple 2-to-1 encoder is presented in Figure 11 accompanied with the schematic representation. It should be understood that for all of the non-explicitly defined input combinations such as (0,0) and (1,1), the corresponding outputs are treated as irrelevant [53].   The phase transition of PDEA was appeared or drugs were present in the form of nitrogen cationic radical or both of these things happen at the same time

Fabrication of a 2-to-1 Encoder
An encoder is a logic device that can compress information. Thus, the function of the 2-to-1 encoder is to compress 2 inputs into 1 output [53]. Herein, to establish the 2-to-1 encoder, pH (Input A) and c-MWCNTs/PDEA binary electrode (Input F) were chosen as the two inputs, and one of the CV peak currents at 1.02 V or 0.91 V (Output C) was selected as the single output in the 0.010 M drug probe solution with no SO4 2− and methanol at 25 °C. Output C in the above logic gate system was selected as the sole output, so that these definitions were consistent with those in the above logic gate system. For this device, if the input was set at (1,0), Output C would be at the "1" state at PDEA film electrodes in NaCl solutions at pH 9.0, the presence of the drug in the pH 9.0 solution is molecular, which would lead to a CV response larger than the threshold of 15 μA. If the input changed to (0,1), however, Output C would be at the "0" state because neither matrine nor sophoridine can exist in molecular form. The truth table of this simple 2-to-1 encoder is presented in Figure 11 accompanied with the schematic representation. It should be understood that for all of the non-explicitly defined input combinations such as (0,0) and (1,1), the corresponding outputs are treated as irrelevant [53].

Conclusions
The multi-responsive c-MWCNTs/PDEA films were successfully prepared on GC electrodes through combination of c-MWCNT inner layers and PDEA hydrogel surface layers. The films exhibited reversible pH-, temperature-, SO 4 2− and methanol dependent CV on-off behavior toward the drug molecules matrine and sophoridine. This multi-triggered switchable behavior can be used to achieve the multiple controllable electrochemical oxidation of matrine and sophoridine catalyzed by c-MWCNTs. Although numerous studies have reported on multi-signal controlled electrochemistry [54][55][56], this unique system includes the following points: (1) The combination of the c-MWCNTs/PDEA dual structure film and drug molecular eletrocatalysis was used to construct a logic gate network and device for the first time; (2) Works on multi-switchable electrocatalysis of drugs, especially those used in traditional Chinese medicine, have been extremely limited to date; (3) The complexity of the logical gate system was increased by increasing the input of the stimulus, which was divided into five different CV oxidation peaks ranges according to different mechanisms; (4) The methanol sensitive property of PDEA hydrogel films was investigated by the CV method. Because the PDEA hydrogel films could not be closed completely upon external stimuli of methanol, the drug molecules still could be catalyzed by the c-MWCNTs inner layer. This work presents several potential applications and some bold predictions. Although the current work is still in the preliminary research stage, it does reflect the progress of a logic gate network. The multi-sensitive interface was coupled with electrocatalysis so that the logic gate system could be developed, thereby providing a novel approach to solve certain problems, such as biomedical diagnosis, the design of novel drug sensors, and molecular devices in the future.