# chubrik/logicarrows architecture

> Architecture diagram of the GitHub repository chubrik/logicarrows, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chubrik/logicarrows
- Repository: https://github.com/chubrik/logicarrows

## Overview

Logic Arrows is a curated collection of browser-playable logic maps, especially two documented computer designs and their programs. The user-facing path is to open a map in the Logic Arrows browser and run it; the repository also includes a .NET emulator whose sample entry point loads a program into RAM, pins its display, and runs the CPU. The README documents assemblers, program galleries, and additional standalone maps, but those map internals are not present in the sampled source. Emulator edges reflect excerpts and SOURCE INDEX references.

Main entry points: [`ComputerEmulator/Program.cs`](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/Program.cs) (Emulator Entry), [`ComputerEmulator/MyByte.cs`](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/MyByte.cs) (Byte Type), [`computer-v1`](https://github.com/chubrik/logicarrows/tree/main/computer-v1) (Computer Maps), [`ComputerEmulator/V1/Ram.cs`](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V1/Ram.cs) (V1 RAM)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Map Collection"]
  node_computer_maps["Computer Maps"]
  node_other_maps["Other Maps"]
end

subgraph group_computer["Computer Designs"]
  node_v1_docs["V1 Documentation"]
  node_v1_programs["V1 Programs"]
  node_v2_docs["V2 Documentation"]
  node_v2_programs["V2 Programs"]
end

subgraph group_emulator["Emulator Runtime"]
  node_emulator_entry["Emulator Entry<br/>[Program.cs]"]
  node_v1_cpu["V1 CPU<br/>[Cpu.cs]"]
  node_v1_ram[("V1 RAM<br/>[Ram.cs]")]
  node_v1_spacefight["V1 Space Fight<br/>[SpaceFight.cs]"]
  node_v2_cpu["V2 CPU<br/>[Cpu.cs]"]
  node_v2_ram[("V2 RAM<br/>[Ram.cs]")]
  node_v2_life["V2 Game of Life<br/>[GameOfLife.cs]"]
  node_v2_spacefight["V2 Space Fight<br/>[SpaceFight.cs]"]
end

subgraph group_primitives["Runtime Primitives"]
  node_byte_type["Byte Type<br/>[MyByte.cs]"]
end

node_player(("Map User"))
node_browser(("Logic Arrows Browser"))
node_console(("Console Display"))

node_player -->|"opens maps"| node_browser
node_browser -->|"opens and runs"| node_computer_maps
node_computer_maps -->|"documents"| node_v1_docs
node_computer_maps -->|"documents"| node_v2_docs
node_computer_maps -->|"includes programs"| node_v1_programs
node_computer_maps -->|"includes programs"| node_v2_programs
node_browser -->|"opens and runs"| node_other_maps
node_emulator_entry -->|"creates and pins"| node_v2_ram
node_emulator_entry -->|"loads bytes from"| node_v2_life
node_emulator_entry -->|"creates and runs"| node_v2_cpu
node_emulator_entry -->|"can load"| node_v1_spacefight
node_emulator_entry -->|"can create and pin"| node_v1_ram
node_emulator_entry -->|"can create and run"| node_v1_cpu
node_v1_cpu -->|"reads and writes"| node_v1_ram
node_v2_cpu -->|"reads and writes"| node_v2_ram
node_v1_ram -->|"stores bytes"| node_byte_type
node_v2_ram -->|"stores bytes"| node_byte_type
node_v1_cpu -->|"computes with"| node_byte_type
node_v2_cpu -->|"computes with"| node_byte_type
node_v2_life -->|"provides byte list"| node_byte_type
node_v1_spacefight -->|"provides byte list"| node_byte_type
node_v2_spacefight -->|"provides byte list"| node_byte_type
node_v1_ram -->|"updates display pin"| node_console
node_v2_ram -->|"updates display pin"| node_console

click node_computer_maps "https://github.com/chubrik/logicarrows/tree/main/computer-v1"
click node_v1_docs "https://github.com/chubrik/logicarrows/tree/main/computer-v1"
click node_v1_programs "https://github.com/chubrik/logicarrows/tree/main/computer-v1/asm"
click node_v2_docs "https://github.com/chubrik/logicarrows/tree/main/computer-v2"
click node_v2_programs "https://github.com/chubrik/logicarrows/tree/main/computer-v2/asm"
click node_other_maps "https://github.com/chubrik/logicarrows/tree/main/img"
click node_emulator_entry "https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/Program.cs"
click node_v1_cpu "https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V1/Cpu.cs"
click node_v1_ram "https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V1/Ram.cs"
click node_v1_spacefight "https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V1/SpaceFight.cs"
click node_v2_cpu "https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V2/Cpu.cs"
click node_v2_ram "https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V2/Ram.cs"
click node_v2_life "https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V2/GameOfLife.cs"
click node_v2_spacefight "https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V2/SpaceFight.cs"
click node_byte_type "https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/MyByte.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_computer_maps,node_other_maps,node_player,node_browser toneBlue
class node_v1_docs,node_v1_programs,node_v2_docs,node_v2_programs toneAmber
class node_emulator_entry,node_v1_cpu,node_v1_ram,node_v1_spacefight,node_v2_cpu,node_v2_ram,node_v2_life,node_v2_spacefight toneMint
class node_byte_type toneRose
class node_console toneIndigo
```

## Components

### Map Collection

- [Computer Maps](https://github.com/chubrik/logicarrows/tree/main/computer-v1): `computer-v1`
- [Other Maps](https://github.com/chubrik/logicarrows/tree/main/img): `img`

### Computer Designs

- [V1 Documentation](https://github.com/chubrik/logicarrows/tree/main/computer-v1): `computer-v1`
- [V1 Programs](https://github.com/chubrik/logicarrows/tree/main/computer-v1/asm): `computer-v1/asm`
- [V2 Documentation](https://github.com/chubrik/logicarrows/tree/main/computer-v2): `computer-v2`
- [V2 Programs](https://github.com/chubrik/logicarrows/tree/main/computer-v2/asm): `computer-v2/asm`

### Emulator Runtime

- [Emulator Entry](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/Program.cs): `ComputerEmulator/Program.cs`
- [V1 CPU](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V1/Cpu.cs): `ComputerEmulator/V1/Cpu.cs`
- [V1 RAM](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V1/Ram.cs): `ComputerEmulator/V1/Ram.cs`
- [V1 Space Fight](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V1/SpaceFight.cs): `ComputerEmulator/V1/SpaceFight.cs`
- [V2 CPU](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V2/Cpu.cs): `ComputerEmulator/V2/Cpu.cs`
- [V2 RAM](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V2/Ram.cs): `ComputerEmulator/V2/Ram.cs`
- [V2 Game of Life](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V2/GameOfLife.cs): `ComputerEmulator/V2/GameOfLife.cs`
- [V2 Space Fight](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/V2/SpaceFight.cs): `ComputerEmulator/V2/SpaceFight.cs`

### Runtime Primitives

- [Byte Type](https://github.com/chubrik/logicarrows/blob/main/ComputerEmulator/MyByte.cs): `ComputerEmulator/MyByte.cs`

### Other components

- **Map User**
- **Logic Arrows Browser**
- **Console Display**

## Connections

- Map User → Logic Arrows Browser: opens maps (evidence: `README.md`)
- Logic Arrows Browser → Computer Maps: opens and runs (evidence: `README.md`)
- Computer Maps → V1 Documentation: documents (evidence: `README.md`)
- Computer Maps → V2 Documentation: documents (evidence: `README.md`)
- Computer Maps → V1 Programs: includes programs (evidence: `README.md`)
- Computer Maps → V2 Programs: includes programs (evidence: `README.md`)
- Logic Arrows Browser → Other Maps: opens and runs (evidence: `README.md`)
- Emulator Entry → V2 RAM: creates and pins (evidence: `ComputerEmulator/Program.cs`)
- Emulator Entry → V2 Game of Life: loads bytes from (evidence: `ComputerEmulator/Program.cs`)
- Emulator Entry → V2 CPU: creates and runs (evidence: `ComputerEmulator/Program.cs`)
- Emulator Entry → V1 Space Fight: can load (evidence: `ComputerEmulator/Program.cs`)
- Emulator Entry → V1 RAM: can create and pin (evidence: `ComputerEmulator/Program.cs`)
- Emulator Entry → V1 CPU: can create and run (evidence: `ComputerEmulator/Program.cs`)
- V1 CPU → V1 RAM: reads and writes (evidence: `ComputerEmulator/V1/Cpu.cs`)
- V2 CPU → V2 RAM: reads and writes (evidence: `ComputerEmulator/V2/Cpu.cs`)
- V1 RAM → Byte Type: stores bytes (evidence: `ComputerEmulator/V1/Ram.cs`)
- V2 RAM → Byte Type: stores bytes (evidence: `ComputerEmulator/V2/Ram.cs`)
- V1 CPU → Byte Type: computes with (evidence: `ComputerEmulator/V1/Cpu.cs`)
- V2 CPU → Byte Type: computes with (evidence: `ComputerEmulator/V2/Cpu.cs`)
- V2 Game of Life → Byte Type: provides byte list (evidence: `ComputerEmulator/V2/GameOfLife.cs`)
- V1 Space Fight → Byte Type: provides byte list (evidence: `ComputerEmulator/V1/SpaceFight.cs`)
- V2 Space Fight → Byte Type: provides byte list (evidence: `ComputerEmulator/V2/SpaceFight.cs`)
- V1 RAM → Console Display: updates display pin (evidence: `ComputerEmulator/V1/Ram.cs`)
- V2 RAM → Console Display: updates display pin (evidence: `ComputerEmulator/V2/Ram.cs`)
