{
  "capability_id": "electrical.digital.logic_gate",
  "tool_id": "logic-gate",
  "engine": "logic-gate",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-16T22:03:43.745Z",
  "engine_build": "2026-09-10",
  "test_count": 7,
  "passed": 7,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 2,
      "passed": 2
    },
    "boundary": {
      "total": 3,
      "passed": 3
    },
    "property": {
      "total": 2,
      "passed": 2
    }
  },
  "engine_tested": true,
  "expert_reviewed": true,
  "internally_reviewed": false,
  "review_kind": "expert",
  "source_checked": true,
  "reviewed_by": "CalculatorX electrical review",
  "reviewer_role": "electrical-engineer",
  "last_reviewed": "2026-08-08",
  "expert_review": {
    "status": "approved",
    "reviewer": {
      "name": "CalculatorX electrical review",
      "role": "electrical-engineer"
    },
    "reviewed_at": "2026-08-08",
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "kind": "expert"
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/electric/logic-gate",
  "api": "https://www.calculatorx.com/api/v1/calc/logic-gate",
  "schema_input": "https://www.calculatorx.com/schemas/electrical.digital.logic_gate.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/electrical.digital.logic_gate.output.json",
  "assumptions": [],
  "limitations": [
    "Combinational Boolean only"
  ],
  "boundary_conditions": [
    "Bad mode → INVALID_MODE",
    "A/B not 0/1 → INVALID_NUMBER"
  ],
  "sources": [
    {
      "title": "Digital design — gate primitives",
      "section": "Truth tables",
      "supports": "AND/OR/NOT/XOR definitions",
      "kind": "reference"
    },
    {
      "title": "IEEE Std 1364 / digital logic practice",
      "section": "Boolean operators",
      "supports": "Combinatorial gate semantics",
      "kind": "standard"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:b12a69e93c06a92b53ac044e4c600f34b5917643856a3418bb1ae233adfb0e97",
  "tests": [
    {
      "id": "xor",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "xor",
        "A": 1,
        "B": 0
      },
      "expect": {
        "Y": 1
      },
      "expectWarning": null,
      "actual": {
        "mode": "xor",
        "A": 1,
        "B": 0,
        "Y": 1
      },
      "tol": 0
    },
    {
      "id": "and",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "and",
        "A": 1,
        "B": 1
      },
      "expect": {
        "Y": 1
      },
      "expectWarning": null,
      "actual": {
        "mode": "and",
        "A": 1,
        "B": 1,
        "Y": 1
      },
      "tol": 0
    },
    {
      "id": "bad-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "foo",
        "A": 1,
        "B": 0
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be and|or|not|nand|nor|xor|xnor"
    },
    {
      "id": "bad-bit",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "and",
        "A": 2,
        "B": 0
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "A must be 0 or 1"
    },
    {
      "id": "boundary-logic-bad",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "xor",
        "A": 2,
        "B": 0
      },
      "expectError": "INVALID_NUMBER",
      "code": "INVALID_NUMBER",
      "error": "A must be 0 or 1"
    },
    {
      "id": "property-xor",
      "ok": true,
      "kind": "property",
      "detail": "1",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-not",
      "ok": true,
      "kind": "property",
      "detail": "0",
      "expect": 0,
      "actual": 0
    }
  ],
  "tier": "expert_verified",
  "verification": {
    "tests": {
      "passed": 7,
      "total": 7,
      "golden": 2,
      "boundary": 3,
      "property": 2
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-06T13:16:40.891Z",
  "rendered_at": "2026-09-16T22:03:43.745Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.0",
    "artifacts": {
      "engine": "1.0.0",
      "page": "1.0.0",
      "capability": "1.0.0",
      "evidence": "1.0.0",
      "input_schema": "1.0.0",
      "output_schema": "1.0.0",
      "mcp_contract": "1.0.0"
    },
    "digests": {
      "input_schema_sha256": "c94eecbac04975e5ab6dfd28fb6f2c11bb23322bd4deb29e46d713b86170c783",
      "output_schema_sha256": "ee9481ed53e7aa646c9cc972dffe03917724bda4af624228c354f1b98d8c91bf",
      "evidence_sha256": "7e593f8f7951d7cfdd38629be93e7a24400792ca4866ef3163022740a207bc2e",
      "evidence_core_sha256": "7e593f8f7951d7cfdd38629be93e7a24400792ca4866ef3163022740a207bc2e",
      "capability_sha256": "c7e20ca33fb4acc4108e0fc3e818bc1ca38dcb67c38796e87143d8a3d8d7239b",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.0"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
