Architecture of Molecular Logic Gates: From Design to Application as Optical Detection Devices

: Three decades after A. P. de Silva’s seminal paper introduced the concept of logic gates at the molecular level, the field of molecular logic gates (MLGs) has witnessed significant advancements. MLGs are devices designed to perform logical operations, utilizing one or more physical or chemical stimulus signals (inputs) to generate an output response. Notably, MLGs have found diverse applications, with optical detection of analytes emerging as a notable evolution of traditional chemosensors. Organic synthesis methods are pivotal in crafting molecular architectures tailored as optical devices capable of analyte detection through logical functions. This review delves into the fundamental aspects and physical–chemical properties of MLGs, with a particular emphasis on synthetic strategies driving their design.


Introduction
The investigation of the chemical composition of matter has long been a subject of broad interest.Nowadays, this interest has become more of a case of necessity.The constant threat of chemical contamination of soil, air, water, food, beverages, and cosmetics has threatened human security.In this context, scientists have devoted countless efforts to developing analytical tools capable of detecting and quantifying different chemical species.The efficiency of these tools is directly linked to their ability to detect and quantify analytes in low concentration (ppm or ppb) quickly, selectively, and inexpensively.The World Health Organization states that an optical detection device should be affordable, sensitive, specific, user-friendly, rapid/robust, equipment-free, and deliverable (ASSURED) [1,2].
Organic and analytical chemists have joined forces, in an interdisciplinary environment, to develop optical detection sensors for the selective recognition of an analyte.Organic synthesis plays a crucial role as a tool for the development of sensitive materials in chemical sensors [3][4][5].These materials encompass functionalized polymeric materials, nanomaterials, or simply molecular ligands, as long as they exhibit affinity toward specific analytes and translate this affinity into analytically useful signals [6].In the case of optical chemical sensors, it is evident that the chemical environment influences the optical properties of chromophores and fluorophores.Changes in pH, solvent composition, oxygen presence, and the introduction of analytes, which can be neutral, radical, cationic, or anionic, are some examples of perturbations that can induce significant alterations in the photophysical behavior of such devices [5,7,8].Under this perspective, analytical chemistry addresses qualitative and quantitative analyses to process this sign and determine the chemical composition by recognizing these analytes [9,10].
The design of these compounds has evolved over the last few decades to increase their efficiency.One of the most modern approaches is the concept of molecular logic gates (MLGs)-molecules capable of performing logical operations based on one or more physical or chemical stimulus signals (inputs) to produce an output response [11].The study of MLGs is a new interdisciplinary field involving chemistry, physics, electronics, Boolean algebra, and computing concepts related to molecular structures [12].
We perceive logic gates as fundamental mathematical constructs that can be applied in different fields.This applicability extends to the field of chemistry, where notable advancements have been observed in recent years.Among the areas of particular interest, we highlight (1) the construction of nanodevices, especially nanoenzymes [13] or even functionalized carbon dots [14] used as MLGs.These systems are particularly interesting because of their increasingly small size, which lengthens the prediction of Moore's law.
(2) Dynamic systems, which aim to generate a cascade system, are also exciting: a logical and modulable sensing output is responsible for subsequent movements/reactions.We envision such systems potentially resolving challenges in pharmacological or medical domains, such as managing pharmacokinetics for specific compounds [15,16].(3) Regarding the application, MLGs focused on food security currently stand out not only because of the current global scenario and the growing concern about the indiscriminate use of pesticides and polluting agents but also because of the prospect of constructing multianalyte detection systems.In this sense, detection systems based on combinatorial MLGs, such as lab-on-a-molecule [17], adders, and comparators [18], stand out.
Although the development of MLGs is structured in an interdisciplinary field, organic synthesis plays a primary role in elaborating most of these devices.In this sense, this review aims to discuss several synthetic strategies in planning MLGs associated with their applications and optical properties.Therefore, the examples discussed here were selected to bring a diversity of fluorescent cores, analytes, and optical responses.These examples were mainly selected based on the synthesis and diversity strategies in MLG classifications.

Analytes 2.1. Potential Toxic Metals
Exposure to potentially toxic metals, such as lead, cadmium, mercury, and aluminum, can result in severe health damage [19].These exposures originate from different sources, mainly environmental pollution, contaminated air, soil, and water.
Among these toxic contaminants, mercury is notable for its damage to human health, even at low doses, compromising nervous, renal, cardiorespiratory, immune, and reproductive systems [20][21][22].Its affinity with compounds containing thiol groups, present in proteins and enzymes, is the leading cause of the harmful effect on life [7][8][9].Another example of a toxic metal is lead [23,24], whose prolonged exposure severely damages health, mainly through nerve system damage [25,26].Cd 2+ ions have a high affinity for metallothioneins in the liver, kidneys, intestines, and brain [27][28][29].For this reason, this metal can also lead to several effects on the body.Despite aluminum's abundance in the earth's crust and its versatility in various applications [30,31], exposure to this metal may be associated with neurological disorders, such as Alzheimer's disease, osteomalacia, and breast cancer [32][33][34].
Other metals, such as nickel, copper, and zinc, are deemed essential micronutrients and play important roles in maintaining the healthy functioning of the human body [35].Even so, the excessive accumulation of these substances can also compromise health.For instance, Ni 2+ is crucial for biosynthesis and metabolism, but its excess may cause dermatitis, asthma, pneumonitis, disorders of the central nervous system, and cancer [36,37].In excess, Cu 2+ , fundamental in redox activity, can provoke amyloid precipitation and contribute to developing Wilson's, prion, and Parkinson's diseases [35,[38][39][40].Zinc accumulation in the human body can cause diabetes, epilepsy, brain, Alzheimer's, and Parkinson's disease [41][42][43][44].

Alkaline and Alkaline Earth Metals
Alkaline cations such as Na + and K + , predominantly found in saline water, are related to critical biological processes.These include regulating blood and body fluid homeostasis, skeletal and smooth muscle, taste and pain sensation, and signal transduction in animals [45][46][47][48][49][50].In excess in the human body, Na + is associated with various health issues, including water retention and hypertension [51].Alteration of K + ions in the human system can provoke effects such as muscle cramps or weakness, diarrhea, dehydration, changes in heart rhythms, and others [52][53][54][55][56].The deficiency of Ca 2+ , present in the composition of teeth and bones, can result in osteoporosis.However, excessive amounts of calcium intake can result in muscle relaxation, kidney stones, and bone pain [57][58][59].

Anionic Species
Anions such as cyanide, fluoride, acetate, and phosphate, among many others, can also significantly interfere with different aspects of life.For instance, cyanide displays toxic effects by forming complexes with ferric ions in some enzymes' active sites.This reaction interferes with the electron transport chain, compromising the tissue's ability to utilize oxygen effectively [60,61].Therefore, this anion can cause acute and systemic toxicity, leading to rapid cardiovascular collapse [60,[62][63][64].
The fluoride (F − ) ion, added in toothpaste and drinking water to prevent dental caries, is associated with healthy bones, hair, and nails.However, excessive F − intake can result in dental or skeletal fluorosis, renal lithiasis, and other disorders [65].
The acetate (AcO − ) anion is highly important due to its application as an indicator of organic decomposition in marine sediments [66,67], in controlling microbial growth, and as an additive in foods to extend shelf life and also to improve sensory properties [68,69].Phosphates, used as fertilizer for agriculture, may exhibit risks to communities when used excessively [70], leading to the growth of algae and plants, hampering their use [71].Consequently, excessive algae growth can decrease dissolved oxygen, ultimately resulting in the death of aquatic organisms.
Despite their relevance, the detection of anions poses greater complexity than cations.Designing anionic recognition sensors requires considering molecular geometry, stereochemistry, and energy-related properties, such as enthalpy, entropy, Gibbs free energy, and solvation [72,73].In addition, anions such as HCO 3 − , NO 3 − , PO 4 3− , and HSO 4 − can exhibit different sizes and charges at various pH values, impacting their recognition and detection [74].

Neutral Species
The detection of ionic species by optical sensors relies on the interaction between electron-rich and electron-poor sites, involving or not chemical reaction.Therefore, detecting electrically neutral species represents a challenge in the sensing field [75].Still, many sensors have been developed to identify and quantify neutral species, such as amines, warfare agents, and toxic volatile compounds, among many others [75][76][77].Examples of target-neutral analytes include amino acids, which are essential for various metabolic processes and biological functions.Lysine (Lys), fundamental in the Krebs-Henseleit cycle and polyamine synthesis, plays a vital role in animal development [78,79].Histidine (His) is essential for the active sites of many enzymes and functional proteins, and it controls the transmission of metallic elements in biological systems [80,81].Tryptophan (Trp) is crucial for protein biosynthesis, animal growth, and plant development.The deficiency of certain amino acids can lead to various abnormalities [82].
Biogenic amines, which bear biologically active nitrogen, exhibit essential physiological functions, such as increased DNA, RNA, and protein synthesis and membrane stabilization [83,84].However, their high concentration in food may indicate microbial contamination [85].Chemical warfare agents, used to incapacitate people during conflict, threaten society's safety [86].One example of these agents is phosgene (COCl 2 ), a gas capable of irritating the respiratory tract and even causing death [87,88].

Optical Detection Devices
From the pioneering studies of Pedersen [89,90], Lehn [91], and Cram [92], a new era emerged in the development of receptors capable of identifying and selectively forming complexes with various substrates, some of which are mentioned above, through noncovalent interactions.These advances led to the development of the field known as Supramolecular chemistry, initially conceptualized by Lehn as "chemistry beyond the molecule".Based on concepts of molecular recognition and stored information within molecules, along with planning through self-assembly and preorganization, it has become essential to redefine supramolecular chemistry as the "chemistry of informed systems" [93][94][95][96].
The integration of analytical sciences into supramolecular chemistry has dramatically expanded our understanding of molecular recognition, self-assembly, and other fundamental processes.The construction of macrocycles and their interaction with substances form the basis of molecular recognition, understood as the energy and information involved in binding a substrate by a receptor molecule [97][98][99].The combination of supramolecular chemistry and optical detection has paved the way for numerous applications, including chemical sensors, biosensing, drug delivery systems, and materials science.
IUPAC defines chemical sensors as devices that convert chemical information into an analytically useful signal [6,100].Sensors can be designed as electrical, magnetic, optical, or colorimetric devices, depending on the type of signal they present [4,[101][102][103].Optical detection devices respond to specific analytes and can be created by connecting a molecule with intrinsic signaling behavior to a recognition system, which may be either molecular or supramolecular [99,104].In a simplified manner, optical devices can be categorized based on their interaction with the corresponding substance being detected.When optical devices interact with the analyte reversibly, they are known as Chemosensors (Scheme 1a).On the other hand, if their interaction is irreversible, they are referred to as Chemodosimeters (Scheme 1b).
From the pioneering studies of Pedersen [89,90], Lehn [91], and Cram [92], a new era emerged in the development of receptors capable of identifying and selectively forming complexes with various substrates, some of which are mentioned above, through noncovalent interactions.These advances led to the development of the field known as Supramolecular chemistry, initially conceptualized by Lehn as "chemistry beyond the molecule".Based on concepts of molecular recognition and stored information within molecules, along with planning through self-assembly and preorganization, it has become essential to redefine supramolecular chemistry as the "chemistry of informed systems" [93][94][95][96].
The integration of analytical sciences into supramolecular chemistry has dramatically expanded our understanding of molecular recognition, self-assembly, and other fundamental processes.The construction of macrocycles and their interaction with substances form the basis of molecular recognition, understood as the energy and information involved in binding a substrate by a receptor molecule [97][98][99].The combination of supramolecular chemistry and optical detection has paved the way for numerous applications, including chemical sensors, biosensing, drug delivery systems, and materials science.
IUPAC defines chemical sensors as devices that convert chemical information into an analytically useful signal [6,100].Sensors can be designed as electrical, magnetic, optical, or colorimetric devices, depending on the type of signal they present [4,[101][102][103].Optical detection devices respond to specific analytes and can be created by connecting a molecule with intrinsic signaling behavior to a recognition system, which may be either molecular or supramolecular [99,104].In a simplified manner, optical devices can be categorized based on their interaction with the corresponding substance being detected.When optical devices interact with the analyte reversibly, they are known as Chemosensors (Scheme 1a).On the other hand, if their interaction is irreversible, they are referred to as Chemodosimeters (Scheme 1b).
Scheme 1 shows the main strategies used when considering the development of a chemodosimeter: (a) the analyte can covalently bind to the chromogenic or fluorogenic chemosensor, leading to a variation in its optical properties; (b) the analyte can interact with the chemodosimeter and catalyze a chemical reaction that generates changes in color or fluorescence emission; and finally, (c) the analyte reacts with the chemodosimeter, releasing a leaving group with chromogenic or fluorogenic properties [104,105].
Scheme 1 shows the main strategies used when considering the development of a chemodosimeter: (a) the analyte can covalently bind to the chromogenic or fluorogenic chemosensor, leading to a variation in its optical properties; (b) the analyte can interact with the chemodosimeter and catalyze a chemical reaction that generates changes in color or fluorescence emission; and finally, (c) the analyte reacts with the chemodosimeter, releasing a leaving group with chromogenic or fluorogenic properties [104,105].

Planning Optical Devices Based on Sensing Mechanism
Comprehending the connection between the molecular structure and photophysical phenomena is crucial in designing fluorescent and colorimetric-based detection systems.The design of fluorescent devices employs several sensing mechanisms, including photoinduced electron transfer (PET), intramolecular charge transfer (ICT), fluorescence resonance energy transfer (FRET), chelation-enhanced fluorescence (CHEF), excited state intramolecular proton transfer (ESIPT), and aggregation phenomena.

Photoinduced Electron Transfer (PET)
Photoinduced electron transfer (PET) occurs when an electron is transferred to or from an electronically excited state of a molecule.An orbital in a portion of the molecule may possess energy between the energy levels of the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO) of the fluorophore [106].Electron-donating groups possess an outer orbital that is filled with electrons, and during electronic excitation, PET can occur from this orbital to the previously highest occupied molecular orbital (HOMO) of the fluorophore.Conversely, regions of the molecule with empty orbitals can accept electrons via PET from the fluorophore's lowest unoccupied molecular orbital (LUMO) [105,107].

Intramolecular Charge Transfer (ICT)
Intramolecular charge transfer (ICT)-based chemosensors contain an acceptor directly connected, via a π-system, to an electron-donating fluorophore.This design allows efficient electron transfer from the electron-rich donor moiety to the electron-poor acceptor moiety, both located within the same molecule.The donor and acceptor groups are connected through a π electron bridge [108].

Fluorescence Resonance Energy Transfer (FRET)
Fluorescence resonance energy transfer (FRET) is a non-radiative energy transfer process between a donor and an acceptor molecule.For FRET to occur, the donor and acceptor molecules must be in close proximity, and the emission spectrum of the donor molecule must overlap with the emission spectrum of the acceptor molecule to which it provides the energy transfer.Unlike PET, no electrons are transferred between the molecules [109,110].

Chelation-Enhanced Fluorescence (CHEF)
Chelation-enhanced fluorescence (CHEF) involves complexing a metal cation by a ligand within a fluorophore.During this process, the heteroatoms within the fluorophore form a chelate complex with cation, enhancing fluorescence [111].

Metal-to-Ligand Charge Transfer (MLCT)
Metal-to-ligand charge transfer (MLCT) transitions are prevalent in coordination complexes and organometallic compounds that feature π-acceptor ligands, where the metal exists in a lower oxidation state, indicating an electron-rich state.Upon light absorption, electrons residing on the metal orbitals become energized, transitioning to the π * orbitals of the ligand [112,113].

Excited State Intramolecular Proton Transfer (ESIPT)
Excited state intramolecular proton transfer (ESIPT) occurs in molecules containing proton donors and acceptors that allow the exchange of a hydrogen atom upon excitation.This process is often associated with the formation of isomers, such as tautomeric (keto-enol) equilibrium (Scheme 2) [114,115], similar to an acid-base reaction.The ESIPT process primarily occurs in systems where the proton donor is usually a hydroxyl and the acceptor group is carbonyl or nitrogen.However, donor and acceptor groups are nitrogen-based, and other similar configurations have also been described [116][117][118][119].

Excited State Intramolecular Proton Transfer (ESIPT)
Excited state intramolecular proton transfer (ESIPT) occurs in molecules contain proton donors and acceptors that allow the exchange of a hydrogen atom upon excitat This process is often associated with the formation of isomers, such as tautomeric (k enol) equilibrium (Scheme 2) [114,115], similar to an acid-base reaction.The ESIPT pro primarily occurs in systems where the proton donor is usually a hydroxyl and the accep group is carbonyl or nitrogen.However, donor and acceptor groups are nitrogen-ba and other similar configurations have also been described [116][117][118][119].
Scheme 2. Generic representation of the ESIPT process and its prevention by basic and met species in case of analyte detection.
An analyte can interfere with the ESIPT process (Scheme 2).A basic analyte, for stance, can remove this acid proton (3), or a cation can coordinate to this site (4), prev ing, in both cases, the ESIPT from occurring.Once this phenomenon is prevented, the tical properties of the sensor will be modified, and consequently, the presence of the a lyte can be confirmed.
The interruption of ESIPT by an analyte as a strategy in developing optical detec devices has been widely used.Therefore, different molecular architectures have been signed to contain proton donor groups close to proton acceptor groups.This is an effic strategy, as it enables the detection of both basic and acidic analytes.This review descr some chemical reactions that have made this molecular architecture possible in deve ing MLGs.

Aggregation
Aggregation-caused quenching (ACQ) occurs when strong intermolecular inte tions in an aggregated state result in fluorescence quenching [120].Conversely, aggre tion-induced emission (AIE) is a phenomenon where weakly fluorescent chromopho emit light upon aggregation.These effects may be attributed to phenomena that red the non-radiative relaxation pathways, such as intramolecular rotation restriction (R and J-aggregate formation (JAF), which are influenced by mechanical and thermal fac [121].

Architecture of Optical Sensor Devices
The typical molecular architecture of an optical sensor consists of at least one dete unit and at least one signaling unit, although these distinctions are blurred in some ca The detector unit is designed to interact specifically with an analyte, while the signa Scheme 2. Generic representation of the ESIPT process and its prevention by basic and metallic species in case of analyte detection.
An analyte can interfere with the ESIPT process (Scheme 2).A basic analyte, for instance, can remove this acid proton (3), or a cation can coordinate to this site (4), preventing, in both cases, the ESIPT from occurring.Once this phenomenon is prevented, the optical properties of the sensor will be modified, and consequently, the presence of the analyte can be confirmed.
The interruption of ESIPT by an analyte as a strategy in developing optical detection devices has been widely used.Therefore, different molecular architectures have been designed to contain proton donor groups close to proton acceptor groups.This is an efficient strategy, as it enables the detection of both basic and acidic analytes.This review describes some chemical reactions that have made this molecular architecture possible in developing MLGs.

Aggregation
Aggregation-caused quenching (ACQ) occurs when strong intermolecular interactions in an aggregated state result in fluorescence quenching [120].Conversely, aggregationinduced emission (AIE) is a phenomenon where weakly fluorescent chromophores emit light upon aggregation.These effects may be attributed to phenomena that reduce the non-radiative relaxation pathways, such as intramolecular rotation restriction (RIR) and J-aggregate formation (JAF), which are influenced by mechanical and thermal factors [121].

Architecture of Optical Sensor Devices
The typical molecular architecture of an optical sensor consists of at least one detector unit and at least one signaling unit, although these distinctions are blurred in some cases.The detector unit is designed to interact specifically with an analyte, while the signaling unit consists of a molecular structure that causes an optical response upon interacting the receptor unit with the analyte (Scheme 1a).Generally, this response is associated with changes in the electronic density of the optical sensor.For example, an interruption of electronic flow between a donor unit and a receptor unit due to interaction with an analyte can cause a change in color or fluorescence, allowing analyte recognition.
The design of an optical sensor relies on the combination of detector and signaling units.With numerous groups already discovered or developed, there are countless possibilities for combinations.In addition, there are cases of planning more than one signaling unit in the same device, so that after detection, more than one response is given-for example, a change in color and electrochemical potential [17].In other cases, more than one molecular or supramolecular group receptor can be installed in the signaling unit to obtain a device capable of detecting different chemical species [122][123][124][125][126].This last scenario is a classic strategy for planning optical and multi-analyte sensors.
The diversity in optical responses and the richness of structural possibilities demonstrate that the architecture of optical sensors offers a wide array of opportunities.In this context, organic synthesis is vital in designing sensor molecules.
The following topics illustrate typical examples of signaling and detector units with different molecular arrangements involving electron density donor and acceptor units.Examining each component of the structure is crucial in designing an optical sensor.The process entails connecting one or more receptors (molecular or supramolecular) to a signaling unit, either with a spacer or directly.

Choosing the Signaling Unit
The structural features of a molecule influence the dissipation of absorbed energy in the form of fluorescence.For instance, rigid and flat molecules bearing conjugated systems, such as aromatic groups, are inclined to exhibit fluorescent properties [127,128].The planar structure of a molecule enhances the interaction and conjugation within the π electron system, resulting in absorption through π → π* transitions (between antibonding π orbital and bonding π orbital).Absorption may also occur less frequently through n → π* transitions (between antibonding π orbital and non-bonding orbital) [120].
The scientific community is making intensive efforts to continuously develop new classes of chromophores and fluorophores using numerous synthetic methodologies [203].For instance, more recently, metal-catalyzed C−H activation [204], particularly through annulation, has emerged as a powerful synthetic strategy in elaborating fluorescent building blocks [205,206].This approach is especially noteworthy for the formation of chromophoric and fluorophoric groups, as metal-catalyzed C−H activation represents an important innovation capable of directly connecting aryl halides to (hetero)arenes by metal-promoted activation of a C−H bond [207][208][209].

Choosing the Receptor Unit
Regarding receptors, there are two approaches to constructing devices capable of identifying analytes, according to chemosensors and chemodosimeters definitions: association and chemical bonding.
In all these instances, the hard-soft acid-base (HSAB) theory is frequently employed to elucidate the stability of the formed adducts.However, other factors may also be related, such as cavity size, ion charge, and solvent effects: polarity, polarizability, acidity, and temperature [227].
The recognition of analytes based on chemical reactions often considers the type of functional group on the receptor device.Mohr et al. compiled a list of functional groups and neutral analytes that could be detected by forming linkages (Scheme 3) [75,228].

Choosing the Receptor Unit
Regarding receptors, there are two approaches to constructing devices capable of identifying analytes, according to chemosensors and chemodosimeters definitions: association and chemical bonding.
The recognition of analytes based on chemical reactions often considers the type of functional group on the receptor device.Mohr et al. compiled a list of functional groups and neutral analytes that could be detected by forming linkages (Scheme 3) [75,228].Scheme 3. Receptor functions can detect analyte molecules by forming a covalent bond.

Choosing the Assembly of the Device
To assemble an optical sensor, molecular devices can be engineered with various donor and acceptor group arrangements.For a molecule to operate as a sensor, it must efficiently transfer electrons and respond appropriately to the presence of the analyte.Therefore, some arrangements of donor and acceptor groups may include (a) D-A (donor-acceptor), (b) D-A-D (donor-acceptor-donor), and (c) A-D-A (acceptor-donor-acceptor) configurations, although other combinations are also possible.Figure 3 summarizes the order used to construct each arrangement, considering one, two, or more donor groups, depending mainly on the application to which the final molecule will be given.

Scheme 3.
Receptor functions can detect analyte molecules by forming a covalent bond.

Choosing the Assembly of the Device
To assemble an optical sensor, molecular devices can be engineered with various donor and acceptor group arrangements.For a molecule to operate as a sensor, it must efficiently transfer electrons and respond appropriately to the presence of the analyte.Therefore, some arrangements of donor and acceptor groups may include (a) D-A (donor-acceptor), (b) D-A-D (donor-acceptor-donor), and (c) A-D-A (acceptor-donor-acceptor) configurations, although other combinations are also possible.Figure 3 summarizes the order used to construct each arrangement, considering one, two, or more donor groups, depending mainly on the application to which the final molecule will be given.

D-A or D-pi-A:
This configuration comprises the most straightforward system and the most predictable optical response.In this case, there is a transfer of charge from the donor region to the acceptor region when the molecule interacts with a specific analyte or even its surrounding environment.A conjugate spacer may separate donor and acceptor groups.It is commonly related to the PET and ICT mechanisms [229][230][231].
D-A-D: Combinational logic gates involving multiple logic operations can be conveniently prepared through more complex arrangements, such as D-A-D [232,233].
A-D-A: This configuration refers to opposite structures to D-A-D systems.In A-D-A arrangements, electron acceptor groups are introduced into the donor structure.Designing MLGs with an acceptor-donor-acceptor architecture also offers an intriguing platform for preparing optical devices [234][235][236].

Integrating the Molecular Architecture
So far, we have demonstrated that an optical detection device is built by signaling and detector units articulated to present structural combinations with donor and acceptor regions.The optical response of this device is related to changes in molecular electronic density, involving processes such as PET, ICT, FRET, CHEF, MLCT, ESIPT, and aggregation.In this context, the molecular structure of an optical detection device is elaborated through the observation and understanding of these critical aspects.In implementing this structural planning, numerous synthetic tools provided by organic chemistry have been fundamental in elaborating the architecture of such devices.These tools serve various purposes in sensor design.For instance, joining signaling units with detectors, associating donor and acceptor units, pre-functionalize the molecule for sequential modification, changing optical properties by altering molecular conjugation, and changing the sensors' physical-chemical properties (increasing solubility, stability, and restricting conformation, among others).
Although there are numerous synthetic methods for building these devices, we can mention classic methodologies, such as imine formation, Knoevenagel reaction, nucleophilic aromatic and aliphatic substitutions, and functionalization of arenes.Additionally, other successful methodologies that have been explored include multicomponent (MCRs), pericyclic, and coupling reactions.
Multicomponent reactions (MCRs) offer an efficient and versatile approach to synthesizing complex molecules, making them essential tools in modern organic synthesis [237].In these reactions, three or more commercially available or readily accessible starting materials react to form a product, involving the contribution of essentially all or most of the atoms to the newly formed product, using a one-pot approach [238].MCRs have been successfully employed in constructing fluorescent building blocks suitable for application as signaling units in an optical detection device [239][240][241][242].
Heterocycles and aromatic rings are frequently synthesized or modified through cycloaddition reactions involving breaking pi bonds and forming sigma bonds.Various cycloaddition methods are employed to construct both essential units (signaling unit or receptor), and they can be used to connect these units (spacers).The coppercatalyzed azide-alkyne cycloaddition (CuAAC), a 1,3-dipolar cycloaddition reaction, to afford 1,4-disubstituted 1,2,3-triazoles is an important synthetic methodology in constructing optical detection devices (Scheme 4a).The triazole unit can perform three functions: (a) it serves as a connector for different molecular groups (donors, acceptors, receptors); (b) due to its nature as an aromatic heterocycle, the triazole ring conjugates with aromatic systems of the fluorophores/chromophore, modifying the optical properties of the device; (c) the nitrogen atom of the triazole, in association with other molecular groups, can function as a detector unit for metallic species (Scheme 4b) [243][244][245][246][247].
Halogenation reactions, characterized by substituting hydrogen atoms with halogens, such as chlorine, bromine, and iodine, hold considerable importance in synthetic processes.They serve as precursors for more intricate transformations, including coupling reactions, and are also utilized in simple substitution and elimination reactions.
tection devices (Scheme 4a).The triazole unit can perform three functions: (a) it serves as a connector for different molecular groups (donors, acceptors, receptors); (b) due to its nature as an aromatic heterocycle, the triazole ring conjugates with aromatic systems of the fluorophores/chromophore, modifying the optical properties of the device; (c) the nitrogen atom of the triazole, in association with other molecular groups, can function as a detector unit for metallic species (Scheme 4b) [243][244][245][246][247]. Halogenation reactions, characterized by substituting hydrogen atoms with halogens, such as chlorine, bromine, and iodine, hold considerable importance in synthetic processes.They serve as precursors for more intricate transformations, including coupling reactions, and are also utilized in simple substitution and elimination reactions.
The advent of coupling reactions, predominantly mediated by palladium, opened up an avenue of synthetic possibilities in the development of optical detection devices.Among these methodologies, noteworthy examples include Suzuki, Sonogashira, Heck, Stille, and Buchwald-Hartwig reactions (Scheme 4c).Using these synthetic methodologies in the construction of optical detection devices yields two fundamental effects: first, the extension of the molecular pi conjugation modulating optical properties, and second, the junction of The advent of coupling reactions, predominantly mediated by palladium, opened up an avenue of synthetic possibilities in the development of optical detection devices.Among these methodologies, noteworthy examples include Suzuki, Sonogashira, Heck, Stille, and Buchwald-Hartwig reactions (Scheme 4c).Using these synthetic methodologies in the construction of optical detection devices yields two fundamental effects: first, the extension of the molecular pi conjugation modulating optical properties, and second, the junction of units (donor, acceptor, fluorophore, chromophore, signaling, detector unit).The Buchwald-Hartwig reaction enables the formation of C-N bonds, and the NH group offers the possibility to unite two groups, afford a hydrogen atom that can interact with basic analytes, and be involved in ESIPT processes.Furthermore, the lone nitrogen electron pair can interact with cations and acid detector units.Conversely, Heck and Sonogashira reactions enable the formation of C-C bonds.In these reactions, the alkene and alkyne groups, respectively, join two molecular groups, contributing to the extension of pi conjugation.

Acid-Base Reactions or Hydrogen Bonding (H-Bonds) Interactions
The principles related to acid-base reactions can be effectively applied in the development of optical devices.In this strategy, H-bonds-based chemosensors contain hydrogen donor groups, such as OH, NH, and SH, within their molecular structure.These groups can interact with a basic analyte and trigger an acid-base reaction, changing the behavior of the signaling unit and allowing the sensor to detect and quantify the analyte [248].
Ghosh et al. developed the chemosensor 53 (Scheme 5a), an azine-based molecule prepared from the coupling of 2-hydroxy-1-naphthaldehyde (51) using hydrazine (N 2 H 4 •H 2 O; 52), designed for the recognition of acetate and Al 3+ [249].The interaction with Al 3+ depends on inhibition of the ESIPT phenomenon, isomerization of the CH-N bond, and enhancement of fluorescence resulting from metal complexation.On the other hand, the detection of acetate anion is attributed to H-bond formation with hydroxyl hydrogens.Scheme 5b illustrates the H-bonds mechanism between the chemosensor and acetate anion, and Scheme 5c shows the proposed Al 3+ sensing mechanism.

Displacement Assays
An alternative approach that has been used involves planning direct and indirect detection assays, working with a unique system containing molecular groups competing for a single receptor.In a simplified manner, a chromogenic or fluorogenic indicator (sensorindicator) binds reversibly to a receptor, forming a receptor-indicator complex.This complex alters the optical properties of the system, either the change in the solution's color or the intensity of fluorescence emission.The indicator is displaced upon adding a competitive analyte, and the receptor and the new analyte form a new complex.This new complex has a stability constant of greater magnitude than the previous complex.Consequently, the free indicator in solution will again present the optical properties observed before adding the receptor to the medium [250].

Displacement Assays
An alternative approach that has been used involves planning direct and indirect detection assays, working with a unique system containing molecular groups competing for a single receptor.In a simplified manner, a chromogenic or fluorogenic indicator (sensor-indicator) binds reversibly to a receptor, forming a receptor-indicator complex.This complex alters the optical properties of the system, either the change in the solution's color or the intensity of fluorescence emission.The indicator is displaced upon adding a competitive analyte, and the receptor and the new analyte form a new complex.This new complex has a stability constant of greater magnitude than the previous complex.Consequently, the free indicator in solution will again present the optical properties observed before adding the receptor to the medium [250].

Chromo-and Fluororeagents
In the chromo-and fluororeagent approaches, chemosensors establish a reversible covalent bond with the analyte, inducing significant changes in absorbance or fluorescence.The reaction between the chromoreagent and analyte builds the covalent bond, thereby altering the electronic delocalization of the chromophore and resulting in observable color changes.The reaction between an analyte and a fluorophore group, connected via a spacer with the receptor unit, frequently results in enhanced (or newly observed) fluorescence intensity by blocking the PET phenomenon [75,228].Such chemosensor allows the optical detection of electrically neutral analytes like alcohols, amines, thiols, and aldehydes.
For instance, Nedeljko et al. devised an optical detection system for continuous determination of biogenic amines, such as isopentylamine (67), n-propylamine (68), and putrescine (69), based on a layer of a sensitive dye in its trifluoroacetyl form (66) immobilized in SiO2 (Scheme 7) [252].The commercial chromoreagent ETH4001 (66) was immobilized in sol-gel layers prepared by different combinations of hydrophilic precursors of tetraethoxysilane and hydrophobic sol-gel.The response to primary amines was achieved through their reversible reaction with the chromoreagent.This reaction forms a covalent bond with the dye, transforming it into the hemiaminal form (70), whereby the color changes from red to yellow.According to the authors, the decrease in absorbance at 500

Chromo-and Fluororeagents
In the chromo-and fluororeagent approaches, chemosensors establish a reversible covalent bond with the analyte, inducing significant changes in absorbance or fluorescence.The reaction between the chromoreagent and analyte builds the covalent bond, thereby altering the electronic delocalization of the chromophore and resulting in observable color changes.The reaction between an analyte and a fluorophore group, connected via a spacer with the receptor unit, frequently results in enhanced (or newly observed) fluorescence intensity by blocking the PET phenomenon [75,228].Such chemosensor allows the optical detection of electrically neutral analytes like alcohols, amines, thiols, and aldehydes.
For instance, Nedeljko et al. devised an optical detection system for continuous determination of biogenic amines, such as isopentylamine (67), n-propylamine (68), and putrescine (69), based on a layer of a sensitive dye in its trifluoroacetyl form (66) immobilized in SiO 2 (Scheme 7) [252].The commercial chromoreagent ETH4001 (66) was immobilized in sol-gel layers prepared by different combinations of hydrophilic precursors of tetraethoxysi-lane and hydrophobic sol-gel.The response to primary amines was achieved through their reversible reaction with the chromoreagent.This reaction forms a covalent bond with the dye, transforming it into the hemiaminal form (70), whereby the color changes from red to yellow.According to the authors, the decrease in absorbance at 500 nm (red) can be attributed to the presence of 66.Conversely, the increase in absorbance at 420 nm (yellow) results from the formation of several products: a hemiacetal form (resulting from the interaction between TFA and alcohols), a diol form (resulting from the interaction between TFA and water), and a hemiaminal form (resulting from the interaction between TFA and amines).
Organics 2024, 5, FOR PEER REVIEW 15 420 nm (yellow) results from the formation of several products: a hemiacetal form (resulting from the interaction between TFA and alcohols), a diol form (resulting from the interaction between TFA and water), and a hemiaminal form (resulting from the interaction between TFA and amines).

Chemosensor
Chemosensors are optical devices based on reversible interaction with the analyte [106].For example, in some of these devices, a basic analyte can interact with proton donor groups (NH, OH, SH) via hydrogen bonding [248,253].These interactions, regardless of the complete transfer of hydrogen ions, can induce changes in the color or fluorescence emission of the chemosensor, thereby enabling the detection and quantification of the analyte [254,255].
One example of a chemosensor was described by Bhaumik et al. via synthesis of the phenanthro[9,10-d]imidazole (73) for the detection of fluoride, Fe 2+ , and Zn 2+ (Scheme 8a) [256].Compound 37 behaves as a solvatochromic chemosensor with different emission colors ranging from violet, blue, and green to yellow, which suggests that 73 could be used as a solvent polarity indicator.The colorless 73 solution (λabs 341-371 nm) becomes bright yellow (λabs 413 and 279 nm) upon adding F − or HO − (Scheme 8b; 74).Furthermore, F − induced a fluorescence quenching and a redshift in emission maximum from 475 to 485 nm.NMR investigation suggested that this phenomenon might be associated with the interaction or removal of the proton from NH groups.Adding Fe 2+ modified the colorless solution of compound 73 into a deep violet solution (75), attributed to a strong MLCT band at 575 nm (Scheme 8c).The authors described that no color change was observed for Fe 3+ , indicating that this cation did not interfere with the detection of Fe 2+ .The progressive addition of Zn(ClO4)2 reduced the band's intensity centered at 370 nm, accompanied by a simultaneous increase in absorbance at 395 and 284 nm.Both Fe 2+ and Zn 2+ ultimately led to the complete quenching of emission at 475 nm.However, Zn 2+ also induced a distinct linear emission enhancement at 600 nm.The synthetic strategy employed by the authors to obtain 73 is particularly interesting because the signaling unit (imidazole) is obtained by joining the detector unit (pyridine groups).This approach has been widely used in developing phenanthro [9,10-d]imidazole-based fluorescent and colorimetric sensors [124].Generally, a substrate containing a formyl group is also designed to hold a detector unit, enabling the construction of an optical detection device in a single step.Scheme 7. Chromoreagent prepared by Nedeljko et al. [252] for detection of biogenic amines.

Chemosensor
Chemosensors are optical devices based on reversible interaction with the analyte [106].For example, in some of these devices, a basic analyte can interact with proton donor groups (NH, OH, SH) via hydrogen bonding [248,253].These interactions, regardless of the complete transfer of hydrogen ions, can induce changes in the color or fluorescence emission of the chemosensor, thereby enabling the detection and quantification of the analyte [254,255].
One example of a chemosensor was described by Bhaumik et al. via synthesis of the phenanthro[9,10-d]imidazole (73) for the detection of fluoride, Fe 2+ , and Zn 2+ (Scheme 8a) [256].Compound 37 behaves as a solvatochromic chemosensor with different emission colors ranging from violet, blue, and green to yellow, which suggests that 73 could be used as a solvent polarity indicator.The colorless 73 solution (λ abs 341-371 nm) becomes bright yellow (λ abs 413 and 279 nm) upon adding F − or HO − (Scheme 8b; 74).Furthermore, F − induced a fluorescence quenching and a redshift in emission maximum from 475 to 485 nm.NMR investigation suggested that this phenomenon might be associated with the interaction or removal of the proton from NH groups.Adding Fe 2+ modified the colorless solution of compound 73 into a deep violet solution (75), attributed to a strong MLCT band at 575 nm (Scheme 8c).The authors described that no color change was observed for Fe 3+ , indicating that this cation did not interfere with the detection of Fe 2+ .The progressive addition of Zn(ClO 4 ) 2 reduced the band's intensity centered at 370 nm, accompanied by a simultaneous increase in absorbance at 395 and 284 nm.Both Fe 2+ and Zn 2+ ultimately led to the complete quenching of emission at 475 nm.However, Zn 2+ also induced a distinct linear emission enhancement at 600 nm.The synthetic strategy employed by the authors to obtain 73 is particularly interesting because the signaling unit (imidazole) is obtained by joining the detector unit (pyridine groups).This approach has been widely used in developing phenanthro [9,10-d]imidazole-based fluorescent and colorimetric sensors [124].Generally, a substrate containing a formyl group is also designed to hold a detector unit, enabling the construction of an optical detection device in a single step.

Chemodosimeters
A chemodosimeter is an optical device that does not consider intermolecular interactions as the driving forces of the analyte detection system.Instead, it involves the formation of irreversible covalent bonds between the analyte and the detection system [258,259].
An example of a chemodosimeter was described by Souto et al. via a new azosilylated compound (91) derived from naphthol (88) for the selective detection of CN - in acetonitrile/water and an aqueous micellar system (Scheme 10a) [260].To synthesize 91, 4-nitroaniline (87) was first diazotized and then condensed with 1-naphthol (88).The chemodosimeter 91 was obtained through nucleophilic substitution to introduce the triisopropylsilane group.In the sensing process, the CN -anion breaks the Si-O bond in 91, releasing the dye 92 and inducing a color change in the solution from yellow to blue (Scheme 10b).
Organics 2024, 5, FOR PEER REVIEW 17 A chemodosimeter is an optical device that does not consider intermolecular interactions as the driving forces of the analyte detection system.Instead, it involves the formation of irreversible covalent bonds between the analyte and the detection system [258,259].
An example of a chemodosimeter was described by Souto et al. via a new azo-silylated compound (91) derived from naphthol (88) for the selective detection of CN -in acetonitrile/water and an aqueous micellar system (Scheme 10a) [260].To synthesize 91, 4-nitroaniline (87) was first diazotized and then condensed with 1-naphthol (88).The chemodosimeter 91 was obtained through nucleophilic substitution to introduce the triisopropylsilane group.In the sensing process, the CN -anion breaks the Si-O bond in 91, releasing the dye 92 and inducing a color change in the solution from yellow to blue (Scheme 10b).The development of sensors containing the Si-O bond is inspired by the high affinity of silicon for species such as CN -and F -, which leads to the breaking of the Si-O bond [261], as exemplified here by Souto et al.Thus, installing groups such as TIPS, tetramethylsilane (TMS), dimethylphenylsilane, and tert-butyldimethylsilane in the molecular architecture is a direct strategy to obtain devices capable of detecting chemical species such as CN -and F - [253,[262][263][264][265][266].
Song et al. developed a fluorescence turn-on chemodosimeter benzimidazole-based (98) to detect cysteine (31).In their device, the benzimidazole ( 96) is linked to an acrylate group (97) and easily synthesized in two steps (Scheme 11a) [267].The acrylate functional group controls the π-electron system and initiates the fluorescence turn-on effect-based ICT.However, when the -SH group in cysteine undergoes a Michael addition to the acrylate of 98, followed by the elimination of a seven-membered ring (100), it disrupts the ICT process, leading to the fluorescence turn-on effect from signaling released moiety (101, Scheme 11b).

Logical-Based Devices: Molecular Logic Gates (MLGs)
Thirty years ago, A. P. de Silva published the seminal work that revolutionize field of supramolecular analytical chemistry [11].By leveraging information science analytical tool, he introduced the molecular logic gates (MLGs) concept.These mole devices could operate following binary logic and generate potential applications with nificant promise in various fields.
The combinations of responses caused by perturbations of the pre-associated sy can potentially be interpreted in terms of logical operations.In electronics, a logic (LG) corresponds to a model that performs a logic operation on one or more logic in and produces a logic output [268].When this concept is transferred to supramole chemistry, the optical response of a perturbation (input) can be interpreted as an ou particularly in scenarios where more than one receptor is present in a supramole structure, enabling the recognition of more than one chemical species [269][270][271][272].
The researchers who continued the work of George Boole developed the contr information flow by formulating a language whose variables can assume one of two sible values, which can be denoted by [F, V] (false or true), [H, L] (high and low; high low) or [0, 1].This model performs a logic operation on one or more logic inputs produces one or more logic outputs [273].The combination of two inputs results i sponses that characterize the three fundamental types of logic gates: NOT, AND, and These gates can be combined to obtain more complex operations (XOR, XNOR, NOR, etc.), whose logic is illustrated in Figure 4

Logical-Based Devices: Molecular Logic Gates (MLGs)
Thirty years ago, A. P. de Silva published the seminal work that revolutionized the field of supramolecular analytical chemistry [11].By leveraging information science as an analytical tool, he introduced the molecular logic gates (MLGs) concept.These molecular devices could operate following binary logic and generate potential applications with significant promise in various fields.
The combinations of responses caused by perturbations of the pre-associated system can potentially be interpreted in terms of logical operations.In electronics, a logic gate (LG) corresponds to a model that performs a logic operation on one or more logic inputs and produces a logic output [268].When this concept is transferred to supramolecular chemistry, the optical response of a perturbation (input) can be interpreted as an output, particularly in scenarios where more than one receptor is present in a supramolecular structure, enabling the recognition of more than one chemical species [269][270][271][272].
The researchers who continued the work of George Boole developed the control of information flow by formulating a language whose variables can assume one of two possible values, which can be denoted by [F, V] (false or true), [H, L] (high and low; high and low) or [0, 1].This model performs a logic operation on one or more logic inputs and produces one or more logic outputs [273].The combination of two inputs results in responses that characterize the three fundamental types of logic gates: NOT, AND, and OR.These gates can be combined to obtain more complex operations (XOR, XNOR, INH, NOR, etc.), whose logic is illustrated in Figure 4 through its truth tables and respective diagrams.All processors and digital equipment on the market are operated by systems comprising the combinations of those three basic LGs according to well-defined rules, receiving or generating signals compatible with the binary language [271,274,275].In 1993, Prasanna de Silva et al. described an anthracene core attached to a crown ether (Figure 5) [11].Although anthracenyl may exhibit fluorescent properties, compound 102 displayed a weakened fluorescence emission due to the PET process.Therefore, without additives (inputs "0"), 102 exhibited weak emission (output "0").Upon adding acid (input1 "1") to 102, the protonation of the tertiary amine occurred; yet, this did not prevent the PET process, resulting in a low fluorescence response (output "0").Another operation is adding Na + (input2 "1"), in the absence of acid (input1 "0"), allowing the crown ether to recognize this cation.However, this interaction also failed to prevent the occurrence of PET, and likewise, a low fluorescence response (output "0") was observed.Remarkably, the simultaneous addition of acid and Na + cation (input1 "1" and input2 "1") led to a sixfold increase in fluorescence intensity (output "1").In this case, the two stimulus signals (H + and Na + ) were necessary for a response with a significant increase in fluorescence (output).Therefore, this MLG could be classified as type AND (Figure 5).

The Architecture of MLGs Based on Truth Tables' Interpretation
So far, we have shown the importance of various analytes, provided examples of optical detection devices, their architecture involving signaling and detector units, elucidated the general arrangement comprising units serving as both electron density donors (D) and electron density acceptors (A), and expounded upon the fundamental concepts of MLGs.These concepts will be used to discuss different MLGs that can be constructed from a binary analysis of the responses generated as detection devices.
Similarly to a general optical detection device, the development of an MLG entails the integration of electron-donating and electron-accepting groups via a signaling unit connected to one or more analyte receptor groups.This architecture allows for interpreting chemical signals in terms of binary logic.A traditional chemical sensor can be transformed into a sophisticated logic gate capable of processing and responding to specific chemical inputs.For instance, we recently described several examples of MLGs that can be proposed from traditional sensors exploiting aspects of reversibility [276].
Most MLGs involve supramolecular systems in solution to respond to different stim- In 1993, Prasanna de Silva et al. described an anthracene core attached to a crown ether (Figure 5) [11].Although anthracenyl may exhibit fluorescent properties, compound 102 displayed a weakened fluorescence emission due to the PET process.Therefore, without additives (inputs "0"), 102 exhibited weak emission (output "0").Upon adding acid (input 1 "1") to 102, the protonation of the tertiary amine occurred; yet, this did not prevent the PET process, resulting in a low fluorescence response (output "0").Another operation is adding Na + (input 2 "1"), in the absence of acid (input 1 "0"), allowing the crown ether to recognize this cation.However, this interaction also failed to prevent the occurrence of PET, and likewise, a low fluorescence response (output "0") was observed.Remarkably, the simultaneous addition of acid and Na + cation (input 1 "1" and input 2 "1") led to a six-fold increase in fluorescence intensity (output "1").In this case, the two stimulus signals (H + and Na + ) were necessary for a response with a significant increase in fluorescence (output).Therefore, this MLG could be classified as type AND (Figure 5).In 1993, Prasanna de Silva et al. described an anthracene core attached to a crown ether (Figure 5) [11].Although anthracenyl may exhibit fluorescent properties, compound 102 displayed a weakened fluorescence emission due to the PET process.Therefore, without additives (inputs "0"), 102 exhibited weak emission (output "0").Upon adding acid (input1 "1") to 102, the protonation of the tertiary amine occurred; yet, this did not prevent the PET process, resulting in a low fluorescence response (output "0").Another operation is adding Na + (input2 "1"), in the absence of acid (input1 "0"), allowing the crown ether to recognize this cation.However, this interaction also failed to prevent the occurrence of PET, and likewise, a low fluorescence response (output "0") was observed.Remarkably, the simultaneous addition of acid and Na + cation (input1 "1" and input2 "1") led to a sixfold increase in fluorescence intensity (output "1").In this case, the two stimulus signals (H + and Na + ) were necessary for a response with a significant increase in fluorescence (output).Therefore, this MLG could be classified as type AND (Figure 5).

The Architecture of MLGs Based on Truth Tables' Interpretation
So far, we have shown the importance of various analytes, provided examples of optical detection devices, their architecture involving signaling and detector units, elucidated the general arrangement comprising units serving as both electron density donors (D) and electron density acceptors (A), and expounded upon the fundamental concepts of MLGs.These concepts will be used to discuss different MLGs that can be constructed from a binary analysis of the responses generated as detection devices.
Similarly to a general optical detection device, the development of an MLG entails the integration of electron-donating and electron-accepting groups via a signaling unit connected to one or more analyte receptor groups.This architecture allows for interpreting chemical signals in terms of binary logic.A traditional chemical sensor can be transformed into a sophisticated logic gate capable of processing and responding to specific chemical inputs.For instance, we recently described several examples of MLGs that can be proposed from traditional sensors exploiting aspects of reversibility [276].
Most MLGs involve supramolecular systems in solution to respond to different stimuli, including chemical, light, and electrical inputs.Physical-chemical processes, such as the interaction of a cation with a chelating site, protonation-deprotonation of an acid-base

The Architecture of MLGs Based on Truth Tables' Interpretation
So far, we have shown the importance of various analytes, provided examples of optical detection devices, their architecture involving signaling and detector units, elucidated the general arrangement comprising units serving as both electron density donors (D) and electron density acceptors (A), and expounded upon the fundamental concepts of MLGs.These concepts will be used to discuss different MLGs that can be constructed from a binary analysis of the responses generated as detection devices.
Similarly to a general optical detection device, the development of an MLG entails the integration of electron-donating and electron-accepting groups via a signaling unit connected to one or more analyte receptor groups.This architecture allows for interpreting chemical signals in terms of binary logic.A traditional chemical sensor can be transformed into a sophisticated logic gate capable of processing and responding to specific chemical inputs.For instance, we recently described several examples of MLGs that can be proposed from traditional sensors exploiting aspects of reversibility [276].
Most MLGs involve supramolecular systems in solution to respond to different stimuli, including chemical, light, and electrical inputs.Physical-chemical processes, such as the interaction of a cation with a chelating site, protonation-deprotonation of an acid-base site, oxidation reduction, photochemical event, formation or breaking of chemical bonds, etc., can give rise to a spectroscopic response, such as changes in fluorescence emission or absorption in the UV-Vis region [268,[277][278][279][280][281][282][283].Thus, based on the concepts of conventional microelectronics, the stimuli transferred to a molecule are understood as inputs, and the changes in the emission/absorption of that medium as outputs.We presented below some commonly used logic functions in constructing optical detection devices.

"YES" Logic
YES logic is one of the most straightforward logic gates that require the output to follow the input, and most cases can be simplified as an "OFF-ON" switch [283][284][285][286][287][288][289][290][291][292][293].Boolean YES logic can be described if the output signal increases with increasing stimulus, i.e., when an input is present, the output signal is increased.
A simple "OFF-ON" chemosensor ( 109) able to discriminate glutathione (GSH) from cysteine (Cys)/homocysteine (Hcy) was introduced by Li et al. (Scheme 12) [290].First, the authors started with a formylation reaction of 3-(N,N-diethylamine)phenol ( 103) to afford 104, followed by a reaction with ethyl acetoacetate (105) to generate 106, formylated again by the Vilsmeier-Haack protocol.Finally, 107 reacted with malononitrile (108), producing 109 (Scheme 12a).The authors identified two potential reaction sites for the chemosensor: Site 1, the chlorine atom at the 3-position of the coumarin moiety as a leaving group, and Site 2, the α,β-unsaturated malononitrile as a Michael acceptor (Scheme 12b).The sensor 109 could discriminate between GSH and Cys/Hcy through fluorescence response.The proposed detection mechanism involves thiol-halogen substitution, where the chlorine atom is replaced by thiolates of the three evaluated thiols, leading to intramolecular rearrangements for Cys and Hcy.Then, an intramolecular Michael addition reaction between the α,β-unsaturated malonitrile and the thiol group interrupts the π conjugation system.GSH only leads to substitution due to its tripeptide structure, making it difficult for the amino group to attack.The structural modifications increased the fluorescence emission intensity up to 505 nm.The mechanism was investigated using fluorescence, UV-Vis, NMR, and ESI-MS techniques.In this case, an increased fluorescence intensity is only obtained in the presence of GSH.In other words, 109 generates an output "1" exclusively when the GSH input matches "1".Therefore, it can be described as a YES MLG.

"NOT" Logic
NOT logic causes the output to behave opposite to the input.Unlike YES gates, NOT logic devices respond to an input in an "ON-OFF" manner [280,281,[291][292][293].If the output signal decreases in the presence of an input, the NOT logic is the result.
Noushija et al. proposed the optical sensor 115 based on quinizarin dye for detecting acetate anions through the anion-induced deprotonation of phenolic-OH groups (Scheme 13) [294].The fluorescence quenching of 115 can be attributed to the PET process from the oxygen atom to the π* orbitals of anthraquinone.The authors applied the Stern-Volmer equation to analyze the fluorescence titration curve, which yielded a linear graph.Based on this analysis, the Stern-Volmer extinction constant was 2.3 × 10 3 M −1 .The turn-OFF behavior can be interpreted as a NOT gate.
In general, traditional sensors that exhibit optical signal intensification (ON, output "1") or suppression (OFF, output "0") responses can be classified, respectively, as YES and NOT MLGs.However, this is a very generic classification because there are no combinations of inputs in these cases, as these are generic systems.Hence, in numerous instances, as those described by Li et al. [290] and Noushija et al. [294], the sensors are not explicitly characterized as MLGs.Even so, these two classes of MLGs are essential to be discussed, as they are used to compose more complex systems.(112)(113)(114) formed between them and the chemosensor 109.In general, traditional sensors that exhibit optical signal intensification (ON, output "1") or suppression (OFF, output "0") responses can be classified, respectively, as YES and NOT MLGs.However, this is a very generic classification because there are no combinations of inputs in these cases, as these are generic systems.Hence, in numerous instances, as those described by Li et al. [290] and Noushija et al. [294], the sensors are not explicitly characterized as MLGs.Even so, these two classes of MLGs are essential to be discussed, as they are used to compose more complex systems.

"AND" Logic
AND logic produces an output "1" only when both inputs, designated as input1 and input2, correspond to "1" concurrently.In other words, it occurs when two or more inputs are present simultaneously and produce a single output value only obtained under these conditions.Since the first molecular AND logic gate was created in 1993 [11], the field of Scheme 13.The sensing mechanism of compound 115 and acetate anion, according to Noushija et al. [294].

"AND" Logic
AND logic produces an output "1" only when both inputs, designated as input 1 and input 2 , correspond to "1" concurrently.In other words, it occurs when two or more inputs are present simultaneously and produce a single output value only obtained under these conditions.Since the first molecular AND logic gate was created in 1993 [11], the field of molecular-logic-based computation based on this particular logic gate has garnered significant attention.Recently, Gauci and Magri designed compounds based on crownether-fused 4-piperazino-N-aryl-1,8-naphthalimides (121 and 122) and investigated the effect of the polarity of the solvent on the reconfiguration of the identified logics, between the TRANSFER logic and the AND logic (Scheme 14) [295].The 4-chloro-N-aryl-1,8naphthalimides (117) reacted with piperazine (118)

"NAND" Logic
NAND can be considered a combination of the NOT and AND gates.Precisely, the output of the AND gate is linked to the input of the NOT gate, which inverts the output of the AND gate [296].Unlike the AND gate, the NAND gate does not generate an increased output signal if two analytes are present simultaneously; instead, it does so in all other conceivable situations: the absence of both inputs, the presence of input1, or the presence of input2 individually.

"NAND" Logic
NAND can be considered a combination of the NOT and AND gates.Precisely, the output of the AND gate is linked to the input of the NOT gate, which inverts the output of the AND gate [296].Unlike the AND gate, the NAND gate does not generate an increased output signal if two analytes are present simultaneously; instead, it does so in all other conceivable situations: the absence of both inputs, the presence of input 1 , or the presence of input 2 individually.Due to the unique reversible and selective oxidation property of tetrathiafulvalene, the fluorescent emission of 128-129 can be switched ON and OFF based on the oxidation states of the tetrathiafulvalene unit.Therefore, the researchers noted that adding Fe 2+ or NOBF 4 individually did not affect the emission, resulting in a high fluorescence output "1" from the gate.However, the presence of both Fe 2+ and NOBF 4 resulted in fluorescence quenching.This phenomenon was attributed to the sequential quenching by Fe 2+ , induced by the oxidation of Fe 2+ by NOBF 4 .This output pattern corresponds to the performance of an electronic NAND gate (Scheme 15b,c).

"INHIBIT" Logic
The INHIBIT logic gate blocks or inhibits the output when a signal is present at a specific input, regardless of the other inputs.This behavior corresponds to AND gates with one of the inputs inverted through a NOT function, essentially acting as a veto power over an input [298].
This type of logic is recognized in detection systems based on displacement assays.Introducing a competitive analyte disrupts the binding/interaction between the chemosensor and the initial analyte, restoring the optical properties of the primary system [276].In a simplified way, the presence of a second input inhibits the response of the first input.
A traditional approach for designing sensors for Hg 2+ detection involves using rhodamine and naphthalimide bases via ring-opening reactions.These sensors can undergo rhodamine lactam ring opening upon exposure to Hg 2+ ions, forming mercury-ion complexes [299].For instance, Bai et al. designed a rhodamine-6G-based MLG (135) for colorimetric and fluorimetric recognition of Hg 2+ and I − (Scheme 16a) [300].
The colorless and non-fluorescent solution of MLG 135 submitted to input1 of Hg 2+ resulted in a yellow solution via a naked-eye perception, with fluorescence emission at 560 nm.This phenomenon was attributed to the spirolactam ring-opening amide induced by Hg 2+ (Scheme 16b), investigated via FT-IR and HRMS spectra.The sequential input2 of I − to MLG 135 solution led to fluorescence quenching, indicating the recovery of the spirolactam form.
The authors have described that the reversibility of this process could be repeated up to eight times without significant loss in fluorescence efficiency.In this sense, input1 (Hg

"INHIBIT" Logic
The INHIBIT logic gate blocks or inhibits the output when a signal is present at a specific input, regardless of the other inputs.This behavior corresponds to AND gates with one of the inputs inverted through a NOT function, essentially acting as a veto power over an input [298].
This type of logic is recognized in detection systems based on displacement assays.Introducing a competitive analyte disrupts the binding/interaction between the chemosensor and the initial analyte, restoring the optical properties of the primary system [276].In a simplified way, the presence of a second input inhibits the response of the first input.
A traditional approach for designing sensors for Hg 2+ detection involves using rhodamine and naphthalimide bases via ring-opening reactions.These sensors can undergo rhodamine lactam ring opening upon exposure to Hg 2+ ions, forming mercury-ion complexes [299].For instance, Bai et al. designed a rhodamine-6G-based MLG (135) for colorimetric and fluorimetric recognition of Hg 2+ and I − (Scheme 16a) [300].
The colorless and non-fluorescent solution of MLG 135 submitted to input 1 of Hg 2+ resulted in a yellow solution via a naked-eye perception, with fluorescence emission at 560 nm.This phenomenon was attributed to the spirolactam ring-opening amide induced by Hg 2+ (Scheme 16b), investigated via FT-IR and HRMS spectra.The sequential input 2 of I − to MLG 135 solution led to fluorescence quenching, indicating the recovery of the spirolactam form.
The authors have described that the reversibility of this process could be repeated up to eight times without significant loss in fluorescence efficiency.In this sense, input 1 (Hg 2+ ) enhanced fluorescence (YES operation), while the interaction of input  Considering sensors designed for the primary detection of Hg 2+ , complexing agents such as sulfides, EDTA, and other chelating agents can effectively decomplex the Hg 2+ ions and reinstate the system's original properties [301,302].
For instance, Kumar et al. designed the MLG 140, based on 2-amino pyrazine and phthalaldehyde, via a condensation reaction (Scheme 17a) [303].Upon addition of Hg 2+ (input1 "1"), the initially non-fluorescent (output "0") 140 resulted in a turn-on response, displaying intense emission at 410 nm (141; output "1").This phenomenon was attributed to the binding of 140 with Hg 2+ interrupting the PET process, thereby inducing the chelation-enhanced fluorescence (CHEF) effect.Subsequent addition of EDTA (input2 "1") to 141 solution led to fluorescence quenching (output "0") due to the formation of the EDTA-Hg 2+ complex and the release of MLG 140 (Scheme 17b).The sequential increment of Hg Considering sensors designed for the primary detection of Hg 2+ , complexing agents such as sulfides, EDTA, and other chelating agents can effectively decomplex the Hg 2+ ions and reinstate the system's original properties [301,302].
For instance, Kumar et al. designed the MLG 140, based on 2-amino pyrazine and phthalaldehyde, via a condensation reaction (Scheme 17a) [303].Upon addition of Hg 2+ (input 1 "1"), the initially non-fluorescent (output "0") 140 resulted in a turn-on response, displaying intense emission at 410 nm (141; output "1").This phenomenon was attributed to the binding of 140 with Hg 2+ interrupting the PET process, thereby inducing the chelationenhanced fluorescence (CHEF) effect.Subsequent addition of EDTA (input 2 "1") to 141 solution led to fluorescence quenching (output "0") due to the formation of the EDTA-Hg 2+ complex and the release of MLG 140 (Scheme 17b).The sequential increment of Hg 2+ recovered the fluorescence emission, indicating the reversibility of the MLG 140.Five more alternative cycles of additions of Hg 2+ and EDTA were performed without affecting the process.The suggested sensing mechanism involves the coordinating Hg 2+ with carbonyl groups.The CHEF effect increases the rigidity of the sensor, interrupting the PET process and leading to fluorescence emission.The reversibility of 140 induced by EDTA allowed the description of 98 as an INHIBIT molecular logic gate.Considering the input 1 (Hg 2+ ) and input 2 (EDTA) and emission at 410 nm as output, an INHIBIT logic gate may be established.The truth table and the MLG 140 are described in Schemes 17c and 17d, respectively.INHIBIT gates can also be devised by introducing a suppressor to the system.In Scheme 18a, compound 145 features a dioxobenzene group (ether crown), an electron density donor via internal charge transfer (ICT), and the group bis(2-pyridin)pyridazine, an electron acceptor [304].Logical operations can be constructed by adding K + and Zn 2+ (Scheme 18b) cations as inputs and the fluorescence emission as an output (response).These operation outcomes are summarized in the truth table in Scheme 18c.
As previously discussed, this MLG is classified as the INHIBIT type, an integration between the NOT and AND operations.In this case, the NOT operation is applied only to the second input (input2-K + addition), which reduces the effect of the first input (Zn 2+ addition input).In other words, adding Zn 2+ (input1) shifts the MLG emission from 396 nm to 460 nm, whereas adding K + (input2) reduces this change, reverting to the emission value at 396 nm.Furthermore, 145 can be understood as an OFF-ON-OFF molecular device triggered by Zn 2+ and K + .
INHIBIT gates can also be devised by introducing a suppressor to the system.In Scheme 18a, compound 145 features a dioxobenzene group (ether crown), an electron density donor via internal charge transfer (ICT), and the group bis(2-pyridin)pyridazine, an electron acceptor [304].Logical operations can be constructed by adding K + and Zn 2+ (Scheme 18b) cations as inputs and the fluorescence emission as an output (response).These operation outcomes are summarized in the truth table in Scheme 18c.In this example, in the absence of cations (input "0"), MLG 145 exhibits emission at 396 nm (output 396 "1").However, when Zn 2+ cation (input 1 "1") binds to the pyridinyl groups, the ICT intensifies, causing the emission to shift to 460 nm (output 460 "1").In the absence of the Zn 2+ cation (input 1 "0"), K + (input 2 "1") coordinates to the crown ether, leading to a reduction in ICT due to the diminished electron-donor effect in the ether crown.This coordination results in emission maintenance at 396 nm (output 396 "1").The simultaneous addition of Zn 2+ (input 1 "1") and K + (input 2 "1") preserves the emission at 396 nm (output 396 "1").Conversely, the opposite operation (sequence) maintains the fluorescence emission unchanged at 460 nm.
As previously discussed, this MLG is classified as the INHIBIT type, an integration between the NOT and AND operations.In this case, the NOT operation is applied only to the second input (input 2 -K + addition), which reduces the effect of the first input (Zn 2+ addition input).In other words, adding Zn 2+ (input 1 ) shifts the MLG emission from 396 nm to 460 nm, whereas adding K + (input 2 ) reduces this change, reverting to the emission value at 396 nm.Furthermore, 145 can be understood as an OFF-ON-OFF molecular device triggered by Zn 2+ and K + .
A remarkable example was introduced by Guo et al., wherein the authors explored an asymmetrical Receptor 1 -Chromophore-Receptor 2 bis-condensed dicyanomethylene-4H-pyran (DCM)-type derivative as an MLG (151) [305].Compound 151 was synthesized by the condensation of 4-dicyanomethylene-2,6-dimethyl-4H-pyran (147) with 4hydroxybenzaldehyde (148) and then with 4-[bis(pyridin-2-yl-methyl)amino]benzaldehyde (150) with 35% yield (Scheme 19a).The two receptors of 151 display different spectral responses upon hosting the two guests: Zn 2+ and OH − (Scheme 19b).A noticeable hypsochromic shift from 442 to 415 nm is observed upon the incremental addition of Zn 2+ to 151.This shift is accompanied by a visible color change from orange-yellow to light green.These observations suggest that upon coordination with Zn 2+ , the electron-donating character of the amine nitrogen atom within the chromophore group is reduced, resulting in a decrease in the efficiency of ICT.The authors observed a slight hypsochromic shift in emission spectra and an almost complete fluorescence quenching.Conversely, upon base being added to 154 in the presence of Zn 2+ , a shift from 415 to 442 nm in the absorption spectrum is observed (153).The varying electron-donating character of the receptor moiety in the ICT mechanism was exploited to produce logic operations such as XOR and INHIBIT, considering both Zn 2+ and OH − as inputs (Scheme 19c).

"IMPLICATION" Logic
IMPLICATION logic is a type of logic operation embodying a conditional statement, such as "If A, then B".If A is true (or "1") and B is false (or "0"), the output is false (or "0").However, if A is true or B is true, or both are true (or "1"), the output will be true (or "1").The only situation in which the IMPLICATION gate returns false (or "0") is when the first condition is true but the second condition is false.
A recent example of an IMPLICATION MLG was described by Souto and Machado via structural functionalization of ethyl(hydroxyethyl)cellulose (EHEC) and a silica-based xerogel (SBX) with a precursor of 18-crown-6-styrylpyridine 158 (Scheme 20a) [306].The resulting materials were employed as fluorescent devices to detect Hg 2+ in water.The precursor 158 was easily synthesized with a yield of 57% by an aldolic condensation of aldehyde 156 and methylpyridine (157).This compound was incorporated into the polymeric matrix via a covalent bond formed between the pyridine nitrogen and the chloropropyl groups of XSB.This covalent bond generates a positively charged pyridine group in 159.Upon Hg 2+ complexation by the macrocyclic moiety, there was a modification in the transfer of electronic density from the crown ether to the positive end of the molecule.Consequently, a shift in the emission from yellow to green occurred.

"IMPLICATION" Logic
IMPLICATION logic is a type of logic operation embodying a conditional statement, such as "If A, then B".If A is true (or "1") and B is false (or "0"), the output is false (or "0").However, if A is true or B is true, or both are true (or "1"), the output will be true (or literature due to their suitability as chelating groups for different metals, depending on the macrocycle size and the environment in which it is inserted [294].For example, benzo-15-crown-5 ether and benzo-18-crown-6 ether groups are often employed to recognize sodium and potassium cations, respectively [295].Prasanna de Silva's seminal work (Figure 5) [11] already included the benzo-15-crown-5 group as a sodium ion detector unit [227].The strong affinity between the Hg 2+ and sulfur-containing ligands like cysteine (Cys) allows the design of competitive assays, and therefore, an interpretation based on INHIBIT logic (Scheme 20b,c).However, when binding Hg 2+ , Cys displaces the material with the free macrocycle, restoring its yellow color.In other words, the presence of Cys inhibits (or suppresses) the fluorescence emission output signal at 506 nm due to the presence of Hg 2+ .Nevertheless, considering the opposite interpretation, that is, taking the fluorescence emission at 540 nm as the output, rewriting the truth table, the authors identify an IMPLICATION logic function, i.e., the absence of both inputs (Hg 2+ and Cys) and their combined presence result in the same output "1".INHIBIT and IMPLICATION operations are often interpreted together, since they correspond to inverse truth tables (Figure 4).
Diverse examples of MLGs bearing crown ether groups have been reported in the literature due to their suitability as chelating groups for different metals, depending on the macrocycle size and the environment in which it is inserted [294].For example, benzo-15crown-5 ether and benzo-18-crown-6 ether groups are often employed to recognize sodium and potassium cations, respectively [295].Prasanna de Silva's seminal work (Figure 5) [11] already included the benzo-15-crown-5 group as a sodium ion detector unit [227].Sharma et al. described the modification of phenothiazine-5-oxide (160-162) via Suzuki cross-coupling reaction to insert a benzaldehyde group, with behavior as the acceptor unit, to afford the MLGs (164-166) (Scheme 21) [235].The authors have demonstrated a practical application of acidofluorochromism of MLG 164-166 by fabricating filter paper strips coated with them.Under UV light (λ = 365 nm), these paper strips exhibited an intense fluorescence emission, suppressed upon exposure to TFA vapors.The sequential exposition to TEA vapors recovered the fluorescence.The reversible acidofluorochromic behavior of MLG 164-166 toward TFA and TEA in the solid state was described as an IMPLICATION logic gate, as indicated by the truth table (Scheme 21a,b).DFT studies revealed that the reversible acidochromism is related to the protonation/deprotonation of the sulfinyl oxygen atom.
strips coated with them.Under UV light (λ = 365 nm), these paper strips exhibited an intense fluorescence emission, suppressed upon exposure to TFA vapors.The sequential exposition to TEA vapors recovered the fluorescence.The reversible acidofluorochromic behavior of MLG 164-166 toward TFA and TEA in the solid state was described as an IMPLICATION logic gate, as indicated by the truth table (Scheme 21a,b).DFT studies revealed that the reversible acidochromism is related to the protonation/deprotonation of the sulfinyl oxygen atom.[235].
Another example of an IMPLICATION-type logic gate was described by Tripathy et al. through the synthesis of the azo dye 168 bearing a D-π-A architecture, with salicylaldehyde as a donor group and nitrobenzene as an acceptor (Scheme 22a) [307].Compound 168 displayed a reddish-pink color in the DMSO-water medium, attributed to the ICT from the electron-donating phenolic moiety to the electron-withdrawing nitrobenzene group.Adding Hg 2+ as input to MLG 168 decreased the absorption at 502 nm (attributed to the ICT) with a concomitant emergence of an absorption band centered at 361 nm.This change corresponded to a color change from reddish-pink to a colorless solution (169).The authors have attributed this phenomenon to the partial positive charge of the oxygen atom from the hydroxyl group upon binding to Hg 2+ (Scheme 22b).This interaction significantly decreases the conjugation of the molecular system and electron-donating ability for ICT, reducing the D-π-A phenomenon.
Additionally, the researchers described a weaker binding of MLG 168 with Cu 2+ , evidenced by a little hypsochromic shift with increased intensity of the shoulder peak from 405 nm to 395 nm, also associated with a decrease in absorbance at 502 nm.Sequentially adding F − (input2) to 169 recovered the reddish-pink color, and the absorption centered at 502 nm, demonstrating the system's reversibility.This anion may promote the demetallation of 169, increasing the electron density on the phenolic oxygen atom and the consequent increase in the ICT process.This phenomenon was repeated over several cycles in a "rhythmic manner".Considering the input1 (Hg 2+ ) and input2 (F ), the absorption band centered at 502 nm as output in an ON-OFF-ON input/output response, the MLG 168 was described as an IMPLICATION-type logic (Scheme 22c,d).[235].
Another example of an IMPLICATION-type logic gate was described by Tripathy et al. through the synthesis of the azo dye 168 bearing a D-π-A architecture, with salicylaldehyde as a donor group and nitrobenzene as an acceptor (Scheme 22a) [307].Compound 168 displayed a reddish-pink color in the DMSO-water medium, attributed to the ICT from the electron-donating phenolic moiety to the electron-withdrawing nitrobenzene group.Adding Hg 2+ as input to MLG 168 decreased the absorption at 502 nm (attributed to the ICT) with a concomitant emergence of an absorption band centered at 361 nm.This change corresponded to a color change from reddish-pink to a colorless solution (169).The authors have attributed this phenomenon to the partial positive charge of the oxygen atom from the hydroxyl group upon binding to Hg 2+ (Scheme 22b).This interaction significantly decreases the conjugation of the molecular system and electron-donating ability for ICT, reducing the D-π-A phenomenon.

More Elaborated MLGs
More elaborated MLGs, such as half-adders, half-subtractors, encoders, decoders, multiplexers, and demultiplexers, can be built by combining basic MLGs [308][309][310][311][312][313][314][315].However, a detailed discussion about them is beyond this review's scope.The growing interest in using probes to detect and quantify multiple analytes in competitive assays has motivated researchers to pursue increasingly integrated arrays.Additionally, the researchers described a weaker binding of MLG 168 with Cu 2+ , evidenced by a little hypsochromic shift with increased intensity of the shoulder peak from 405 nm to 395 nm, also associated with a decrease in absorbance at 502 nm.Sequentially adding F − (input 2 ) to 169 recovered the reddish-pink color, and the absorption centered at 502 nm, demonstrating the system's reversibility.This anion may promote the demetallation of 169, increasing the electron density on the phenolic oxygen atom and the consequent increase in the ICT process.This phenomenon was repeated over several cycles in a "rhythmic manner".Considering the input 1 (Hg 2+ ) and input 2 (F − ), the absorption band centered at 502 nm as output in an ON-OFF-ON input/output response, the MLG 168 was described as an IMPLICATION-type logic (Scheme 22c,d).
One of these systems is "Lab-on-a-Molecule" [316], proposed almost twenty years ago as a device that can recognize three species in an assay and generate an output response only at the intersection of the three species.In 2019, Scerri et al. introduced device 172 as an example of Lab-on-a-Molecule (Scheme 23), bearing the fluorescent naphthalimide core and three receptors: (1) ferrocene, as an electron donor in the recognition of Fe 3+ ; (2) the basic site piperazine, acting as a receptor for H + ; and (3) the ether-N-(2-methoxyphenyl)aza-15-crown-5 group, functioning as a receptor for Na + ion through coordination with this ion [317].Compound 172 exhibited a weak fluorescence quantum yield (output "0") and, as indicated by the truth table in Scheme 23, the separate addition (inputs 1 , 2 , or 3 "1") of H + , Fe 3+ , or Na + (operations B, C, and E) did not significantly increase the fluorescence quantum yield (output "0").A similar result was obtained with the combined addition of H + and Fe 3+ (input 1 "1" and input 2 "1", operation D); H + and Na + (input 1 "1" and input 3 "1", operation F); or Fe 3+ and Na + (input 2 "1" and input 3 "1", operation G).However, the simultaneous addition of the three ions (inputs 1 , 2 , and 3 "1") increased about twenty times in fluorescence quantum yield (output "1", operation H).Since these systems are constructed to correspond to a three-input AND logic gate, it is understood as a Lab-on-a-Molecule.

Molecular Machines as Logical Optical Devices
Rotaxanes and catenanes constitute a group of structures that can be modulated to operate as MLGs due to their inherent adherence to binary logic principles.A careful and comprehensive synthesis approach is necessary for producing rotaxanes and pseudorotaxanes.Currently, various strategies are available for creating molecular machines, including pre-organizing components using hydrogen bonding, metal coordination, hydro-

Molecular Machines as Logical Optical Devices
Rotaxanes and catenanes constitute a group of structures that can be modulated to operate as MLGs due to their inherent adherence to binary logic principles.A careful and comprehensive synthesis approach is necessary for producing rotaxanes and pseudorotaxanes.Currently, various strategies are available for creating molecular machines, including pre-organizing components using hydrogen bonding, metal coordination, hydrophobic forces, and covalent bonds [318][319][320].Rotaxanes containing chelating groups designed to bind with cations/anions are good candidates for selective sensing of a particular analyte, depending on the overall construction of a mechanically interlocked system having specific cavity dimensions tailored to the desired analyte [321][322][323][324][325].
A remarkable structure based on a bistable [1]rotaxane (178) was reported by Li et al. [326].The structure of a rotaxane features a dual operation system comprising the interaction of two receptor sites with modulating analytes: one responsive to acid/base conditions and the other to redox centers.The redox-active Fe unit is introduced as a connecting unit for two portions of the thread and provides a unit sensitive to oxidizing/reducing agents.The thread bears an amino group sensitive to pH changes and a positively charged triazole group.Depending on the environmental conditions, both groups can interact with the 24-crown-8 macrocycle, located at one end of the thread.Additionally, a 4-morpholinnaphthalimide group was selected as a terminal stopper and fluorophore, enabling the modulation of its fluorescence through a distance-dependent PET process between an electron-rich metallocene unit and an electron-deficient fluorophore.
As shown in Scheme 24, the synthetic route employed by the authors incorporates reactions previously discussed in this review.The connection of 173 and 174 groups was achieved through a 1,3-dipolar cycloaddition, resulting in the formation of a triazole using CuI in the presence of N,N-diisopropylethylamine (DIEA), resulting in a 70% yield of 175.Subsequently, 175 underwent methylation with CH 3 I and anion exchange with an aqueous NH 4 PF 6 solution, providing 176 with a high yield (90%).Compound 176 was then linked to the 177 group via a 1,3-dipolar cycloaddition catalyzed by Cu[(CH 3 CN) 4 ]PF 6 in dichloromethane, yielding the target [1]rotaxane (178) with a 74% yield.
The authors defined "active" and "inactive" signal modes for rotaxane operations.The relative mechanical movement of its ring and thread in response to external acid-base stimuli can produce an intense fluorescence signal output, representing the "active" mode when considering the amino group's deprotonation upon the base's presence (DBU input 1 ).In contrast, in the "inactive" signal mode after oxidation (Fe 3+ , input 2 ), there was no evident change in fluorescence, which remained "locked" at its original level in the presence of Fe(ClO 4 ) 3 .The fluorescence responses (output) of [1]rotaxane to the different DBU and Fe 3+ combinations correspond to an INHIBIT logic gate, as represented in Scheme 24.
Klein et al. have described a new benzimidazole-iodotriazole motif based on halogen bonding, which has been integrated into the photoactive naphthalimide-based axle component of a bis [2]rotaxane [327].Compound 186 was synthesized according to Scheme 25a.Initially, the naphthalimide-based precursor (181) was condensed to the triazole aldehyde (180), forming a benzimidazole core containing a 182-functionalized end to serve as a stopper.By substituting the hydroxyl group at the opposite end of intermediate 182 with an azide moiety, followed by the subsequent addition of an isophthalamide macrocycle 185 to the system, a [2]rotaxane (186) is produced, representing a chloride anion template stoppering approach.evident change in fluorescence, which remained "locked" at its original level in the presence of Fe(ClO4)3.The fluorescence responses (output) of [1] 25a.Initially, the naphthalimide-based precursor (181) was condensed to the triazole aldehyde (180), forming a benzimidazole core containing a 182-functionalized end to serve as a stopper.By substituting the hydroxyl group at the opposite end of intermediate 182 with an azide moiety, followed by the subsequent addition of an isophthalamide macrocycle 185 to the system, a [2]rotaxane (186) is produced, representing a chloride anion template stoppering approach.The neutral rotaxane 186 exhibits a yellow color in solution, attributed to the charge transfer between the electron-rich hydroquinone derivative within the macrocycle and the electron-deficient naphthalimide along the rotaxane axis.Upon the introduction of HCl, protonation of the imidazole core ensues, extinguishing this color.However, interestingly, when HBF 4 is added to the solution, no significant change in color is observed, suggesting that HCl and HBF 4 induce distinct perturbations in the rotaxane structure.Further investi-gations through the 1 H-1 H ROESY NMR spectra of each compound demonstrated that the pronounced alteration induced by HCl is attributed to the relocation of the macrocycle from naphthalimide toward the benzimidazole nucleus, as indicated in Scheme 25b.A UV-Vis spectroscopic titration with anions was conducted after the protonation of 186 using HBF 4 to assess the significance of the counter anion's nature in inducing macrocycle translocation.Upon adding 50 equiv.of tetrabutylammonium chloride (TBACl), a notable shift in absorbance was observed, closely resembling the spectrum obtained with protonation using HCl.As a result, the authors deduced that both protonation and chloride ions as external stimuli are imperative to facilitating macrocycle translocation, exemplifying a system akin to an AND-type logic gate.

MLGs Based on Polymer Matrices
Integrating molecular recognition/detection mechanisms into various materials, such as silica, membranes, and polymeric films, presents an alternative approach to fabricating supramolecular systems to detect analytes.
Polymeric matrices-whether as a support solid surface for recognition molecules or polymers built from responsive monomers-offer several appealing characteristics, making them attractive in chemosensor and MLG development.Notably, they exhibit inertness against gases and liquids and have a substantial surface area in solid matrices.Furthermore, their shorter response time for efficient analyte detection and affordability render them highly attractive for optical detection device development.
An extensive possibility involves introducing a molecular chemosensor into the polymeric matrix through a physical mixture without forming or breaking chemical bonds.A second and interesting approach involves forming chemical bonds between solid support and a molecule exhibiting intrinsic photophysical properties that respond sensitively to a specific analyte.
In 2020, Bai et al. presented the fluorescent dye functionalized PEG 194 capable of recognizing Al 3+ [328].The synthetic strategy used by the authors consisted of a condensation reaction of 2,4-dihydroxybenzaldehyde (189) and furan-2-carbohydrazide (190), followed by the esterification of (191) with carboxylated PEG (192), as shown in Scheme 26a.Compound 193 displayed a pronounced broad absorption band at 330 nm.Upon introducing Cu 2+ , Al 3+ , and Ni 2+ , a new band centered at 370 nm appeared.Solution 105 exhibits weak emission, and following the addition of 2.0 equiv. of Al 3+ , a notable enhancement in fluorescence at λ em = 436 nm (when excited at λ ex = 369 nm) becomes evident.The fluorescence intensity of 193 was enhanced upon adding Al 3+ , likely due to the complexation of the ions with the probe through CHEF.Moreover, the interaction between Al 3+ and 193 triggers C=N isomerization, suppresses the PET effect, and contributes to the potential increase in fluorescence.
A series of detection tests were performed on the 193-Al 3+ complex using EDTA to explore the sensor's reversibility.Notably, in the presence of EDTA, the solution containing the material restored its optical properties to their state before complexing agent addition.This behavior revealed a reversible-type system, allowing analysis of the responses obtained for Al 3+ and EDTA through an INHIBIT-type logic gate (Scheme 26b).
Finally, a third strategy considers the construction of a polymeric matrix from reactive monomers.In 2020, Zhou et al. reported a polymer matrix (PS)-based ratiometric fluorescent probe (Eu(NTA) 3 L@PS, 199) and the construction of an AND logic system with inputs of H + and ClO − [329].The preparation of the material consisted of a typical process of mini-emulsion polymerization (Scheme 27a).In the process, the reactive unit (the complex responsible for detection, 197) is reacted with styrene (198) to build the polymeric matrix 199.Concerning detection, in the absence of ClO − , the probe exhibited a strong red emission at 618 nm, rapidly suppressed with increasing ClO − in the presence of 3 eq H + .At the same time, an emission at 496 nm increased.According to the authors, this response is obtained because ClO − can swell the probe's polymer casing and allow the access of H + , causing changes in photophysical properties.Only when the system receives two inputs, H + and ClO − together, can the output AND gate for fluorescence be activated (Scheme 27b).
sion polymerization (Scheme 27a).In the process, the reactive unit (the complex responsible for detection, 197) is reacted with styrene (198) to build the polymeric matrix 199.Concerning detection, in the absence of ClO − , the probe exhibited a strong red emission at 618 nm, rapidly suppressed with increasing ClO − in the presence of 3 eq H + .At the same time, an emission at 496 nm increased.According to the authors, this response is obtained because ClO − can swell the probe's polymer casing and allow the access of H +, causing changes in photophysical properties.Only when the system receives two inputs, H + and ClO − together, can the output AND gate for fluorescence be activated (Scheme 27b).

Other Applications
Considering their potential for monitoring applications, MLGs have demonstrated their usefulness in several areas as biosensors to detect and monitor changes in cellular processes, such as ion flux, enzyme activity, and pH [15,330,331].They are also valuable for measuring blood electrolytes and tracking chemical species and properties in cells and tissues [332].In addition to that, they can help detect toxic agents in aquatic environments,

Other Applications
Considering their potential for monitoring applications, MLGs have demonstrated their usefulness in several areas as biosensors to detect and monitor changes in cellular processes, such as ion flux, enzyme activity, and pH [15,330,331].They are also valuable for measuring blood electrolytes and tracking chemical species and properties in cells and tissues [332].In addition to that, they can help detect toxic agents in aquatic environments, monitor nuclear residues, screen catalysts, and contribute to the field of theranostics [333][334][335].Numerous examples of MLGs exploring the most diverse structural arrangements for various applications are reported in the literature.In addition to the examples discussed throughout the review, we present some selected examples in Table 1.

Conclusions
The shift in optical device concepts from single analyte detection to multiple analyte detection has been an area of much interest in recent decades.Thirty years ago, a new field began using Boolean logic, treating molecules as logic gates.Since then, much research has been carried out aiming at the elaboration of molecular architectures capable of detecting multiple analytes in a logical/sequential way.In this context, organic synthesis has presented a set of tools capable of inspiring scientists to elaborate different molecular architectures capable of acting as various logic gates.The present review described the fundamental concepts in the architecture of MLGs by discussing examples from the litera-ture.Despite all the advances made in the last three decades, the search for such devices is still constant, always seeking to diversify the possibilities of detections with different responses, high degrees of sensitivity and selectivity, and low cost in the preparation of MLGs.In addition, there is still a long way to go before making these compounds viable for real applications and their transposition to different matrices to enable the real application of these devices.Progress in the development of intelligent drug delivery systems, the application of chemical communication technologies in nanotechnology, and the evolution of environmental monitoring emerge as promising application areas for developing molecular logic gates.Even in the face of everything that has already been done, there is still much to be done, and we hope that this review will be a source of inspiration for expanding the state of the art in molecular logic gates.

Figure 1 .
Figure 1.Examples of chromophores/fluorophores, which are usually used as building blocks for constructing optical devices.

Figure 1 .
Figure 1.Examples of chromophores/fluorophores, which are usually used as building blocks for constructing optical devices.

Figure 2 .
Figure 2. Receptors based on association with the design of chemosensors.

Organics 2024, 5 ,Figure 3 .
Figure 3. Summary of constructing (a) donor-acceptor, (b) donor-acceptor-donor, and (c) acceptordonor-acceptor configurations.D-A or D-pi-A:This configuration comprises the most straightforward system and the most predictable optical response.In this case, there is a transfer of charge from the donor region to the acceptor region when the molecule interacts with a specific analyte or even its surrounding environment.A conjugate spacer may separate donor and acceptor groups.It is commonly related to the PET and ICT mechanisms[229][230][231].

Organics 2024, 5 , 13 Scheme 5 .
Scheme 5. Chemosensor prepared by Ghosh et al. [249].(a) Synthetic route adopted by the authors.(b) The interaction mechanism between compound 30 and acetate anion and (c) the detection of Al 3+ by 30 involving the ESIPT phenomenon and isomerization of the CH-N bond.

Scheme 5 .
Scheme 5. Chemosensor prepared by Ghosh et al. [249].(a) Synthetic route adopted by the authors.(b) The interaction mechanism between compound 30 and acetate anion and (c) the detection of Al 3+ by 30 involving the ESIPT phenomenon and isomerization of the CH-N bond.
Scheme 11.(a) Synthesis of the D-A system 98 reported by Song et al.(b) Sensing mechanism of Cys detection [267].

Figure 4 .
Figure 4. Symbolic representation of logic gates and their corresponding truth tables built from values of inputs and outputs.

Figure 4 .
Figure 4. Symbolic representation of logic gates and their corresponding truth tables built from values of inputs and outputs.

Figure 4 .
Figure 4. Symbolic representation of logic gates and their corresponding truth tables built from values of inputs and outputs.
Scheme 14.(a) Synthetic route to obtain compounds 121 and 122 based on crown ether development by Gauci et al. [295]; (b) Corresponding truth table and (c) MLG diagram.
Scheme 14.(a) Synthetic route to obtain compounds 121 and 122 based on crown ether development by Gauci et al. [295]; (b) Corresponding truth table and (c) MLG diagram.
Fang et al. synthesized examples of NAND MLGs (128 and 129) through the coupling of tetrathiafulvalene (127) and 5-methoxy-2-pyridylthiazoles (123-124; Scheme 15) [297].Palladium-catalyzed coupling reactions offer a reliable and efficient approach to constructing carbon-carbon bonds, which is particularly useful when considering the requirements for building a fluorophore.Halogenated groups are important starting materials for such reactions.Using Pd(PPh 3 ) 4 as the catalyst, the authors achieved a 58% yield of both 128 and 129 by performing a Stille coupling reaction that joined 5-methoxy-2pyridylthiazole (125-126) (a fluorophore) with Bu 3 Sn substituted tetrathiafulvalene (127).
Scheme 15.(a) Synthesis of compounds 128 and 129 described by Fang et al. [297]; (b) Truth table for NAND logic and (c) the corresponding diagram.
2 (I − ) with 135 resulted in fluorescence quenching (135), implementing the required NOT gate.MLG 135 operates parallel with the fluorescence output signals, which implements the necessary AND function.Therefore, when evaluating the fluorescence at 560 nm after introducing Hg 2+ , I − and an equimolar mixture of Hg 2+ and I − , 135 can be characterized as an INHIBIT logic gate (Scheme 16c,d).In other words, I − inhibits the Hg 2+ input.
Scheme 17.(a) Molecular logic gate 140 for detection of Hg 2+ described by Kumar et al. [303]; (b) The sensing mechanism and (c) corresponding truth table and (d) diagram.

Scheme 20 .
Scheme 20.(a) Synthesis of compound 158 and functionalized material 159, produced by Souto and Machado; (b) The truth table of INHIBIT-type and (c) IMPLICATION-type logic [306].Scheme 20.(a) Synthesis of compound 158 and functionalized material 159, produced by Souto and Machado; (b) The truth table of INHIBIT-type and (c) IMPLICATION-type logic [306].

Scheme 25 .
Scheme 25.(a) Structures proposed by Klein et al. for [2]Rotaxane 186, (b) Sensing mechanism of 186 with HBF 4 and HCl; (c) The truth table of 186 corresponds to an AND-type molecular logic gate [327].

Scheme 27 .
Scheme 27.(a) The polymerization reaction of 199 presented by Zhou et al.; (b) AND gate identified and (c) corresponding truth table [329].

Scheme 23 .
[317]n-a-molecule 172 proposed by Scerri et al. and the truth table corresponding to an AND-type gate with three inputs[317].
rotaxane to the different DBU and Fe 3+ combinations correspond to an INHIBIT logic gate, as represented in Scheme 24.

Table 1 .
Some other selected examples of applications of MLGs and their logic function.