🗺️ Karnaugh Map Optimiser — Click the Cells, Get the Logic

Paint 1s and don't-cares onto a two, three or four-variable K-map and it finds the prime implicants for real — no eyeballing wraps — returning a minimal sum-of-products or product-of-sums with every loop colour-coded back onto the grid. The same Quine–McCluskey machinery a synthesis tool runs, sized for homework.

Setup

Click grid cells to toggle 0 → 1 → X.
Truth table & how each loop was drawn

Cells wrap around: the leftmost and rightmost columns of each row are neighbours, and so are the top and bottom rows — that's what makes the 4-corners group legal. X cells may be borrowed by any loop but never need covering.