{"id":46996609,"url":"https://github.com/robonxt/web-kmap","last_synced_at":"2026-03-11T15:23:25.458Z","repository":{"id":263203847,"uuid":"889659848","full_name":"robonxt/web-kmap","owner":"robonxt","description":"lightweight Kmap solver webapp","archived":false,"fork":false,"pushed_at":"2025-12-21T06:46:36.000Z","size":8573,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-23T01:04:30.867Z","etag":null,"topics":["kmap","kmap-solver","webapp"],"latest_commit_sha":null,"homepage":"https://kmap.robonxt.xyz","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robonxt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-16T22:13:14.000Z","updated_at":"2025-12-21T06:46:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd09b336-b877-4eed-8714-dc563fd76426","html_url":"https://github.com/robonxt/web-kmap","commit_stats":null,"previous_names":["robonxt/web-kmap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/robonxt/web-kmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robonxt%2Fweb-kmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robonxt%2Fweb-kmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robonxt%2Fweb-kmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robonxt%2Fweb-kmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robonxt","download_url":"https://codeload.github.com/robonxt/web-kmap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robonxt%2Fweb-kmap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30385717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T14:10:17.325Z","status":"ssl_error","status_checked_at":"2026-03-11T14:09:37.934Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kmap","kmap-solver","webapp"],"created_at":"2026-03-11T15:23:24.599Z","updated_at":"2026-03-11T15:23:25.449Z","avatar_url":"https://github.com/robonxt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web K-Map Solver\nA lightweight, dependency-free Karnaugh map solver for 2–4 variables. Instantly visualize, edit, and minimize Boolean functions with color-coded groups, real-time solutions, and a modern, mobile-friendly UI.\n\n\u003e For a quick start, see the in-app info popup. This document is the complete reference.\n\n\n## What is a Karnaugh Map?\nA Karnaugh map (K-map) is a graphical method for Boolean function simplification that reduces the need for extensive computation. Developed by Maurice Karnaugh in 1953, it uses adjacent squares in a grid to represent Boolean variables arranged in Gray code order, where adjacent cells differ by only one bit. By identifying and grouping adjacent 1's in powers of 2, K-maps allow quick identification of the minimal Boolean expression in sum-of-products (SOP) form.\n\n\n## Features\n\n### Core Functionality\n- Interactive K-map grid with 2-4 variable support\n- Real-time Boolean expression minimization\n- Multiple solution display when available\n- Don't care (X) condition support\n- Synchronized truth table view\n- Progressive Web App (PWA) support for offline use\n\n### Visualization\n- Color-coded term grouping\n- Dynamic SVG group visualization\n- Wraparound group highlighting\n- Gray code and binary layout options\n- Light/Dark theme support\n\n### User Interface\n- Intuitive cell state cycling (0 → 1 → X)\n- Binary and decimal index display\n- Tab-based view switching (K-Map / Truth Table)\n- Mobile-responsive design\n- PWA installation support for app-like experience\n- One-click operations:\n  - Set all cells to 1 or 0 (Clear)\n  - Copy solution with proper notation\n  - Toggle between K-map and Truth Table views\n  - Toggle between Gray code and binary layouts\n  - Toggle between light and dark themes\n  - Toggle zero value visibility in cells (hide/show zeros)\n\n\n## Usage Guide\n1. **Variable Selection**\n   - Choose 2-4 variables from the dropdown\n   - Grid automatically adjusts to selected size\n   - Variables are labeled A, B, C, D from most to least significant\n\n2. **Cell Manipulation**\n   - Click cells to cycle states: 0 → 1 → X\n      \u003e A blank cell (ㅤ) is also 0\n   - Use quick actions to set all cells or clear\n   - Use the \"Hide Zeros\" button to toggle whether zeros are shown or hidden in the grid and truth table\n   - Watch real-time solution updates\n\n3. **Solution Reading**\n   - Results shown in minimal SOP form\n   - Overlined variables (A̅) represent negation\n   - Multiple solutions shown when available\n   - Click copy button for formatted output\n\n4. **Layout Options**\n   - Toggle between Gray code and binary layouts\n   - Gray code optimizes for adjacency\n   - Binary shows traditional ordering\n\n\n## Technical Details\n- Built with vanilla HTML5, CSS3, and JavaScript\n- Uses [robonxt design system](https://github.com/robonxt/robonxt-visual-branding-guidelines) via Git submodule\n  - Consistent design tokens (colors, typography, spacing, motion)\n  - Reusable component implementations\n  - Light/dark theme support\n- Progressive Web App (PWA) capabilities:\n  - Offline functionality with service worker caching\n  - Installable on desktop and mobile devices\n  - App-like experience\n- Custom implementation of:\n  - Quine-McCluskey algorithm for Boolean minimization\n  - Gray code generation and handling\n  - Prime implicant identification\n  - Group visualization with SVG paths\n- Real-time synchronization between K-map and Truth Table\n- Vector-based UI elements for crisp display\n- Responsive layout with CSS Grid and Flexbox\n- Mobile-first design principles\n\n\n## Implementation Notes\nThe solver follows this process:\n1. Generates optimal Gray code layouts for 2-4 variables\n2. Identifies all possible prime implicant groups\n3. Finds minimal solutions using Quine-McCluskey algorithm\n4. Extracts Boolean expressions from group patterns\n5. Visualizes groups using dynamic SVG paths\n6. Presents results in minimal SOP format\n\n\n## Variable Notation\n- Regular letter (A): Variable is 1 (TRUE)\n- Overlined letter (A̅): Variable is 0 (FALSE)\n- Blank cell (ㅤ): Also represents 0 (FALSE)\n- Example: A̅BC̅D means A=0, B=1, C=0, D=1\n\n\n## Credits\nCreated by [robonxt](https://github.com/robonxt).\n\nAssisted by [Claude Sonnet 3.5](https://www.anthropic.com) in [Windsurf IDE](https://www.windsurf.ai/).\n\nLogic inspired by [obsfx/kmap-solver-lib](https://github.com/obsfx/kmap-solver-lib)\n\nIcon generated by [Perchance](https://perchance.org/ai-icon-generator)\n\n\n## TODO:\n- Try to get it working on browsers as old as Chrome 104+, Safari 12+. [Compare working features here](https://caniuse.com/?compare=chrome+104,safari+12\u0026compareCats=CSS,HTML5,JS,JS%20API,Other,Security,SVG)\n- ~~Get PWA working with a install button on mobile devices for a fullscreen, sandboxed webapp.~~\n- Build working circuit diagram tab.\n- ~~Toggle visibility of zero values in cells~~\n- Modularize kmap-interface.js (IN PROGRESS)\n- Fix K-map wraparound visualization for better edge and corner handling\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobonxt%2Fweb-kmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobonxt%2Fweb-kmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobonxt%2Fweb-kmap/lists"}