# Data storage ## Microsim ### Live player <div class="microsim-player"> <iframe src="https://editor.p5js.org/sciencenibber/full/a-4QoLHEL" width="100%" height="620" frameborder="0" sandbox="allow-scripts allow-same-origin"></iframe> </div> <div class="microsim-fallback"> <img src="Microsims/thumbs/Data_storage.png" alt="Data_storage microsim poster" style="width:100%;border:1px solid #4445;border-radius:6px;"> <p><em>Live microsim (desktop) · <a href="https://editor.p5js.org/sciencenibber/sketches/a-4QoLHEL">open sketch in the p5.js editor</a></em></p> </div> **Editor URL:** https://editor.p5js.org/sciencenibber/sketches/a-4QoLHEL **Description (100 words):** A storage medium is a grid of physical cells. Each cell holds one symbol from an alphabet of L = 2^b levels, so it stores b bits; the real flash [[Hierarchy|hierarchy]] SLC, MLC, TLC, QLC is exactly b = 1, 2, 3, 4. Slider C grows the medium (more cells, higher areal [[Density|density]]); slider b packs more bits into every cell. The two readouts diverge on purpose: capacity = C*b bits grows linearly, but the number of distinguishable states = 2^(C*b) grows exponentially, so it is reported as a base-10 logarithm. The cell colors show one stable sample of stored data. ```js // ===================================================================== // Article : Data storage // Slug : Data_storage // Wikitube : en.wikitube.io/wiki/Data_storage // Room : Information // // Idea : A storage medium is a grid of physical cells. Each cell // holds one symbol drawn from an alphabet of L = 2^b levels, // so it stores b bits. C cells therefore store C*b bits, and // the medium as a whole can represent 2^(C*b) distinct // states. Slider C grows the medium (areal density); slider // b packs more bits into every cell — the real-world jump // from SLC -> MLC -> TLC -> QLC flash. Watch capacity (linear // in C and b) and representable states (exponential in C*b) // diverge. // // Equation : capacity = C * b bits (linear) // states = 2^(C*b) (exponential) // a single cell with b bits stores one of L = 2^b levels. // ===================================================================== // Rule §3 — single source of truth for title line, URL, save name. const ARTICLE = "Data_storage"; // Rule §4 — quiet the Friendly Error System for ship. p5.disableFriendlyErrors = true; // ---------- controls ---------- let cSlider; // C : number of physical cells in the medium let bSlider; // b : bits stored per cell (SLC=1, MLC=2, TLC=3, QLC=4) // ---------- layout constants (computed in setup) ---------- let GRID_LEFT, GRID_TOP, GRID_W, GRID_H; const COLS = 16; // fixed column count; rows grow with C // Flash-cell terminology keyed by bits-per-cell. const CELL_NAMES = ["", "SLC", "MLC", "TLC", "QLC"]; function setup() { // Rule §5 — canvas inside setup, standard size, 2x density. createCanvas(720, 520); pixelDensity(2); // Grid region: a band across the upper-middle of the canvas. GRID_LEFT = 24; GRID_TOP = 70; GRID_W = width - 48; GRID_H = 300; // Rule §6 — controls built in setup, positioned explicitly. // C ranges 1..256: one cell up to a 16x16 medium. cSlider = createSlider(1, 256, 64, 1); cSlider.position(150, height - 64); cSlider.style("width", "240px"); // b ranges 1..4: SLC, MLC, TLC, QLC — the real flash hierarchy. bSlider = createSlider(1, 4, 1, 1); bSlider.position(150, height - 34); bSlider.style("width", "240px"); } function draw() { background(248); // ---------- read controls ---------- const C = cSlider.value(); // cells const b = bSlider.value(); // bits per cell const L = Math.pow(2, b); // levels per cell = 2^b const totalBits = C * b; // capacity in bits (linear) const totalBytes = totalBits / 8; // capacity in bytes // states = 2^(C*b) overflows a double fast, so track its base-10 log. const log10States = totalBits * Math.log10(2); // ---------- draw the storage medium (rule §8 layers 1 + 2) ---------- const rows = Math.ceil(C / COLS); // Cell size fits the grid region in whichever dimension binds first. const cw = GRID_W / COLS; const ch = Math.min(cw, GRID_H / Math.max(rows, 1)); const cell = Math.max(2, Math.min(cw, ch)); for (let i = 0; i < C; i++) { const gcol = i % COLS; const grow = Math.floor(i / COLS); const x = GRID_LEFT + gcol * cell; const y = GRID_TOP + grow * cell; // Each cell stores a stable pseudo-random level in 0..L-1. const level = storedLevel(i, L); // Map the level onto a blue ramp: empty (white) -> full (deep blue). const t = (L === 1) ? level : level / (L - 1); fill(lerp(252, 30, t), lerp(252, 90, t), lerp(255, 200, t)); stroke(210); strokeWeight(1); rect(x, y, cell - 1, cell - 1); } // Frame the active region of the medium (reference geometry). noFill(); stroke(180); strokeWeight(1); rect(GRID_LEFT - 2, GRID_TOP - 2, COLS * cell + 4, Math.max(rows, 1) * cell + 4); // ---------- HUD watermark (rule §2) ---------- noStroke(); textFont("system-ui"); // §2a — top-left title block. fill(20); textSize(20); textAlign(LEFT, TOP); text("Data storage", 16, 14); textSize(12); fill(110); text("Wikitube microsim - en.wikitube.io/wiki/" + ARTICLE, 16, 40); // §2b — top-right control hints. textAlign(RIGHT, TOP); textSize(11); fill(110); text("slider C: cells in the medium", width - 16, 14); text("slider b: bits per cell (SLC->MLC->TLC->QLC)", width - 16, 30); // §2c — bottom-left live readouts (canonical symbols). textAlign(LEFT, BOTTOM); textSize(13); fill(20); text("C = " + C + " cells b = " + b + " bit/cell (" + CELL_NAMES[b] + ")" + " L = " + L + " levels", 16, height - 96); text("capacity = " + totalBits + " bits = " + formatBytes(totalBytes), 16, height - 78); text("states = 2^" + totalBits + " ~ 10^" + log10States.toFixed(1), 16, height - 60); // Slider labels (rule §7) — to the LEFT of each slider, right-aligned. textAlign(RIGHT, CENTER); textSize(12); fill(60); text("C (cells)", 142, height - 64 + 8); text("b (bits/cell)", 142, height - 34 + 8); // §2d — bottom-right equation footer (ASCII only — see pitfalls.md). textAlign(RIGHT, BOTTOM); textSize(11); fill(80); text("capacity = C*b bits -> states = 2^(C*b)", width - 16, height - 8); } // ---------- helpers (rule §10) ---------- // Deterministic pseudo-random level in 0..L-1 for cell index i. // Stable across frames so the medium does not flicker while sliding. function storedLevel(i, L) { // A small integer hash (xorshift-flavoured) keyed on the cell index. let h = (i + 1) * 2654435761; h ^= h >>> 15; h = (h * 2246822519) >>> 0; h ^= h >>> 13; return h % L; } // Human-readable byte count using binary (IEC) prefixes. function formatBytes(bytes) { const units = ["B", "KiB", "MiB", "GiB", "TiB", "PiB"]; let v = bytes; let u = 0; while (v >= 1024 && u < units.length - 1) { v /= 1024; u++; } // One decimal once we leave raw bytes; whole numbers stay clean. const shown = (u === 0) ? v.toFixed(v % 1 === 0 ? 0 : 3) : v.toFixed(2); return shown + " " + units[u]; } ``` ## Links (Wikipedia order) <!-- injected from _registry/childlinks/Data_storage.json (2026-07-30T02:09:12Z) --> `1T-SRAM` · `3D_XPoint` · `3D_optical_data_storage` · `5D_optical_data_storage` · `8.3_filename` · `8_mm_video_format` · `Alation` · `Alias_(Mac_OS)` · `Amate` · `Amdahl's_law` · `Analog_recording` · `Archival_science` · `Atmosphere` · `Backup` · `Bamboo_and_wooden_slips` · `Bank_switching` · `Barcode` · `Betamax` · `Big_data` · `Binary_file` · `Birch_bark` · `Birch_bark_manuscript` · `Block-level_storage` · `Block_(data_storage)` · `Blu-ray` · `Blu-ray_Disc_recordable` · `Book` · `Boot_sector` · `Borassus` · `Bubble_memory` · `Business_intelligence` · `CD-R` · `CD-ROM` · `CD-RW` · `CD-i` · `CD_Video` · `CFexpress` · `CPU_cache` · `Cache_(computing)` · `Cache_coherence` · `Cassette_tape` · `Chief_data_officer` · `Clay_tablet` · `Close_(system_call)` · `Cloud_computing` · `Cloud_storage` · `Clustered_file_system` · `Codex` · `CompactFlash` · `Compact_Disc_Digital_Audio` · `Compact_disc` · `Comparison_of_file_managers` · `Comparison_of_memory_cards` · `Computational_RAM` · `Computer_data_storage` · `Computer_file` · `Computer_memory` · `Computing` · `Content-addressable_memory` · `Content_format` · `Continuous_availability` · `Controlled_vocabulary` · `Copy_protection` · `Core_dump` · `Core_rope_memory` · `Corypha_umbraculifera` · `Crayon` · `Cyperus_papyrus` · `D-VHS` · `DDR_SDRAM` · `DNA` · `DNA_digital_data_storage` · `DVD` · `DVD+R_DL` · `DVD-RAM` · `DVD-R_DL` · `DVD-Video` · `DVD_card` · `DVD_recordable` · `DV_(video_format)` · `Dark_data` · `Data` · `DataPlay` · `Data_acquisition` · `Data_analysis` · `Data_annotation` · `Data_anonymization` · `Data_archaeology` · `Data_as_a_service` · `Data_augmentation` · `Data_broker` · `Data_cleansing` · `Data_collection` · `Data_communication` · [[Data_compression]] · `Data_cooperative` · `Data_corruption` · `Data_curation` · `Data_deduplication` · `Data_degradation` · `Data_domain` · `Data_ecosystem` · `Data_editing` · [[Data_engineering]] · `Data_erasure` · `Data_exhaust` · `Data_exploration` · `Data_extraction` · `Data_farming` · `Data_file` · `Data_format_management` · `Data_fusion` · `Data_governance` · `Data_hierarchy` · `Data_infrastructure` · `Data_integration` · `Data_integrity` · `Data_lineage` · `Data_loading` · `Data_localization` · `Data_loss` · `Data_management` · `Data_mesh` · `Data_migration` · `Data_minimization` · `Data_mining` · `Data_model` · `Data_philanthropy` · `Data_preparation` · `Data_preservation` · `Data_processing` · `Data_product` · `Data_publishing` · `Data_quality` · `Data_re-identification` · `Data_recovery` · `Data_reduction` · `Data_redundancy` · `Data_remanence` · `Data_rescue` · `Data_retention` · `Data_science` · `Data_scraping` · `Data_scrubbing` · `Data_security` · `Data_sharing` · `Data_steward` · `Data_store` · `Data_structure` · `Data_synchronization` · `Data_type` · `Data_validation` · `Data_validation_and_reconciliation` · `Data_warehouse` · `Data_wrangling` · `Database` · `Dekatron` · `Delay-line_memory` · `Dew_computing` · `Digital_Data_Storage` · `Digital_Linear_Tape` · `Digital_dark_age` · `Digital_preservation` · `Digital_rights_management` · `Digital_twin` · `Diode_matrix` · `Direct-attached_storage` · `Directory_(computing)` · `Directory_structure` · `Disaggregated_storage` · `Disk_aggregation` · `Disk_array` · `Disk_image` · `Disk_mirroring` · `Disk_pack` · `Disk_partitioning` · `Disk_storage` · `Distributed_block_storage` · `Distributed_data_store` · `Distributed_database` · `Distributed_file_system_for_cloud` · `Document` · `Drum_memory` · `Dual-ported_RAM` · `Dynamic_random-access_memory` · `EDRAM` · `EEPROM` · `EPROM` · `Edge-notched_card` · `Edge_computing` · `Electrochemical_RAM` · `Electronic_document` · `Electronic_media` · `Electronic_paper` · `Electronic_quantum_holography` · `Electronic_visual_display` · [[Energy]] · `Epigraphy` · `Experian` · `ExpressCard` · `Extended_file_attributes` · `External_storage` · `Extract,_load,_transform` · `Extract,_transform,_load` · `Fe_FET` · `Ferroelectric_RAM` · `Ficus_aurea` · `File-system_permissions` · `File_attribute` · `File_comparison` · `File_copying` · `File_deletion` · `File_descriptor` · `File_format` · `File_manager` · `File_sharing` · `File_size` · `File_synchronization` · `File_system` · `File_system_fragmentation` · `File_transfer` · `File_verification` · `Filename` · `Filename_extension` · `Filename_mangling` · `Filesystem_Hierarchy_Standard` · `Flash_Core_Module` · `Flash_memory` · [[Flip-flop_(electronics)]] · `Floating-gate_MOSFET` · `Floppy_disk` · `Floptical` · `Fog_computing` · `Format_war` · `Fuzzy_bit` · `GD-ROM` · `GDDR_SDRAM` · `GUID_Partition_Table` · `Gas` · `Geoglyph` · `George_Washington_University` · `Grid_computing` · `Grid_file_system` · `HD_DVD` · `Handwriting` · `Hard_disk_drive` · `Hard_link` · `Hemp_paper` · `Hex_dump` · `Hi-MD` · `Hidden_file_and_hidden_directory` · `High_Bandwidth_Memory` · `History_of_writing` · `Holographic_Versatile_Disc` · `Holographic_data_storage` · `Hu_(ritual_baton)` · `Hyper_CD-ROM` · `IBM` · `IBM_FlashSystem` · `IOPS` · `In-memory_database` · `In-memory_processing` · `Index_card` · `Informatica` · [[Information]] · `Information_Age` · `Information_privacy` · `Information_professional` · `Information_quality` · `Information_repository` · `Information_transfer` · `Ink` · `Intaglio_(printmaking)` · `International_Data_Corporation` · `JEIDA_memory_card` · `Knowledge_base` · `LPDDR` · `LaserDisc` · `Laser_turntable` · `Library` · `Linear_Tape-Open` · `List_of_file_formats` · `List_of_file_signatures` · `List_of_writing_systems` · `Lists_of_filename_extensions` · `Locality_of_reference` · `Logical_disk` · `Long_filename` · `MD_Data` · `Magic_number_(programming)` · `Magnetic-core_memory` · `Magnetic-tape_data_storage` · `Magnetic_ink_character_recognition` · `Magnetic_storage` · `Magnetic_tape` · `Magneto-optic_Kerr_effect` · `Magneto-optical_drive` · `Magnetoresistive_RAM` · `Manuscript` · `Mark_Kryder` · `Marketing_information_system` · `Mass_storage` · `Master_boot_record` · `Master_data` · `Master_data_management` · `Mawangdui_Silk_Texts` · `Mellon_optical_memory` · `Memistor` · `Memory-mapped_file` · `Memory_Stick` · `Memory_access_pattern` · `Memory_card` · `Memory_card_reader` · `Memory_cell_(computing)` · `Memory_coherence` · `Memory_hierarchy` · `Memory_map` · `Memory_paging` · `Memory_refresh` · `Memory_segmentation` · `Memristor` · `Metadata` · `MicroMV` · `MicroP2` · `Microdrive` · `Microform` · `Millipede_memory` · `MiniDVD` · `MiniDisc` · `Mini_CD` · `Miniature_Card` · `Moore's_law` · `MultiMediaCard` · `NCR_CRAM` · `NTFS_links` · `Nano-RAM` · `Nano_Memory` · `Nanodot` · `Nature_(journal)` · `Network-attached_storage` · `Nintendo_optical_discs` · `Non-RAID_drive_architectures` · `Non-volatile_memory` · `Non-volatile_random-access_memory` · `Notebook` · `Object_file` · `Object_storage` · `Ola_leaf` · `Open_(system_call)` · `Open_data` · `Open_file_format` · `Optical_disc` · `Optical_mark_recognition` · `Optical_storage` · `Optical_tape` · `Oracle_Corporation` · `Oracle_bone` · `P2_(storage_media)` · `PC_Card` · `Palimpsest` · `Palm-leaf_manuscript` · `Paper` · `Paper_data_storage` · `Paper_mulberry` · `Papyrus` · `Parchment` · `Path_(computing)` · `Patterned_media` · `Persistence_(computer_science)` · `Persistent_data_structure` · `Personal_computer` · `Petroglyph` · `Phase-change_memory` · `Phonograph_cylinder` · `Phonograph_record` · `Photographic_film` · `Plant-based_digital_data_storage` · `Plated-wire_memory` · `Plugboard` · `Professional_Disc` · `Programmable_ROM` · `Programmable_metallization_cell` · `Proprietary_file_format` · `Punched_card` · `Punched_tape` · `Qlik` · `Quadruplex_videotape` · `Quantum_memory` · `RAID` · `RDRAM` · `RNA` · `ROM_cartridge` · `Racetrack_memory` · `Random-access_memory` · `Random_access` · `Read-only_memory` · `Read_(system_call)` · `Recording_format` · `Reel-to-reel_audio_tape_recording` · `Reference_data` · `Relief` · `Removable_media` · `Replication_(computing)` · `Resistive_random-access_memory` · `S-VHS` · `SAP` · `SAS_Institute` · `SD_card` · `SIM_card` · `SONOS` · [[Science_(journal)]] · `Scratchpad_memory` · `Scroll` · `Selectron_tube` · `Semantic_file_system` · `Semiconductor_memory` · `Shadow_(OS/2)` · `Shared_resource` · `Shortcut_(computing)` · `Sidecar_file` · `Sign` · `Single-instance_storage` · `Skywriting` · `Slate_(writing)` · `SmartMedia` · `Smoke` · `Smoke_signal` · `Software-defined_storage` · `Software_rot` · `Solid-state_drive` · `Solid-state_storage` · `Sparse_file` · `Stamping_(metalworking)` · `Static_random-access_memory` · `Storage_area_network` · `Storage_record` · `Storage_virtualization` · `Streblus_asper` · `Super_Video_CD` · `SxS` · `Symbolic_link` · `Synchronous_dynamic_random-access_memory` · `System_file` · `T-RAM` · `Tape_drive` · `Tape_library` · `Temporary_file` · `Temporary_folder` · `Text_file` · `Textile_printing` · `Thin-film_memory` · `Time_crystal` · `Topological_data_analysis` · `Transaction_data` · `Twistor_memory` · `U-matic` · `USB_flash_drive` · `UltraRAM` · `Ultra_Density_Optical` · `Ultra_HD_Blu-ray` · `Universal_Flash_Storage` · `Universal_Media_Disc` · `Universal_memory` · `University_of_California,_Berkeley` · `Unstructured_data` · `VHS` · `VHS-C` · `Value_of_information` · `Vellum` · `Video_CD` · `Videotape` · `Virtual_memory` · `Vision_Electronic_Recording_Apparatus` · `Visual_arts` · `Volatile_memory` · `Volatile_organic_compound` · `Volume_(computing)` · `Volume_boot_record` · `Walter_Gilbert` · `Wax_tablet` · `Williams_tube` · `Wire_recording` · `Write_(system_call)` · `Write_once_read_many` · `Writing` · `Writing_material` · `Writing_system` · `XD-Picture_Card` · `XDR_DRAM` · `XQD_card` · `Z-RAM` · `Zero-byte_file` ## From the Real GENERATIVE library ![Data storage](https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/EdisonPhonograph.jpg/220px-EdisonPhonograph.jpg) *Data storage — placed from the Real G.E.N.E.R.A.T.I.V.E. course library (Information room). Source: Wikimedia Commons (via Wikipedia article media). [Details & license](https://commons.wikimedia.org/wiki/File:EdisonPhonograph.jpg).* > Data storage is the recording (storing) of information (data) in a storage medium. Handwriting, phonographic recording, magnetic tape, and optical discs are all examples of storage media. ([Wikipedia](https://en.wikipedia.org/wiki/Data_storage)) <!-- REAL-GENERATIVE-MEDIA:END --> <!-- LOCAL-MEDIA-PASS:START --> ## From the vault media library !Data storage thumb.png *Data Storage — from the vault's own media holdings, placed 2026-07-09. MTN / Wikitube.io original · CC BY-SA 4.0.* <!-- LOCAL-MEDIA-PASS:END --> > **Room:** [[Information]] · **Status:** ✅ shipped ## Overview Data storage is the recording (storing) of information (data) in a storage medium. Handwriting, phonographic recording, magnetic tape, and optical discs are all examples of storage media. Biological molecules such as RNA and DNA are considered by some as data storage.12 Recording may be accomplished with virtually any form of [[Energy|energy]]. Electronic data storage requires electrical power to store and retrieve data. _(Overview is shorter than 200 words; the pipeline should expand it from textbook context before publishing.)_ ## See also - Room hub: [[Information]] - p5.js Editor conventions: P5 JS EDITOR - Wiki root: MAIN --- *Scaffolded by `generative-microsim` from row 2 of the Information sheet on 2026-06-02T17:39:14Z.* <!-- REAL-GENERATIVE-MEDIA:START --> <!-- CRAFT-LINK:START g12 --> *Built to the [[WT!P5_js_Microsim_Master_Class|p5.js Master Class]].* <!-- CRAFT-LINK:END --> ## Wikipedia : Wikitube **Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Data_storage) : [Wikitube](https://en.wikitube.io/wiki/Data_storage) ## Previous hub tags Tree parent: [[Information_theory]]. Legacy hubs: `GENERATIVE`. --- *Sources: 1 legacy note. Minted wave 1, 2026-07-30 (v1.6 order).*