Product of sums maxterm calculator
A canonical product of sums is the direct Boolean expression for the rows where a truth table outputs zero.
Run — free
Enter the number of input variables and those zero-row indices, and this calculator converts every index into its binary assignment, writes the corresponding maxterm, and multiplies the sum terms into one canonical POS expression. The result also includes compact product-of-maxterms notation, ordered indices, variable names, and a term-by-term breakdown that is ready to check or copy into combinational logic work.
Turn zero rows into canonical maxterms
Canonical POS starts with the truth-table rows for which the Boolean function equals zero. Number the rows in ordinary binary order, with the first variable as the most significant bit, and submit those row numbers as the maxterm list. For each selected row, the calculator pads the binary representation to the declared variable count and constructs one sum containing every variable exactly once. A zero bit produces the variable without complementation; a one bit produces the complemented variable, shown with an apostrophe. This polarity is chosen because the resulting sum must evaluate to zero on that specific assignment. For example, binary 101 for variables A, B, and C becomes (A' + B + C'). The calculator sorts the submitted indices before building the result, so an unordered input still produces the conventional ascending maxterm order. Duplicate indices are rejected because a canonical maxterm list represents a set of truth-table rows, and repeating a factor adds no logical information. The term breakdown keeps the source index, padded binary row, literals, and completed parenthesized sum together for straightforward verification.
Read and verify the product of sums result
The main expression places all generated maxterms next to one another, which denotes Boolean multiplication: each parenthesized OR term is combined by AND. The accompanying notation uses ΠM followed by the sorted zero-row indices, the compact form commonly used in logic courses, specifications, Karnaugh-map exercises, and digital design documentation. Verification is mechanical. Select any listed index, assign its binary bits to the variables, and inspect the matching sum term. Every literal in that term becomes zero, making the term zero and therefore forcing the full product to zero. For a row not in the list, no maxterm is designed to vanish on that complete assignment, so every included sum remains one and the product evaluates to one. This confirms that the expression represents exactly the supplied zero set. The output retains variable ordering because changing that order changes the numeric interpretation of every truth-table row. When custom names are supplied, they must be unique, valid identifiers, and equal in count to the declared variables. Otherwise, predictable default names are generated automatically for a copy-ready result.
Use canonical POS in a logic design workflow
Canonical product of sums is an exact representation, not necessarily the smallest circuit. It is especially useful as a dependable bridge between a truth table and later optimization. Start by confirming the zero rows, generate the POS expression, and use the detailed terms to catch index, bit-order, or complement mistakes before simplifying. You can then group zeros on a Karnaugh map, apply Boolean algebra, or feed the expression into a separate minimization process. Keeping the canonical form beside the minimized form gives reviewers a traceable reference for proving that optimization did not alter the function. The method also helps when implementing active-low behavior, checking decoder-based designs, or documenting test vectors, because each maxterm points directly to one failing or disabled input assignment. Inputs are bounded to sixteen variables and indices must fit the corresponding truth-table range, preventing ambiguous truncation or silently ignored high bits. Computation is deterministic and local to the request: it uses no network, stored state, random values, or clock. Browser use is free, while automated API execution costs $0.002 per request.
What you can do with it
Convert a truth table to POS
Turn the rows where an output is zero into a complete canonical product of sums without manually reversing literal polarity.
Check Karnaugh-map preparation
Confirm the maxterms and their binary assignments before grouping zeros and minimizing a logic function.
Document combinational logic
Include both ΠM notation and an expanded, traceable expression in design notes, coursework, or verification records.
FAQ
What is a maxterm?
A maxterm is an OR term containing every input variable once. It evaluates to zero for exactly one truth-table assignment.
Why does a zero bit produce an uncomplemented variable?
In a maxterm, every literal must be zero on its indexed row. An uncomplemented variable is zero when its assigned bit is zero, while a complemented variable is zero when its bit is one.
Which variable corresponds to the most significant bit?
The first variable in the output order corresponds to the most significant bit. Custom variable names follow the same order.
Does this calculator minimize the POS expression?
No. It builds the exact canonical POS containing one maxterm for every supplied zero row. Minimization is a separate step.
Can I submit maxterms in any order?
Yes. Valid indices are sorted into ascending canonical order. Duplicate indices are rejected rather than silently discarded.
What does it cost?
It runs free in your browser. Each API request costs $0.002.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/elec/pos-maxterms \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"variables":3,"maxterms":[0,2,5,7]}'const res = await fetch("https://api.kit.forhosting.com/elec/pos-maxterms", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"variables": 3,
"maxterms": [
0,
2,
5,
7
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/elec/pos-maxterms",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"variables": 3,
"maxterms": [
0,
2,
5,
7
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/elec/pos-maxterms", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"variables":3,"maxterms":[0,2,5,7]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"variables":3,"maxterms":[0,2,5,7]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/elec/pos-maxterms", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"variables": 3,
"maxterms": [
0,
2,
5,
7
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "elec.pos_maxterms",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_items | 65536 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |