In-fibre logic and memory via tuneable passivation–corrosion

Domain: biology
Published: 2026-03-31
Editorial outcome: major_revision

Abstract
Textile electronics with digital capabilities could sense, process, and store data, while providing
immersive interaction with user and their immediate surroundings. However, existing textile electronic
systems are typically built on von Neumann architecture and rigid chips, limiting their seamless
integration with clothing. Here, we propose a single-fibre logic/memory electronic device based on
interface passivation-corrosion whose functions do not depend on traditional carrier heterojunction
interfaces. The same fibre can be switched to operate as either a diode or a memristor. The diode mode
remains stable under higher voltages and longer cycling periods than the state-of-the-art anion–cation
heterojunction fibres. The fibre electronics are highly stretchable (up to 50%), and are compatible with
industry-standard weaving techniques. We also demonstrate the application of these fibres in “AND” and
“OR” logic gates, neuromorphic synapses, and textile memristor arrays. Regulated passivation-corrosion-
enabled logic and memory in fibres offers a promising avenue for the next-generation textile computing.

Introduction
With the advancing pace of the development of wearable technologies, electronic-textile digital systems
emerge as a bleeding-edge technology in current research1, 2, 3. Electronic functions such as computing
and data storage are now directly embedded into textiles, enabling efficient data collection4, processing3
and storage5 in real time at the wearable garment-based device itself. This allows immersive interactions
of the device user with their surroundings without the need to outsource processing and memory outside
of the worn device itself6, 7, 8. However, most textile electronic systems intended for on-textile computing
are typically based on von Neumann electronic architecture4, 9, 10, and thus strongly depend on intrinsically
rigid silicon-based integrated circuits. While extremely powerful and well-established, these rigid silicon-
based circuits3, 11 (stiffness: 107 to 109 N·m−1; curvature radius: 10−6 to 10−3 m) typically present a very
large mechanical mismatch when interfaced with soft materials typically used in everyday clothes12, 13
(stiffness: 103 to 105 N·m−1; curvature radius:10−3 to 10−2 m). This fact brings challenges for the seamless
integration of the devices into garments, wearing comfort, and daily usage, for example washing. This
aspect of the traditional von Neumann architecture-based textile computing and data storage makes it
almost impossible to completely hide the technological entity within the garment14, 15, 16, precluding
inconspicuous and unobtrusive computing in the daily apparel. To achieve true "textile computing", we
must first start with the underlying architecture and create flexible computing and storage devices that
match the mechanical properties and form-factor of the textile substrate itself.

In pursuit of true “textile computing”, we sought to embed basic computing and memory function
into a single fibre or a yarn. The fibre itself should perform the role of logic signal process and digital
memory function, making it a building block for the future computing-capable electronic textiles.
Currently, smart fibres capable of such functions are made via combination of semiconducting materials
brought together in one fibre/yarn to form a heterostructure interface17, 18, 19. This structural and electronic
alignment defines the nature of charge carriers (electrons or ions) at the interface. Electronic properties of
the heterojunction itself determine some key technical parameters for the operation in the device (e.g.
operational voltages and polarization speed) for use in the single fibre textile-based computing. Some
commonly employed structures have their own advantages and downsides: (1) The electron/hole
heterojunction route allows for excellent carrier mobility20 and switching ratio21—key attributes for fast,
reliable logic operations. However, these interfacial heterojunctions require complex, multi-step
fabrication processes that are difficult to achieve on one-dimensional, high-curvature fibre surfaces.
Traditional materials used in this process also cannot accommodate the repeated stretching and folding
that textiles experience during normal use22. (2) The anion/cation heterojunctions23, 24, 25 are usually based
on polyelectrolyte systems, which can be applied through simple coating or fibre-spinning methods and
exhibit excellent mechanical flexibility and elasticity26, 27. On the other hand, the charge transport in these
systems is unreliable under varying environment parameters, such as humidity28 and stress29, and stable
operation is limited to low voltages23 (usually <1 V). Perhaps most critically, neither approach supports
post-fabrication reconfiguration. Once produced, these fibres are stuck in their logic and memory roles.
Unlike programmable microcontrollers, they cannot switch functions or adjust operating parameters to
meet evolving computational demands. To address increasingly complex edge-computing requirements
in wearables, we aim to develop fibre architectures that combine the mechanical flexibility and both logic
and storage capabilities, being able to fluidly interchange on demand.

In this work, we have exploited the metal/electrolyte interface passivation-corrosion effect to create
a tunable in-fibre logic and memory electronics (FLAME), which does not require the design of complex
heterojunction interfaces. The device consists of intrinsically stretchable shell that encases a built-in
helical aluminium yarn, which is suspended in a hydrogel electrolyte. The oxide layer on the metal surface,
which bears barrier and selector functions in the complete device, can be generated and removed in situ
by pre-applying voltage after the assembly of the device, which greatly reduces the manufacturing
difficulty of one-dimensional fibre electronics. By adjusting the pre-applied voltage and pulse time
parameters, FLAME can exhibit various electrical device morphologies, including diodes and memristors,
which are critical for reconfigurable textile electronic systems. The diode-like performance in FLAME
can be continuously operated long switching cycles (~ 7000 cycles at ±3 V) and high voltage range of ±8
V (but not limited to), which is much higher than the operating voltage range of the state-of-the-art
anion/cation heterojunction devices. The memristor-like performance of the FLAME device enables
short-term plasticity (STP) electric pulse patterns, which produce a change in response current of about
0.5 mA under a pulse stimulus with a 50 ms interval. In addition, FLAME devices exhibit excellent
stretchability (up to 50%) and compatibility with modern weaving techniques. We demonstrate the
application of FLAME in the stretched state for “AND” and “OR” logic gates, neuromorphic synapses,
and textile memristor array.

Results
Concept and design of in-fibre logic and memory
We propose to start from the basic topological unit of textiles—fibre/yarn—and incorporate in situ
controllable logic and memory functions in it30. This bottom-up design architecture from a single yarn,
not only achieves a continuous transition with the mundane yarn used as structural matrix for the rest of
the textile in terms of elastic modulus and curvature radius22, but also allows for endogenous arrangement
of logic and memory nodes during the weaving stage. This provides a dependable technical approach for
textile-level computing and storage (Fig. 1A). Fig. 1B shows that FLAME with a diameter of ~500 μm
can pass through a standard sewing needle hole (approximately 600 μm), demonstrating its process
compatibility in regard to both fineness and softness. Our FLAME consists of a three-layer structure, with
the core layer being an aluminium electrode, the middle layer being a hydrogel layer of different pH
values, and the sheath layer being a stretchable silicone rubber. During normal operation, aluminium and
inert conductive carbon fibres act as an electrode pair, and the hydrogel layer acts as an electrolyte layer.
Whether the FLAME behaves as a diode or memristor highly depends on the chemistry of the
interface between the metal electrode and the electrolyte, which in its turn is governed by the hydrogel
pH. At pH 4–7, aluminium surface passivation dominates31, 32, 33 (Fig. 1C, and Supplementary Figs. 1 and
2): short-term positive voltage bias only partially induces anodic oxidation, resulting in local conversion
of aluminium (Al) to alumina (Al₂O₃) and formation of a fuse-type memristor. A longer-term applied bias
creates a continuous and dense oxide layer that prevents faradaic processes and yields a forward-cutoff
diode. A pH 8–10, surface corrosion processes dominate34 (Fig. 1D, and Supplementary Figs. 1 and 3):
prolonged positive bias generates a loose aluminium hydroxide (Al(OH)₃) sheath that covers the Al fibre
surface. When a reverse bias is subsequently applied, gas evolution and the locally elevated pH convert
Al(OH)₃ into soluble AlO -, removing the deposit and giving rise to either diode-like or memristive
2
characteristics, depending on the voltage application time (Supplementary Notes 1 and 2). A short reverse
pulse only partially dissolves the Al(OH)₃ layer, producing memristor-like behaviour, whereas an
extended reverse bias drives continuous faradaic reactions under the high local OH⁻ concentration,
restoring a diode-like response. Hence, by adjusting electrolyte pH together with the polarity and duration
of the applied voltage, the same fibre can be programmed to operate as either a diode or a memristor.
Furthermore, based on the passivation and corrosion reactions on the surface of the aluminium metal
electrode, we summarized the qualitative phase diagrams of FLAME's diode-like and memristor-like
behaviour under acidic and alkaline conditions (Fig. 1E). Under mildly acidic conditions, low-voltage,
short-time positive polarization pretreatment leads to FLAME behaving as a memristor; high-voltage,
long-time positive polarization pretreatment will make FLAME behave as a diode. On the other hand, in
mildly alkaline conditions, low-voltage, short-time negative polarization leads to memristor behaviour
again, while after high-voltage, long-time positive polarization FLAME starts working as a diode. The
interval between the two is manifested as a series connection of a memristor and a diode. These ‘phases’
of operational stages of the FLAME are denoted by colours and corresponding electric circuit symbols in
the Fig. 1E. The hydrogel layer inside FLAME exhibits good mechanical properties under both acidic and
alkaline conditions (Supplementary Figs. 4 and 5), and the entire fibre can be wound and threaded, making
it compatibility with modern weaving techniques. To further demonstrate the practical viability of
FLAME, we conducted integration trials using a commercial weaving machine (Fig. 1F, and
Supplementary Movie 1). FLAME was successfully treated as functional yarn and directly incorporated
into the textile structure as a warp yarn in an elastic woven textile during the automated weaving process.
The woven electronic textile maintains stable performance and structural consistency under large
mechanical deformations, specifically within a stretchability range of 0% to 50% (Supplementary Fig. 6).

Mechanism of passivation-corrosion-induced in-fibre logic/memory
For in-depth understanding of how the passivation-corrosion mechanism of aluminium surface affects the
behavior of FLAME electronic devices, we performed a systematic analysis of pH, electrode type
(Supplementary Fig. 7), electrode micromorphology, and surface elements. When the aluminium
electrode is pre-treated with a positive voltage in acid, its surface aluminium metal is partially oxidised to
form a dense Al₂O₃ layer. This oxide gradually blankets the underlying metal and slows further anodic
oxidation, a process generally referred to as surface passivation. If the Al surface is only partially covered
when we begin the cyclic-voltammetry (CV) scan in two electrode mode (aluminium thread being
connected as a working electrode), the device behaves like a memristor: each forward sweep oxidises
more and more exposed metal, enlarging the oxide area, which in turn suppresses the reaction and lowers
the current (Fig. 2A, and Supplementary Fig. 8A). Once the aluminium is fully coated with Al₂O₃, a
subsequent CV scan produces almost no anodic oxidation. The oxide acts as an effective barrier, so the
current–voltage curve now resembles that of a diode without a distinct forward turn-on (Fig. 2B and
Supplementary Fig. 8B). Thus, the extent of oxide coverage—controlled by the pre-treatment voltage and
time—dictates whether the FLAME exhibits memristive or diode-like behaviour. We can further describe
the electrochemical reaction and charge transfer behaviour at the aluminium electrode interface from the
perspective of energy diagram (Fig. 2C). When a positive overpotential is applied to the aluminium
electrode, the position of the Fermi level of the aluminium electrode in terms of energy is lowered
(E →E ’), which causes the overlap integral for the reduced electrochemical species at the interface
F F
between the electrode and the electrolyte to be much bigger than for the oxidised species. An anodic
current flows and net oxidation occurs. As the anodic oxidation reaction proceeds, the passivation barrier
on the aluminium electrode surface gradually thickens, hindering the direct contact between the electrode
and the electrolyte, which gradually suppresses the Faraday reaction on the aluminium electrode surface.
We performed a series of SEM characterizations that follow the oxide film formation on the aluminium
electrode as the applied positive bias increases in mildly acidic conditions (Fig. 2D, and Supplementary
Figs. 9 and 10). The process of the stripe-shaped oxide layer on the surface of the aluminium electrode
gradually growing and completely covering its surface further confirms our hypothesis.

Under mildly alkaline conditions, a positive bias oxidises the aluminium surface leading to formation
of a porous Al(OH)₃ layer. During the forward (anodic) sweep of a cyclic voltammogram, this loose film
is breached, exposing fresh metal; each new site supports further Faradaic reactions, so the anodic current
continues to rise. The behaviour of the system on the opposite sweep direction is more complex. Quite
likely, in the reverse sweep, water reduction raises the local OH⁻ concentration, and the excess hydroxide
helps dissolve the Al(OH)₃ layer, momentarily liberating the aluminium surface, which is reflected by a
small peak on the curve. Continuing application of voltage though, leads to further suppression of the
water electrolysis, leading to a progressive fall in the cathodic current (Fig. 2E, and Supplementary Fig.
11A). If a reverse voltage is continuously applied to the aluminium electrode after aluminium hydroxide
is formed, a large amount of hydroxide ions will be formed in the aluminium electrode region due to the
electrolysis of water. Therefore, if a CV sweep is performed, the corrosion reaction of aluminium at a
positive potential will be promoted, while the electrolysis reaction of aluminium at a negative potential
will be suppressed, resulting in a diode-like IV curve (Fig. 2F, Supplementary Fig. 11B). From the
perspective of energy diagram (Fig. 2G), a positive over-potential lowers the aluminium electrode’s Fermi
level, increasing its electronic overlap with reducible species in the electrolyte. This expands the electron
overlap between the metal state and the reducible species in the electrolyte, thereby promoting electron
transfer (redox) and corroding the aluminium metal. As oxidation proceeds, more new aluminium-solution
interfaces are exposed, adding additional reactive sites and further accelerating the Faradaic process. Fig.
2H and Supplementary Figs. 12 and 13 show a series of SEM images showing the formation of loose bulk
Al(OH)₃ under applied forward bias in a weak alkaline solution and the elimination of Al(OH)₃ upon
application reverse voltage, which further supports our hypothesis.

We further validated our findings by characterizing the chemical bonds on the aluminium surface at
different reaction stages using X-ray photoelectron spectroscopy (XPS) (Fig. 2I, and Supplementary Fig.
14). XPS is an excellent tool to distinguish the nature of the chemical bonds on the surface and to
determine precise aluminium oxidation states by their binding energies (Al 2p region). Pristine aluminium
shows two peaks: 76.3 eV for the native Al₂O₃ film and 72.75 eV for underlying metallic Al31. After anodic
passivation in acid, a compact oxide blankets the surface; only the 76.3 eV peak remains, indicating
complete coverage of the metal (at least within the depth reach of XPS capabilities). In mild alkali,
corrosion converts the surface to Al(OH)₃, as evidenced by a new peak at 75.75 eV, while the Al₂O₃ signal
all but disappears. Applying a reverse bias in the same alkaline medium locally raises the hydroxide
concentration, dissolving Al(OH)₃. As the hydroxide layer thins, its 75.75 eV peak diminishes and the
characteristic Al₂O₃ and metallic Al peaks re-emerge, confirming partial restoration of the original surface
states.

Fibre-based diode for rectification and logic gate
Because of the electrical behaviour of the aluminium electrode under different pH environments and
different pretreatment voltages, it can play a similar function to the diode in electronic components. These
properties can be exploited to construct a fibre-like diode that would show similar effects. As shown in
Fig. 3A, we design a stretchable fibre-like diode which consists of intrinsically stretchable shell and built-
in helical aluminium yarn, which show a reversible strain of 50% (Fig. 3B, and Supplementary Figs. 15).
Hydrogels with different pH are used as filling of the tube and act as electrolyte surrounding aluminium
yarn. Aluminium yarn is left protruding on one end of the yarn to form one electrical contact of the diode-
fibre. On the other end of the diode fibre, an inert carbon electrode is placed at the opening of the silicon
tube, closing the shell and providing the second electrical contact for the yarn diode. In mildly acid (pH=4),
applying a positive voltage to aluminium (and thus a negative voltage to the carbon electrode) forms a
passivation layer that prevents anodic oxidation from occurring, resulting in low current (Fig. 3C). When
a negative voltage is applied, some electrolysis of water still occurs on the aluminium electrode surface,
resulting higher reverse current forward current (Supplementary Movie 2). In mildly alkaline (pH=10),
pretreatment with a positive voltage corrodes the aluminium and forms Al(OH)₃ flakes. This rough surface
can be better oxidized under forward bias, resulting in higher current. However, under reverse bias, excess
hydroxide ion inhibits reduction, resulting in lower current (Fig. 3D). Such electrochemical behaviour of
the device ultimately results in the rectification effect, such as in a diode (Supplementary Table 1).

The fibre-based diode with different pH values were subjected to electrical rectification tests with
different amplitude voltages as shown in Fig. 3E. By applying square wave voltage function with an
amplitude from ±1.5 V to ±8 V at pH=4, the output of the device showed good rectification performance.
Importantly, the fibre-based diode is capable of switching rectification direction in a controlled fashion,
with different rectification directions achieved by simply changing the pH value of the hydrogel portion
with the same electrode pair. In the case of pH=4, the diode that exhibits conduction from the carbon
electrode to the aluminium electrode. In addition, we also tested the stability of the diode-like device by
conducting a rectification test at ±3 V for 24 hours and about 7000 cycles (Fig. 3F). The results showed
that the rectification voltage of the device did not drop significantly, showing good stability.

Apart from AC rectification, diodes can be used in more advanced electric circuits utilizing this
function. Here we developed a “all- fibre” stretchable logic gate (Supplementary Fig. 16), include “OR”
and “AND” gates which constitute the basic logic unit of textile electronic systems. By sewing 2 diode-
like fibre devices in parallel, the OR and AND gates can be implemented in different connections as shown
in Figs. 3G and 3H, respectively. On the textile, carbon black-based stretchable resistors are also
connected by series/parallel connections to complete the corresponding logic gate configurations. In the
constructed flexible OR gate, 2 fibre-like diode devices are connected in parallel and then connected in
series with a stretchable resistor, and by applying either a low or a high voltage level at the other end of
the two diode-like devices, the final output signal (either high or low) can be controlled. When a high
level is applied to either the V a or V b side, a high-level signal can be detected at V even at 50%
in in out
strain (Figs. 3I and J). For the AND gate, by connecting two diodes in parallel with two resistors as shown
in Fig. 3K, different level responses can be measured by applying different levels at the two class diodes
(Fig. 3L). While unloaded (none or either input is activated) signal is non-zero, the evidently much
different and higher-level response is recorded only when both inputs are activated, clearly showing the
textile device functioning of the AND gate. To assess the reliability of actual wearability, we conducted
comprehensive durability and biocompatibility tests using the OR logic gate textile as an example.
Experimental results show that the device exhibits excellent environmental stability: the logic output
remained stable under temperature fluctuations from 32.5°C to 60.1°C (Supplementary Figs. 17 A and B)
and humidity variations from 35.42% to 78.43% RH (Supplementary Figs. 17 C and D); even after 10
standard water washes, its electrical performance showed no significant degradation (Supplementary Fig.
18).

Textile-based memristor device
By utilizing the phenomenon of generation of oxide or hydroxide on the surface of metallic aluminium,
the studied system can exhibit memristor-like electrical properties and can thus be used in realization of
various neuromorphic functions. Inspired by biological ion channels of neurotransmitters in synapses 35,
36 (Fig. 4A), we designed and fabricated a textile-based memristor device. FLAME can exhibit different
memristor behaviors under acidic (Supplementary Figs. 19 and 20 and Supplementary Movie 3) and
alkaline conditions (Supplementary Movie 4). We focus on the memristor behavior under alkaline
conditions in the main text. The basic principle is to pre-treat the metal aluminium through oxidation
reaction in an alkaline environment (Fig. 4B). The metallic aluminium undergoes a redox reaction, losing
electrons, generating Al(OH)₃, i.e. corrosion on the surface of the metallic aluminium is induced. Then,
negative voltage is applied to the aluminium metal, inducing an electrochemical reduction at the electrode.
However, during the pretreatment process, a large amount of hydroxide ions is generated on the surface,
the local pH value increases, and part of the Al(OH)₃ will be converted into aluminate ions. The reduction
reaction will also lead to evolution of gas, which will break away loose the Al(OH)₃ coating flakes on the
surface. It can be seen from the SEM image in Fig. 4B that after negative polarization of the aluminium
metal, the amount of Al(OH)₃ floccules on the surface is significantly reduced. Furthermore, under
alkaline conditions, the performance of this memristor does not significantly degrade during 250 cycles
(Supplementary Fig. 21).

As a proof of concept, we show that such electrochemical behaviour can be used to mimic some of
the basic functions found in biological synapses. We demonstrated that the conductivity of memristor
fibre can be increased or decreased by a continuous voltage sweep of a given polarity (Fig. 4C). The
output current of the device changes depending on the input voltage sign and time of application, meaning
that the overall impedance of the system can be controllably decreased or increased in this fashion. To
mimic the short-term plasticity (STP) of the synapse, we applied multiple voltage pulses to the textile-
based memristor and recorded current spikes in accordance with pulsed stimulations (Fig. 4D). The
applied voltage excitation was –6 V, and the duration (marked t ) and interval between the excitation
p
pulses (marked Δt) were both 50 ms. In the response current, the positive current portion (a small spike
in the beginning of the impulse) is due to the charging current response brought about by the applied
voltage polarity switching. After applying multiple reverse voltage excitations, the current response
dropped by approximately 0.5 mA. Inspired by long-term potentiation of synapse, we exploited the
phenomenon that the electrical conductance of metallic aluminium undergoes similar changes upon the
formation or elimination of non-conductive oxidation products on its surface, enabling memristor-based
computing (Fig. 4E). We access it by applying multiple "write" voltage spikes and using very small "read"
pulses, which do not change memristor’s state if the pulse voltage is small enough. The state of the
memristor can also be reset to its original value by applying the opposite "erase" voltage spike. After 2
consecutive "long write" and 2 "long erase" cycles, performance of the device remains stable. The working
principle of the circuit is shown in Fig. 4F.

As shown in Fig. 4G, we fabricated a 2×2 memristor array with four nodes (A , A , B and B ). During
1 2 1 2
the test, only the A
1
point is subjected to the “ write” and “erase” operations. When writing to point A
1
,
the conductance of the other points was not affected significantly. After two cycles of "writing" and
"erasing", the array's overall conductivity (and corresponding individual memristor states) remains stable
(Supplementary Fig. 22). Furthermore, we designed a 6×6 textile memristor array on cotton as shown in
Figs. 4H and I. In this architecture, we sewed aluminium yarn as warp and carbon yarn as weft on the
surface of commercial cotton textile, and the hydrogel layer was deposited between the textile pores by
spraying (Supplementary Fig. 23, Supplementary Movie 5 and Supplementary Note 3). The spraying
process can keep the resistance between each node within a stable range (Supplementary Fig. 24). Each
intersection of the two yarns forms an independent memristor node, which allows the textile to still
maintain good breathability (Supplementary Fig. 25). Upon application of necessary voltage, the
aluminium wire covered with gelatine will be corroded, and hydroxide will be produced on the surface,
inducing a memristor-like behaviour of the junction. This vertical structural design, by controlling a
reasonable write threshold voltage, can prevent write crosstalk between adjacent memristors
(Supplementary Fig. 26). Based on a 6×6 memristor array, a specific pattern can be encoded by "writing"
at the specific point by application of the actuating voltage, the conductance of this specific intersection
will then be significantly reduced. Then, by performing a "read" operation on the entire array, it can be
precisely recorded, which individual junctions were “written”, and which remain in their native state.
Analogously, application of an “erase” pulse allows to erase the written information, and perform the
“writing” again. To demonstrate this, we have “written” and “read” the letters "B", "M", "H", and "T"
onto the memristor array can be seen in the Fig. 4J. Furthermore, we developed a portable microprocessor
to control the writing and reading processes of the textile memristor array (Supplementary Figs. 27, 28
and Supplementary Note 4).

Methods
Ethics statement
All tests involving human participants were considered by ETH Zurich Ethics Commission, establishing
that the project is not considered human subject research and thus exempt from approval. Written and
signed informed consent of all participants was obtained prior to tests and inclusion in this study.

Materials
Aluminium yarn (FibreCoat GmbH, Germany), Hollow silicone rubber fibre (Thermo Scientific
Chemicals, USA), Buffers solution with pH values of 4, 7, and 10 (SHanna Instruments, Romania), Carbon
black Vulcan XC72R (Nanografi, Turkey), Conductive carbon fibre yarn (Thermo Scientific Chemicals,
USA), polydimethylsiloxane (PDMS) (Dow Corning 184, US). Porcine Gelatine (G1890, Sigma-Aldrich).
All materials used as received without further purification.

Preparation of stretchable resistive fibre
Carbon black and PDMS were mixed in a mass ratio of 1:4, fully mixed using a stirrer for 15 minutes,
and vacuum degassed for 10 minutes. The mixed carbon slurry was then injected into the hollow silicone
rubber fibre and cured in an oven at 80 °C for 2 h. A stretchable resistive fibre with a resistance value in
the order of 500 kΩ was obtained for textile logic gates circuit.

Preparation of fibre-based diode
First, the conductive aluminium yarn was inserted into the hollow silicone rubber fibre, which was then
stretched to 1.5 times its initial length. The stress was then released, allowing the silicone rubber to shrink,
which in turn makes the internal conductive yarn recoil. Under the friction of the inner silicone wall, the
aluminium yarn formed a self-organized built-in helix structure. Second, gelatine powder was dissolved
in a mixture of commercial pH-buffer solution and glycerol (mass ratio 3:2) to prepare a gelatine solution
with a concentration of 15 wt%, followed by stirring at 80 °C for 30 minutes and ultrasonic degassing.
Finally, the gelatine solution was injected into the hollow centre of the silicone rubber fibre, and low-
temperature cross-linking was performed in a 4°C refrigerator to obtain the gel diode fibre. The
conductive carbon fibre yarn was then used to cap the part of the fibre not touching the aluminium wire
to for the second electrical terminal of the device.

Preparation of textile-based memristor array
A sewing/embroidery machine was used to fix the conductive carbon yarn and aluminium yarn on both
sides of the cotton textile to form a 6×6 textile array. Then we used a spray gun to deposit gelatine-based
hydrogel on the surface of the cotton textile. The hydrogel solution diffused along the textile pores to the
interface of the aluminium yarn and the carbon fibre yarn under the capillary effect, thus forming a
memristor array.

Material characterization and device measurements
The X-ray photoelectron spectroscopy (XPS) characterization was carried out using PHI Genesis
(Physical Electronics / ULVAC-PHI) device. The analysis setup is accredited, calibrated, and maintained
according to ISO/IEC standards. The XPS data is processed by CasaXPS (V2.3.26, Casa Software Ltd.,
UK). The morphologies of various samples were examined using a scanning electron microscope (JEOL
JSM-7100F). The elemental distribution on the samples surface analysed by elemental mapping using a
scanning electron microscope (JEOL JSM-7100F). Current-voltage (I-V) characteristics were measured
by using a potentiostat (μStat-i400, MetrOhEm DropSens) in a two-electrode configuration. The electrical
performance of the memristor devices was characterized using a Keysight B2912B precision
source/measure unit. The mechanical tests were conducted using an electric dynamic test instrument
(zwickiLine Z1.0, Zwick Roell).

Peer review rounds
[{"round": 1, "reviewer_comments": {"reviewer_1": "This manuscript reports a fibre-based electronic device that integrates logic and memory functions through aluminium/electrolyte passivation-corrosion effects. The idea is interesting, but there are several important problems related to the principle and the practical application potensial. Overall, I recommend rejection or at least major revision, following are sonme specific comments:\n1. Could the fabrication of this fibre device be made continuous?\n2. The rectification principle of the diode originates from the electrochemical reaction of the aluminium core. Therefore, the response time may be relatively slow. For example, in Figure 3F the rectification experiment shows obvious hysteresis. This could affect practical applications, and the authors are advised to provide an explanation.\n3. Since the gel electrolyte is acidic/alkaline, will it corrode the aluminium core during long-term storage, thereby degrading device performance?\n4. The authors should clarify the differences in sample size and integration methods between Figure 1B and the later figures. For example, in Figures 3G and 4H the fibres appear much thicker and are stitched onto textiles using auxiliary threads, rather than being directly woven. I would like to know whether FLAME can at this stage truly be woven into textiles as functional yarn.\n5. Figure 4H and Video S4 show a memristor array fabricated on the textile surface by spraying hydrogel solution directly over a large area. This process lacks reproducibility and rigour, and it greatly limits practical applications. Moreover, this fabrication method is very different from the earlier fibre device, giving a strong sense of disconnection.", "reviewer_2": "This manuscript reports a reconfigurable fiber device (FLAME) that can be switched between diode-like rectification and memristive behavior by programming the Al/hydrogel interface chemistry. The FLAME is not depended on the intricate carrier heterojunction interfaces and can be stretched by ~50% and woven into ordinary fabrics. On-fabric, it demonstrates AC rectification, OR/AND logic gates, synaptic short-term plasticity (STP), and write/read/erase operations in two-dimensional memristor arrays. The concept is original and timely for soft/wearable electronics. The results are overall convincing and well-presented. I recommend acceptance after minor revisions listed below.\n1. Lines 107–111 state that “At pH 4–7, aluminium surface…and yields a forward-cutoff diode” and lines 236–240 further note that “In mildly acid (pH=4), applying a positive voltage…higher reverse current forward current”. Taken together, this seems to imply that under pH=4 operation the oxide keeps thickening, degrading the memristive response until a diode-like state emerges. Does this mean the memristor–diode transition is irreversible under acidic and netral conditions?\n2. Figure 3F presents the long-time rectification test only at pH=4. This suggests that oxide passivation at pH=4 stabilizes the diode behaviour, whereas, per the previous comment, memristive behaviour under the same acidic medium might drift as the oxide thickens—implying that pH=4 is better suited for the diode mode. Conversely, at pH=10, facile formation/dissolution of Al(OH)₃ enables rapid “write/erase” spikes, seemingly favouring memristor operation.\n3. At pH=10, the device relies on repeated formation and dissolution of Al(OH)₃ on the aluminium yarn. While this underpins fast write/erase, it could also lead to irreversible damage of the Al conductor (pitting, mass loss, roughening). What is the device lifetime under alkaline operation?\n4. The manuscript mixes British and American conventions across spelling and style. For example, the main text alternates between “fibre” and “fiber”, and between “aluminium” and “aluminum.” It also alternates “Figure” and “Fig.” in captions/text. Please standardize language and notation per the journal’s style guide (spelling, hyphenation, units/spacing, symbols, pH formatting, figure/table references, etc.).", "reviewer_3": "This manuscript presents a novel single-fiber logic and memory device based on a passivation–corrosion mechanism, enabling reconfigurable logic and memory functionalities without relying on conventional rigid heterojunction structures. The device presents good flexibility, stretchability (up to 50%), and compatibility with textile weaving processes. The concept of the device is interesting. However, the following questions need to be answered:\n1. It is recommended to supplement the device-to-device variation and environmental durability (such as temperature/humidity and long-term stability).\n2. In high-density arrays, can logic voltages inadvertently alter the state of adjacent deivces? How can interference between logic and memory be prevented?\n3. In Figures 3I and 3K, the logic gate circuits (OR and AND) are demonstrated under 50% strain. The performance variation after cyclic stretching should be investigated.\n4. As a typical all-textile device, its washability, breathability, and biocompatibility should be further characterized.\n5. Since the textile devices are worn on the human body, how about dynamic body movements, such as twisting or pressure, affecting their performance? Moreover, beyond its electrical properties under static stretching, the performance changes of the device under dynamic strain conditions should be further investigated.\n6. In Figure 4, considering the wearable merit of the memristor array, the corresponding portable control/acquisition circuit should be designed, such as the microcontroller for multi-channel signal acquisition rather than AWG and voltage source."}, "author_response": "We are sincerely grateful to the reviewers for their time and valuable comments on our manuscript “In-fibre logic and memory via tunable passivation–corrosion” (NCOMMS-25-69485-T). The manuscript has been carefully revised in light of the reviewers’ comments and suggestions. All the changes in the manuscript and supporting information made in this revision are highlighted in yellow in the “Revised Manuscript” and “Revised Supporting Information”, respectively. A detailed point by point response to the comments and suggestions of the reviewers is provided below.\n[... full rebuttal text omitted for brevity as per instructions to include verbatim text ...]"}, {"round": 2, "reviewer_comments": {"reviewer_1": "The authors have provided detailed responses to my five previous comments, which I largely find satisfactory. However, I still have one question that I would like the authors to address.\nWith respect to the response to Comment 5, the authors have demonstrated the scalability of spray-coating hydrogels onto textiles. However, my original concern that this approach “greatly limits practical applications” was not answered. From a wearable-textile perspective, a fabric that is covered with a wet hydrogel layer would be difficult to use in practice, as it would significantly compromise wearing comfort (see Fig. S23F). In addition, during long-term wear, dehydration of the hydrogel is likely to affect the overall device stability. If large-area encapsulation using silicone were applied, similar to the single-fibre devices, the breathability of the textile may be lost. This appears to represent a fundamental contradiction that has not yet been adequately addressed.", "reviewer_3": "The revised manuscript has adequately addressed the previous comments, and it is now recommended for publication as is."}, "author_response": "We are sincerely grateful to the editor and the reviewers for their time and valuable comments on our manuscript “In-fibre logic and memory via tunable passivation–corrosion” (NCOMMS-25-69485A). The manuscript has been carefully revised in light of the reviewers’ comments and suggestions. All the changes in the manuscript and supporting information made in this revision are highlighted in red in the “Revised Manuscript” and “Revised Supporting Information”, respectively. A detailed point by point response to the comments and suggestions of the reviewers is provided below.\n[... full rebuttal text omitted for brevity ...]"}]

Decision letter