{"openapi":"3.1.0","info":{"title":"Truth Table API","version":"1.0.0","description":"Evaluate boolean-logic expressions and generate complete truth tables. The table endpoint takes a boolean expression, finds its variables, builds every row of the truth table (the first variable is the most-significant bit, the standard convention), and returns each row's values and result, the list of minterms (the row indices where the expression is true), a classification of tautology / contradiction / contingency, and a canonical sum-of-products (SOP) form. The evaluate endpoint computes the expression's value for one specific assignment of its variables. It understands the full set of operators in both symbol and word form — NOT (!, ~, ¬), AND (&, &&, ∧, *, ., AND), OR (|, ||, ∨, +, OR), XOR (^, ⊕), NAND, NOR, XNOR, implication (->, =>, →, IMPLIES) and the biconditional (<->, <=>, ↔, IFF) — with the usual precedence (NOT > AND > XOR > OR > IMPLIES > IFF), parentheses, and the constants 0/1 and true/false. Everything is computed locally and deterministically, so it is instant and private. Ideal for digital-logic and discrete-math teaching, hardware and HDL design, simplifying conditions in code, SAT-style sanity checks, and interview prep. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This evaluates boolean logic and builds truth tables; for arithmetic and equations use a math API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/truthtable-api","description":"oanor gateway"}],"tags":[{"name":"Logic"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/evaluate":{"get":{"operationId":"get_v1_evaluate","tags":["Logic"],"summary":"Evaluate under an assignment","description":"","parameters":[{"name":"expression","in":"query","required":true,"description":"The boolean expression","schema":{"type":"string"},"example":"P -> Q"},{"name":"assign","in":"query","required":false,"description":"Assignment, e.g. P=1,Q=0","schema":{"type":"string"},"example":"P=1,Q=0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"result":0,"boolean":false,"variables":["P","Q"],"assignment":{"P":1,"Q":0},"expression":"P -> Q"},"meta":{"timestamp":"2026-06-03T17:42:16.804Z","request_id":"6717889c-64f4-4564-973a-0fb905d0c791"},"status":"ok","message":"Evaluate","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/table":{"get":{"operationId":"get_v1_table","tags":["Logic"],"summary":"Build a full truth table","description":"","parameters":[{"name":"expression","in":"query","required":true,"description":"The boolean expression","schema":{"type":"string"},"example":"A AND (B OR !C)"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"rows":[{"index":0,"result":0,"values":{"A":0,"B":0,"C":0}},{"index":1,"result":0,"values":{"A":0,"B":0,"C":1}},{"index":2,"result":0,"values":{"A":0,"B":1,"C":0}},{"index":3,"result":0,"values":{"A":0,"B":1,"C":1}},{"index":4,"result":1,"values":{"A":1,"B":0,"C":0}},{"index":5,"result":0,"values":{"A":1,"B":0,"C":1}},{"index":6,"result":1,"values":{"A":1,"B":1,"C":0}},{"index":7,"result":1,"values":{"A":1,"B":1,"C":1}}],"minterms":[4,6,7],"row_count":8,"variables":["A","B","C"],"expression":"A AND (B OR !C)","true_count":3,"canonical_sop":"(A AND !B AND !C) OR (A AND B AND !C) OR (A AND B AND C)","classification":"contingency"},"meta":{"timestamp":"2026-06-03T17:42:16.917Z","request_id":"0c434d69-5152-4422-bbf6-c2211dd45ae4"},"status":"ok","message":"Truth table","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Truth Table API","notes":"Up to 12 variables (4096 rows) for the table. Precedence: NOT > AND > XOR > OR > IMPLIES > IFF; IMPLIES is right-associative. NOT is prefix only. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/table","params":{"expression":"the boolean expression, e.g. A AND (B OR !C)"},"returns":"variables, every row, minterms, classification and canonical SOP"},{"path":"/v1/evaluate","params":{"assign":"the assignment, e.g. A=1,B=0,C=1","expression":"the boolean expression"},"returns":"the boolean result for that assignment"},{"path":"/v1/meta","params":[],"returns":"this document"}],"operators":{"or":"| || ∨ + OR","and":"& && ∧ * . AND","not":"! ~ ¬ NOT","xor":"^ ⊕ XOR","other":"NAND NOR XNOR, -> => → IMPLIES, <-> <=> ↔ IFF","constants":"0 1 true false"},"description":"Evaluate boolean-logic expressions and generate complete truth tables. The table endpoint takes a boolean expression, finds its variables, builds every row of the truth table (first variable is the most-significant bit, the standard convention), and returns each row's values and result, the list of minterms (the row indices where the expression is true), a classification of tautology / contradiction / contingency, and a canonical sum-of-products (SOP) form. The evaluate endpoint computes the expression's value for one specific assignment of its variables. It understands the full set of operators in both symbol and word form — NOT (!, ~, ¬), AND (&, &&, ∧, *, ., AND), OR (|, ||, ∨, +, OR), XOR (^, ⊕), NAND, NOR, XNOR, implication (->, =>, →, IMPLIES) and biconditional (<->, <=>, ↔, IFF) — with the usual precedence (NOT > AND > XOR > OR > IMPLIES > IFF), parentheses, and the constants 0/1 and true/false. Everything is computed locally and deterministically, so it is instant and private. Ideal for digital-logic and discrete-math teaching, hardware and HDL design, simplifying conditions in code, SAT-style sanity checks, and interview prep. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This evaluates boolean logic and truth tables; for arithmetic use a math API."},"meta":{"timestamp":"2026-06-03T17:42:16.983Z","request_id":"dd904c7b-be2a-48f5-a404-3c3949606604"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":5635,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":715,"monthly_call_quota":15150,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2705,"monthly_call_quota":202500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6505,"monthly_call_quota":1055000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/truthtable-api"}