Skip to content

Commit d3b5cc9

Browse files
added readme
1 parent 9cf9127 commit d3b5cc9

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Boolean Algebra Visualizer
2+
3+
[![Live Demo](https://img.shields.io/badge/demo-online-green.svg)](https://DeanKuruzovich.github.io/BooleanAlgebraVisualizer/)
4+
5+
A powerful tool to visualize, analyze, and simplify boolean expressions. This visualizer provides real-time generation of logic circuits, CMOS layouts, truth tables, and Karnaugh maps.
6+
7+
## Features
8+
9+
### 🧠 Advanced Parsing
10+
The visualizer uses a robust recursive descent parser that supports a wide variety of input formats:
11+
- **Operators**: `+` (OR), `*` (AND), `!` (NOT), `^` (XOR).
12+
- **Universal Gates**: NAND, NOR, XNOR.
13+
- **Keywords**: Supports text-based operators like `AND`, `OR`, `NOT`, `NAND`, etc.
14+
- **Symbols**: Familiar programming symbols like `&`, `|`, and `~`.
15+
- **Shorthand**: Supports implicit AND (e.g., `AB`) and postfix NOT (e.g., `A'`).
16+
17+
### 📊 Visualizations
18+
- **Logic Gate Diagrams**: Dynamic SVG generation with proportional spacing for clear, readable schematics.
19+
- **CMOS Circuits**: Visualizes Complementary Metal-Oxide-Semiconductor layouts, detailing:
20+
- **Pull-Up Network (PUN)**: PMOS transistor arrangement.
21+
- **Pull-Down Network (PDN)**: NMOS transistor arrangement.
22+
- **Truth Tables**: Precise evaluation of all variable combinations.
23+
- **Karnaugh Maps (K-Maps)**: Interactive maps supporting 2 to 8+ variables using standard Gray code ordering and nested grid layouts for higher dimensions.
24+
25+
### 📋 Clipboard & Export Tools
26+
- **Rich Text Copy**: Format tables directly for pasting into Google Docs or Microsoft Word with styles preserved.
27+
- **CSV Export**: Download truth tables and K-maps for spreadsheet analysis.
28+
- **LaTeX Export**: Generate LaTeX code for inclusion in academic papers or reports.
29+
30+
## Usage
31+
32+
Enter a boolean expression into the input field. The parser is flexible and accepts multiple formats.
33+
34+
### Examples
35+
| Logic | Input Example | Alternative |
36+
|-------|--------------:|-------------|
37+
| **AND** | `A * B` | `AB`, `A and B`, `A & B` |
38+
| **OR** | `A + B` | `A or B`, `A | B` |
39+
| **NOT** | `!A` | `A'`, `~A`, `not A` |
40+
| **NAND** | `A nand B` | `A ↑ B` |
41+
| **NOR** | `A nor B` | `A ↓ B` |
42+
| **XOR** | `A ^ B` | `A xor B` |
43+
| **Complex** | `(A+B)*C` | `(!A B) + (C ^ D)` |
44+
45+
## Development
46+
47+
To set up the project locally for development:
48+
49+
1. **Install Dependencies**
50+
```bash
51+
npm install
52+
```
53+
54+
2. **Run Locally**
55+
Start the local server (available at `http://localhost:3000` by default):
56+
```bash
57+
npm start
58+
```
59+
60+
3. **Deploy**
61+
Build and deploy to GitHub Pages:
62+
```bash
63+
npm run deploy
64+
```
65+
66+
## Tech Stack
67+
68+
- **Core**: Vanilla JavaScript (ES6+)
69+
- **Graphics**: SVG (Scalable Vector Graphics)
70+
- **Styling**: CSS3, CSS Grid/Flexbox
71+
- **Server**: Node.js (Express) for local serving

0 commit comments

Comments
 (0)