1 Carrier cycles through 4 Colonies = 1 Bit State | 10kHz Operation
Colony Visualization
Colony 0
↑
↑
↑
↑
↓
↓
↓
↓
C
Colony 1
↑
↑
↑
↑
↓
↓
↓
↓
Colony 2
↑
↑
↑
↑
↓
↓
↓
↓
Colony 3
↑
↑
↑
↑
↓
↓
↓
↓
Up Spin (4)
Down Spin (4)
Carrier (1)
Controls & Stats
Clock Ticks
0
D Counter
0
OUT Pulse
0
Current Colony
-
Downloads
README.md
### 1/4x4=1 State Machine
## Overview
The 1/4×4=1 state machine models a fundamental unit of state using electron colonies. The core principle: 1 carrier electron cycles through 4 colonies to represent 1 bit of state information.
## Core Logic: 1/4×4=1
```
1 carrier ÷ 4 colonies × 4 colonies = 1 complete state cycle
```
Breaking it down:
- **1/4**: One carrier electron distributed across 4 colonies
- **×4**: Carrier visits all 4 colonies sequentially
- **=1**: After 4 ticks, one complete state cycle (D increments)
Each colony contains 9 total electrons:
- 4 up-spin electrons (static)
- 4 down-spin electrons (static)
- 1 carrier electron (dynamic - hops between colonies)
## Physics Mapping
| Component | Physical Meaning |
|-----------|------------------|
| Colony | Localized electron group, 9 electrons total |
| Up/Down Electrons | Spin-aligned particles, fixed position |
| Carrier | Mobile electron that defines active state |
| D Counter | Counts complete cycles = stable bit states |
| OUT Pulse | Emitted when D increments = observable state change |
## Operation at 10kHz
1. **Clock Tick**: Every 100μs (10kHz), carrier hops to next colony
2. **Colony Sequence**: 0 → 1 → 2 → 3 → 0 → 1 → 2 → 3 → ...
3. **D Increment**: D++ each time carrier returns to Colony 0
4. **OUT Pulse**: OUT=1 for one tick when D increments
## Mathematical Properties
```
Ticks per D increment = 4
Frequency of D = Clock / 4 = 10kHz / 4 = 2.5kHz
Bit rate = 2.5kbps per carrier
```
The 1/4 factor accounts for the carrier spending 1/4 of time in each colony. Multiplying by 4 colonies recovers unity: each full rotation = 1 bit.
## C Implementation Details
### Colony Struct
```c
typedef struct {
uint8_t up_electrons; // Always 4
uint8_t down_electrons; // Always 4
uint8_t has_carrier; // 0 or 1
uint8_t colony_id; // 0-3
} Colony;
```
### Tick Function
```c
void tick() {
colonies[current].has_carrier = 0;
current = (current + 1) % 4;
colonies[current].has_carrier = 1;
tick_count++;
if (current == 0) {
d_counter++;
out_pulse = 1;
}
}
```
### Main Loop
```c
while (1) {
usleep(100); // 100us = 10kHz
tick();
}
```
## Compilation & Execution
```bash
gcc -o 1over4x4 1over4x4.c -Wall -O2
./1over4x4
```
Expected output shows carrier cycling through colonies with D incrementing every 4 ticks.
## Applications
This architecture models:
- Quantum dot cellular automata (QCA)
- Single-electron transistor logic
- Charge-coupled state machines
- Fundamental clocked logic gates
The 1/4×4=1 principle ensures conservation: 1 carrier is never created/destroyed, only relocated. After 4 relocations, system returns to ground state with D incremented.
## Timing Diagram
```
Clock: ____|ˉ|____|ˉ|____|ˉ|____|ˉ|____|ˉ|____
Col 0: [C] . . . [C] . .
Col 1: . [C] . . . [C] .
Col 2: . . [C] . . . [C]
Col 3: . . . [C] . . .
D: 0_______________1_______________2____
OUT: ________________|ˉ|_______________|ˉ|__
```
## License
Public domain. Use for education, research, hardware design.