Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install hiyenwong-ai-collection-collection-skills-cmos-invertible-logic-stochastic-computinggit clone https://github.com/hiyenwong/ai_collection.gitcp ai_collection/SKILL.MD ~/.claude/skills/hiyenwong-ai-collection-collection-skills-cmos-invertible-logic-stochastic-computing/SKILL.md---
name: cmos-invertible-logic-stochastic-computing
description: "CMOS invertible logic using spiking stochastic computing methodology. Implements bidirectional (forward/reverse) logic gates via Boltzmann machines with simple spiking neural networks. Activation: invertible logic, stochastic computing, CMOS neuromorphic, Boltzmann machine, factorization hardware, spiking logic gate."
---
# Efficient CMOS Invertible Logic Using Stochastic Computing
> Spiking neural network-based invertible logic gates implemented in minimal CMOS hardware, enabling both forward computation and reverse inference (e.g., factorization) via stochastic computing principles.
## Metadata
- **Source**: arXiv:2603.27030
- **Authors**: Sean C. Smithson, Naoya Onizawa, Brett H. Meyer, Warren J. Gross, Takahiro Hanyu
- **Published**: 2026-03-27
- **Categories**: cs.AR
## Core Methodology
### Key Innovation
Invertible logic operates in two modes: (1) forward mode producing correct output from inputs, and (2) reverse mode where output is fixed and inputs converge to consistent values. This paper implements invertible logic using simple spiking neural networks based on stochastic computing, rather than traditional Boltzmann machine configurations.
### Technical Framework
1. **Invertible Stochastic Gates**: Design methodology for basic logic gates (AND, OR, XOR) with bidirectional capability using stochastic bit streams
2. **Stochastic Spiking Circuits**: Neuron-inspired circuits that propagate probabilistic signals through CMOS
3. **Composable Architecture**: Gates extend to construct invertible adder and multiplier circuits
4. **ASIC Fabrication**: Physical chip measurement results validating invertible multiplier operation
### Implementation Guide
#### Prerequisites
- CMOS design tools (Cadence/Synopsys)
- Stochastic computing basics
- Understanding of Boltzmann machines
#### Step-by-Step
1. Design stochastic bit stream encoders for input/output
2. Implement invertible stochastic gate primitives using spiking neurons
3. Compose gates into arithmetic circuits (adder, multiplier)
4. Verify forward mode: input → correct output
5. Verify reverse mode: output → consistent inputs (e.g., factorization)
6. Synthesize to ASIC for physical validation
### Code Example
```python
# Conceptual stochastic invertible AND gate
import numpy as np
def stochastic_and_forward(a_stream, b_stream):
"""Forward mode: AND gate via stochastic multiplication"""
return np.bitwise_and(a_stream, b_stream)
def stochastic_and_reverse(y_stream, n_samples=1000):
"""Reverse mode: find inputs consistent with output"""
# Use Boltzmann-like sampling to find (a,b) such that a AND b = y
results = []
for _ in range(n_samples):
a = np.random.randint(0, 2)
b = np.random.randint(0, 2)
if (a & b) == y_stream:
results.append((a, b))
return results
```
## Applications
- **Hardware Factorization**: Solving factorization problems via reverse-mode logic
- **Combinatorial Optimization**: Energy-efficient hardware solvers
- **Neuromorphic Computing**: Bridge between spiking networks and digital logic
- **Reversible Computing**: Low-power bidirectional computation
## Pitfalls
- Stochastic computing requires long bit streams for precision
- Convergence time in reverse mode depends on problem complexity
- ASIC area overhead vs. conventional logic gates
- Noise sensitivity in stochastic representations
## Related Skills
- spiking-neural-network-training
- neuromorphic-low-power-ai
- snn-neuromorphic-fpga