Logical circuits in colloids

Colloid-based computing devices offer remarkable fault tolerance and adaptability to varying environmental conditions due to their amorphous structure. An intriguing observation is that a colloidal suspension of ZnO nanoparticles in dimethylsulfoxide (DMSO) exhibits reconfiguration when exposed to electrical stimulation and produces spikes of electrical potential in response. This study presents a novel laboratory prototype of a ZnO colloidal computer, showcasing its capability to implement various Boolean functions featuring two, four and eight inputs. During our experiments, we input binary strings into the colloid mixture, where a logical ‘True’ state is represented by an impulse of an electrical potential. In contrast, the absence of the electrical impulse denotes a logical ‘False’ state. The electrical responses of the colloid mixture are recorded, allowing us to extract truth tables from the recordings. Through this methodological approach, we demonstrate the successful implementation of a wide range of logical functions using colloidal mixtures. We provide detailed distributions of the logical functions discovered and offer speculation on the potential impacts of our findings on future and emerging unconventional computing technologies. This research highlights the exciting possibilities of colloid-based computing and paves the way for further advancements.


Introduction
A substance that cannot sustain shear stress when at rest is classified as a fluid: such stress necessarily produces a change in shape and the most remarkable dynamic phenomenon of flow.Specifically, a liquid is categorised as an incompressible fluid.Using liquids as computing devices can be traced back to documented evidence in papers discussing hydraulic algebraic machines [13,16,15].In our recent comprehensive overview [2], we thoroughly examine various families of liquid computing devices.These include hydraulic machine integrators, fluid mappers, fluid jets employed in fluidic logic devices to realise logical gates, liquid marble computers, and reaction-diffusion computers.
Several years ago, we developed the concept of the liquid cybernetic system [7], a colloidal autonomous system, which is a soft holonomic processor realising autolographic features [8].Further, these theoretical ideas of colloid computers were implemented into laboratory prototypes.Our experiments conducted in controlled laboratory conditions also revealed the potential of ZnO colloid mixtures to function as electrical-analogue neurons, successfully implementing synaptic-like learning as described in [18], as well as demonstrating the manifestation of Pavlovian reflexes [17].The experimental study presented in [10] showcases the classification capabilities of a Fe 3 O 4 waterbased ferrofluid for digit recognition within an 8×8 pixel dataset.Additionally, we demonstrated that this ferrofluid could be programmed using quasi-direct current signals and read in radio frequency mode.
To thoroughly assess the computational capabilities of colloid computers more formally than previously explored, we embarked on a study to determine whether Boolean functions could be straightforwardly implemented in colloid mixtures.To achieve this, we adopted a theoretical approach outlined in [1,3].This technique involves selecting a pair of input sites and systematically applying all possible combinations of inputs to these sites, where the electrical characteristics of the input signals represent logical values.The resulting outputs, represented by the electrical responses of the substrate, are recorded on a designated set of output sites.
This approach falls within the realm of reservoir computing [30,21,11,19,12] and in materia computing [22,23,28,24,25], which are techniques used to analyse the computational properties of physical and biological substrates.By utilising these methodologies, we aim to gain deeper insights into the computational potential of colloid mixtures in a more rigorous and structured manner.

Methods
Zinc Oxide nanoparticles were purchased from US research nanomaterials.Sodium Dodecyl Sulphate (SDS) and Sodium Hydroxide (NaOH) were purchased from Merck.DMSO Pharmaceutical Grade 99.9% were purchased from Fisher Scientific.A Millipore de-ionized water generating unit, model Essential, with a resistance of 15 Mohm cm, was used to create DIW in the lab.SDS was added to DIW and stirred to get a homogenous surfactant solution with a concentration of 0.22 wt%.Under stirring, 2 ml of SDS solution and 1 ml of NaOH 10 M were added to the DMSO.The mixture was then treated with 1 mg ZnO nanoparticles while constantly stirring.The resulting dispersion concentration was kept constant at 0.11 mg/ml.For 30 minutes, the resultant suspension was placed in an ultrasonic bath.The stirring operation was then repeated for a few more hours to achieve a homogeneous dispersion of ZnO [4].
The nanoparticle suspensions were characterized using field emission scanning electron microscopy (FEI Quanta 650 FESEM).In this study, the accelerating voltage was set to 10 kV, while the working distance was roughly 5 mm.The contrast and brightness of the photos were adjusted so that particles could be differentiated from the backdrop.An Ultraviolet-visible spectrometer (Perkin Elmer Lambda XLS) was used to quantify sample absorbance at room temperature.Dynamic Light Scattering (DLS) measurements were performed on a Zetasizer Nano ZS (1000 HS, Malvern Instrument Ltd., UK) to analyze the z-average hydrodynamic diameter.
The developed hardware could send sequences of 2, 4, and 8-bit strings to the colloid sample.The strings were encoded as step voltage inputs where -5 V denoted a logical '0' and 5 V a logical '1'.The hardware was based around an Arduino Mega 2560 (Elegoo, China) and a series of programmable signal generators, AD9833 (Analog, USA).
To search for two-, four-and eight-input Boolean circuits, we used two, four, and eight-input electrodes, respectively.The input electrodes were 10 µm diameter platinum rods inserted into the colloid container with a separation of 5 mm between them.Data acquisition (DAQ) probes were placed in a parallel line, separated by 5 mm.There were 2 DAQ differential outputs from the sample container inputted to a Pico 24 (Pico Technology, UK) analogue-to-digital converter (ADC).The 3 th channel was used to pass a pulse to the ADC on every input state change.See Fig. 1 for a schematic of the apparatus.There were a total of 138 repeats.
A sequence of two, four, and eight-bit strings counting up from binary 00 to 11, 0000 to 1111 and 00000000 to 11111111 with a state change every 15 seconds, were passed into the colloid.All 138 repeats of the experiment were done on the same colloid.Samples from 2 channels were taken at 1 Hz over the whole duration of a given experimental run.Peaks for each channel were located for a set of 10 thresholds, from 100 mV to 600 mV with step 50 mV, for each input state, 0000 to 1111.

Colloid Structural Characteristics
The absorption spectrum of a ZnO colloid, with a concentration of 0.11 mg/ml, was measured at room temperature using UV-visible spectroscopy.The recorded spectrum covers a wavelength range of 200-700 nm. Figure (2, a) illustrates the UV-visible absorption spectrum plot.The spectrum shows a prominent peak at 372 nm, indicating hexagonal ZnO nanoparticles [26].Comparing these findings with existing literature, there is a strong agreement with previous reports [27,29].The optical band gap was calculated using the following equation: In this equation, E g represents the optical band gap, h is Planck's constant, c is the speed of light, and λ is the wavelength corresponding to the maximum absorption.The calculated value for the optical band gap is 3.35 eV, which aligns closely with previous findings from other sources [27,5,6].Dynamic Light Scattering (DLS) was utilized to characterize the ZnO nanoparticles in the colloid.Figure (2, b) displays the size distribution of these nanoparticles.A particle's average gyration (hydrodynamic) diameter is determined to be 496 nm, nearly 20 times the average diameter of an individual particle.As an amphoteric oxide, ZnO undergoes hydrolysis when exposed to water, forming a hydroxide coating on its surface.This coating contributes to an increase in the hydrodynamic diameter of the particles [14].

Gate
A thin layer of ZnO colloid was prepared to analyse the particles' morphology and size using the FESEM (Field-Emission Scanning Electron Microscopy) technique.This was done by drop-casting a drop of ZnO particle suspension, with a concentration of 0.11 mg/ml, onto a Copper foil with a 100 µm thickness.The preparation was carried out at room temperature.
The FESEM results, as shown in Figure (2, c), reveal the occurrence of particle agglomeration during the sample preparation process.Due to the surface tension of the solvent as it evaporates, the FESEM observations rarely display individual, separated spheres.Instead, most of the ZnO spheres appear to be multilayered.This can be attributed to the increased liquid surface tension, which draws the nanoparticles closer and leads to their reaggregation during the drying process [20].

Extracting Boolean Gates
Boolean strings were extracted from the data, where a logic '1' was noted for a channel if it had a peak outside the threshold band for a particular  Gate Table 2: Most commonly found four-input Boolean functions, n is a frequency of the functions' discovery.
state.Otherwise, a value of '0' was recorded, and the peak's polarity was not considered.
The strings for each experimental repeat were stored in their respective Boolean table.To extract state graphs, a state/node was defined as the string of output values from each channel at each input state, and transitions/edges were defined as a change in the input state.This led to a total (500 + 470 + 410 = 1380) state graphs.The sum of products (SOP) Boolean functions were calculated for the output channel.For each repetition, we collected data and applied 10 thresholds, giving 1380 individual truth tables.
SOP extraction is depicted in Fig. 3.If a peak is discovered during an input state, it is considered a logical 1.The DAQ measurements are shown in blue.The synchronisation signal is in orange, indicating the state change.The threshold band is green, while peaks outside of it are marked with 'x'.The resulting truth table is then reduced to the sum of products depicted in Fig. 3.
We have discovered a wide range of Boolean gates.Distributions of gates are shown in Fig. 4. Frequently found in experiments with two-input gates are shown in Tab 1 and illustrated in terms of circuits in Fig. 5ab.The most common gate is A + B, which is a NAND gate, a logic gate producing an output that is false only if all its inputs are true; thus, its output is a complement to that of an AND gate.The NAND gate is followed by OR gate and then by two NOT-AND gates.
Most frequently four-input gates are shown in Tab. 2 and illustrated with example circuits in Fig. 5cd.The size of a Boolean circuit is the number of gates in the circuit.Amongst most frequent four-input circuits (Tab.2) smallest circuits are The most frequent two-input and four-input gates are shown in Tab. 1.With regards to eight-input gates, all discovered gates are unique, i.e. have been measured just once, and the only following function has been found twice:

Discussion
Our laboratory experiments successfully demonstrated the feasibility of implementing a wide range of many-input logical gates within a colloid mixture comprising ZnO nanoparticles.The discovered two-input gates exhibit functional completeness, enabling the implementation of arbitrary Boolean functions.Notably, the four-and eight-input functions discovered showcase a remarkable level of non-linearity, suggesting that the dynamical behaviour of colloid-based logical devices could be characterized by multiple attractors and bifurcation points, more than features such as resistive switching which was already observed [9].
Looking ahead, our future research direction could focus on cascading the colloid droplets to construct multi-level logical circuits.Additionally, we aim to develop protocols for programming dynamical logical circuits within the colloid droplets.Leveraging on the observed multistability that is the presence of multiple attractors, a possible blue sky objective would regard the implementation of a sequential computing machine, which, similarly to solid-state computers, can be programmed and can execute instructions.Our laboratory experiments have already demonstrated the fundamental assumptions needed to reach this goal, showcasing the possibility of implementing in-memory computing with ferrofluids, therefore showing the coexistence of memorising and computing capabilities.For the particular case studied here, the presence of multiple Boolean transfer functions inherently suggests the existence of a pre-built program in the colloid, here, a function of threshold, but in general, a function of other parameters, including time.A possible solution to achieve functionalities similar to a microprogrammed solid-state computer could regard modulating input signals to convey an equivalent inline and just-in-time executed program.Further studies can then focus on the stimulations' meaning and timing and the feasible techniques for their modulation.This concept, inter alia, further overlaps with the field of neuromorphic computing because inputs can degenerate into spikes for low-duty cycles.These advancements would enhance the capabilities and expand the potential applications of colloid-based computing systems.

Acknowledgement
This project has received funding from the European Innovation Council And SMEs Executive Agency (EISMEA) under grant agreement No. 964388.

Figure 1 :
Figure 1: Left: A scheme of the experiments.PC -laptop for generating sequences; CU -control unit, the dashed section is a breakdown of a single channel; ADC -analog to digital converter.Right: experimental setup.

Figure 2 :
Figure 2: Structural characterization of colloid used in experiments.(a) UV-Visible spectra of the ZnO colloid.(b) Particle size distribution of ZnO nanoparticles in colloidal solution using dynamic light scattering.(c) SEM images of drop-cast ZnO colloids on a Copper substrate in different magnifications.

Figure 3 :Figure 4 :
Figure 3: Workflow example.a) The voltage measurements of the sample.The DAQ are in blue.The synchronisation signal is in orange, the threshold band is green.b) The resulting truth table and the extracted function.

Figure 5 :
Figure 5: Examples of logical circuits realised in (ab) two-input and (cd) four-input logical circuits.

Table 1 :
Most commonly found two-input Boolean functions, n is a frequency of the functions' discovery.