Built for a university course. Kept around because it's actually useful.
In my first year at the University of Biskra, I took a course called Structure Machine — number systems, binary arithmetic, Boolean logic, logic gates. The theory is well-documented. Working through it on paper at 2am is not fun.
So I built a tool that does the tedious parts automatically. Structure Machine converts numbers across bases in real time, visualizes every bit in a register, and simplifies Boolean expressions down to their minimal form.
It's not a polished commercial product. It's a CS student solving his own problems and deciding to share the result.
| Feature | Description |
|---|---|
| Base Conversion | Type in any base — DEC, BIN, OCT, or HEX — and the other three update instantly |
| Signed Numbers | See the same value encoded three ways: SVA, 1's complement (Ca1), 2's complement (Ca2) |
| Bit Visualizer | Every bit rendered individually, sign bit highlighted, overflow flagged when the number doesn't fit |
| Feature | Description |
|---|---|
| Truth Table Generator | Enter any Boolean expression using AND / OR / NOT — get the full truth table with all intermediate columns |
| Logic Simplification | Groups minterms by Gray Code ordering and extracts prime implicants — same as a Karnaugh map, but instant |
git clone https://github.com/your-username/structure-machine.git
cd structure-machine
npm install
npm run serveOpen http://localhost:8080.
Requirements: Node.js ≥ 14, npm or yarn.
src/
├── assets/
│ ├── images/
│ │ ├── computer-chip.png
│ │ ├── computer-chip2size.png
│ │ └── logo.png
│ └── main.css
│
├── components/
│ ├── ItemComponent.vue
│ └── NavbarComponent.vue
│
├── plugins/
│ └── vuetify.js
│
├── router/
│ └── index.js
│
├── utils/
│ ├── base.js # Number base conversion utilities
│ ├── truthTable.js # Expression parser + truth table engine
│ └── simplificationFunction.js # Karnaugh-style logic simplification
│
├── views/
│ ├── about.vue
│ ├── home.vue
│ ├── numberConverter.vue
│ ├── truthTable.vue
│ ├── functionSimplification.vue
│ └── functionLogigramme.vue
│
├── App.vue
└── main.js
User input like A AND (B OR NOT C) is tokenized and converted to postfix notation using the Shunting Yard algorithm. The postfix form is then evaluated row by row to fill the truth table.
The engine reads the truth table output, identifies which rows produce a 1 (minterms), groups them using Gray Code ordering to find adjacencies, and extracts the minimal set of prime implicants — the same reduction you'd do by hand on a Karnaugh map.
Akram Zaitout — CS student, University of Biskra, Algeria.
MIT. Use it, fork it, improve it.