API & MCP

Everything a person can do on Ohmforge Logic Minimiser (multi-output, Petrick, K-map groups), a program or AI agent can do with the same inputs and get the identical result.

HTTP API

  • POST https://ohmforgelogicminimizer.usefulweb.site/api/v1/calculate – run Ohmforge Logic Minimiser (multi-output, Petrick, K-map groups)
  • GET https://ohmforgelogicminimizer.usefulweb.site/api/v1/tool – inputs, output schema, examples
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

Ohmforge Logic Minimiser (multi-output, Petrick, K-map groups)

Paste a truth table with up to 6 inputs and 8 outputs (rows with - for "either value", x for don't care) or a list of equations. For each output you get every minimum sum of products or product of sums (Quine–McCluskey primes and Petrick's method), the Karnaugh map with the chosen groups drawn in, the prime implicant chart, a two-level gate schematic, a Verilog module and a simulator netlist that is simulated and compared with the table. Compare mode checks whether two Boolean expressions are equivalent and lists counterexamples.

Inputs of Ohmforge Logic Minimiser (multi-output, Petrick, K-map groups)
FieldTypeDefaultDescription
modeselect (table, equations, compare)"table"Input
tabletextarea"# name: BCD to 7-segment (a, b, c)\nB3 B2 B1 B0 | a b c\n0 0 0 0 | 1 1 1\n0 0 0Truth table. Header "A B C | F G" (inputs | outputs), then one row per line: "0 1 1 | 1 0" (spaces optional). - in the inputs covers 0 and 1; x or - in the outputs is a don't care. Up to 6 inputs (a letter with an optional number) and 8 outputs. # starts a comment.
unlistedselect (0, x)"0"Rows not listed
equationstextarea—Equations. For "Equations": one per line, e.g. "S = A xor B xor C" and "Co = AB + AC + BC". Same operators as the truth-table tool (' or ! NOT, · & or nothing AND, + | OR, ^ XOR).
formselect (sop, pos)"sop"Minimal form
checktextarea—Check against (optional). Your own solution per output, e.g. "a = B3 + B1 + B2B0 + B2'B0'": each is compared with the table (don't-care rows ignored) and mismatching rows are listed.
lefttext—Expression 1. For "Compare two expressions", up to 16 variables.
righttext—Expression 2

Example request

BCD to 7-segment (a, b, c) with don't cares

curl -X POST https://ohmforgelogicminimizer.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"table","table":"# name: BCD to 7-segment (a, b, c)\nB3 B2 B1 B0 | a b c\n0 0 0 0 | 1 1 1\n0 0 0 1 | 0 1 1\n0 0 1 0 | 1 1 0\n0 0 1 1 | 1 1 1\n0 1 0 0 | 0 1 1\n0 1 0 1 | 1 0 1\n0 1 1 0 | 1 0 1\n0 1 1 1 | 1 1 1\n1 0 0 0 | 1 1 1\n1 0 0 1 | 1 1 1\n1 0 1 - | x x x\n1 1 - - | x x x\n"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

  • Streamable HTTP endpoint: https://ohmforgelogicminimizer.usefulweb.site/mcp – protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake).
  • Tools: ohmforge_logic_minimizer
  • Local stdio connector: node src/mcp-stdio.ts --tool=ohmforge-logic-minimizer
{
  "mcpServers": {
    "ohmforge-logic-minimizer": { "type": "http", "url": "https://ohmforgelogicminimizer.usefulweb.site/mcp" }
  }
}