Skip to main content

XNOR Gate Ontology

Boolean Logic
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 17 September 2026
Audio Overview
FLOW_ALGEBRA XNORGateOntology v1.0

TARGET_URL := "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/boolean-logic/xnor-gate-ontology.html"
LANGUAGE := "en-GB"
DOMAIN := MathematicalOntologies > MathematicalLogicOntologies > BooleanLogic > XNORGateOntology

BEGIN_FLOW

ENTITY XNORGate {
    TYPE := LogicGate
    LOGICAL_ROLE := ExclusiveNOR
    MIN_ARITY := 2
    INPUT_DOMAIN := {0,1} ≡ {FALSE,TRUE}
    OUTPUT_DOMAIN := {0,1} ≡ {FALSE,TRUE}
    DEFINITION := "A logic gate implementing the complement of XOR. For two inputs its output is true exactly when the inputs are equal; for an n-input complemented-parity interpretation its output is true when an even number of inputs are true."
}

RELATIONSHIP XNORGate --is_a--> LogicGate
RELATIONSHIP XNORGate --implements--> ExclusiveNORFunction
RELATIONSHIP XNORGate --implements--> BooleanFunction
RELATIONSHIP XNORGate --corresponds_to--> XNOROperator
RELATIONSHIP XNORGate --is_complement_of--> XORGate
RELATIONSHIP XNORGate --can_be_represented_by--> BooleanExpression
RELATIONSHIP XNORGate --can_be_specified_by--> TruthTable
RELATIONSHIP XNORGate --can_be_composed_into--> LogicCircuit
RELATIONSHIP XNORGate --computes_binary--> BooleanEquality

ENTITY XNOROperator {
    TYPE := BooleanOperator
    SYMBOLS := {"XNOR","⊙","↔"}
    NOTE := "Symbols vary by context; explicit XNOR naming avoids ambiguity."
}

BOOLEAN_FUNCTION {
    BINARY :=
        XNOR(x,y) := ¬(x ⊕ y)

    BINARY_EQUIVALENCE :=
        (x ∧ y) ∨ (¬x ∧ ¬y)

    NARY_COMPLEMENTED_PARITY :=
        XNOR(x1,...,xn) :=
            ¬(x1 ⊕ x2 ⊕ ... ⊕ xn)

    NARY_CONDITION :=
        OUTPUT=1 IFF count_true_inputs IS EVEN
}

BINARY_TRUTH_TABLE {
    (A=0,B=0) -> Y=1
    (A=0,B=1) -> Y=0
    (A=1,B=0) -> Y=0
    (A=1,B=1) -> Y=1
}

EVALUATE_XNOR(InputVector X) {
    REQUIRE length(X) >= 2
    REQUIRE FOR_ALL x IN X: x IN {0,1}

    true_count := SUM(X)

    IF true_count MOD 2 = 0
        RETURN 1
    ELSE
        RETURN 0
}

ALGEBRAIC_FORM_GF2 {
    XOR_VALUE :=
        (x1 + x2 + ... + xn) mod 2

    XNOR_VALUE :=
        1 XOR XOR_VALUE

    FOR binary:
        XNOR(x,y) = 1 + x + y mod 2
}

PROPOSITIONAL_LOGIC_MAPPING {
    INPUT_A := proposition_P
    INPUT_B := proposition_Q

    OUTPUT :=
        P ↔ Q

    FOR_BINARY_BOOLEAN_VALUES:
        P XNOR Q
        ≡
        P BICONDITIONAL Q

    SEMANTICS :=
        output is true exactly when P and Q have the same truth value
}

STANDARD_BOOLEAN_EXPANSION {
    A XNOR B ≡
        (A ∧ B) ∨
        (¬A ∧ ¬B)
}

ALTERNATIVE_EXPANSION {
    A XNOR B ≡
        (A ∨ ¬B) ∧
        (¬A ∨ B)
}

XOR_RELATIONSHIP {
    XNOR(A,B) :=
        NOT(XOR(A,B))

    XOR(A,B) :=
        NOT(XNOR(A,B))

    FOR binary_inputs:
        XOR -> inequality_test
        XNOR -> equality_test
}

BOOLEAN_IDENTITIES {
    XNOR(A,0) ≡ ¬A
    XNOR(A,1) ≡ A
    XNOR(A,A) ≡ 1
    XNOR(A,¬A) ≡ 0

    COMMUTATIVITY :=
        XNOR(A,B) ≡ XNOR(B,A)
}

BINARY_ASSOCIATIVITY_WARNING {
    XNOR as repeated binary equivalence MUST NOT be assumed associative.

    IN_GENERAL:
        XNOR(XNOR(A,B),C)
        may differ in interpretation from
        XNOR(A,XNOR(B,C))

    FOR nary_usage:
        explicitly define complemented-parity semantics.
}

COMPLEMENTED_PARITY_PROPERTIES {
    EVEN_NUMBER_OF_TRUE_INPUTS -> OUTPUT=1
    ODD_NUMBER_OF_TRUE_INPUTS -> OUTPUT=0
}

TRUTH_TABLE_GENERATION(Arity n) {
    REQUIRE n >= 2

    FOR_EACH X IN {0,1}^n {
        Y := EVALUATE_XNOR(X)
        EMIT ROW(X,Y)
    }

    TRUE_ROWS := 2^(n-1)
    FALSE_ROWS := 2^(n-1)
}

LOGICAL_PROPERTIES {
    COMMUTATIVE_BINARY := TRUE
    IDEMPOTENT_BINARY := FALSE
    MONOTONE := FALSE
    ZERO_PRESERVING := FALSE

    BINARY_ONE_PRESERVING := TRUE
    BINARY_EQUALITY_FUNCTION := TRUE

    AFFINE_OVER_GF2 :=
        TRUE under complemented-parity representation
}

CIRCUIT_SYMBOL_SEMANTICS {
    INPUT_PORTS := {A,B,...}
    OUTPUT_PORT := Y

    BINARY_EQUATION :=
        Y = ¬(A ⊕ B)
}

EXPRESSION_TRANSLATION {
    BooleanExpression:
        ¬(A ⊕ B)

    MAP_TO:
        XNORGate(
            input1=A,
            input2=B,
            output=Y
        )
}

REVERSE_TRANSLATION {
    XNORGate(A,B)->Y

    MAP_TO BooleanExpression:
        Y := ¬(A ⊕ B)
}

XOR_NOT_IMPLEMENTATION {
    T := XOR(A,B)

    XNOR(A,B) :=
        NOT(T)
}

AND_OR_NOT_IMPLEMENTATION {
    T1 := AND(A,B)
    T2 := AND(NOT(A),NOT(B))

    XNOR(A,B) :=
        OR(T1,T2)
}

NAND_ONLY_IMPLEMENTATION {
    T1 := NAND(A,B)
    T2 := NAND(A,T1)
    T3 := NAND(B,T1)
    XOR := NAND(T2,T3)

    XNOR(A,B) :=
        NAND(XOR,XOR)
}

NOR_ONLY_IMPLEMENTATION {
    T1 := NOR(A,B)
    T2 := NOR(A,T1)
    T3 := NOR(B,T1)

    XNOR(A,B) :=
        NOR(T2,T3)
}

BINARY_EQUALITY_DETECTOR {
    INPUTS := {A,B}
    OUTPUT := XNOR(A,B)

    OUTPUT=1 IFF A=B
}

RELATIONSHIP XNORGate --implements--> OneBitEqualityComparator

MULTIBIT_EQUALITY_COMPARATOR {
    GIVEN BooleanVectors
        A := (a1,...,an)
        B := (b1,...,bn)

    FOR_EACH i:
        ei := XNOR(ai,bi)

    EQUAL :=
        AND(e1,e2,...,en)

    RESULT:
        EQUAL=1 IFF A=B componentwise
}

RELATIONSHIP XNORGate --contributes_to--> MultiBitEqualityComparator

PARITY_CHECKING {
    INPUTS := x1,...,xn

    COMPLEMENTED_PARITY :=
        XNOR_n(x1,...,xn)

    INTERPRETATION :=
        1 when number_of_true_inputs is even
        under explicitly defined nary complemented-parity semantics
}

CONTROLLED_PRESERVATION {
    DATA := A
    CONTROL := C

    OUTPUT :=
        XNOR(A,C)

    IF C=1:
        OUTPUT=A

    IF C=0:
        OUTPUT=NOT(A)
}

GF2_RELATIONSHIP {
    XOR --corresponds_to--> AdditionModulo2

    XNOR_n :=
        1 ⊕ x1 ⊕ x2 ⊕ ... ⊕ xn

    INTERPRETATION :=
        affine Boolean function over GF(2)
}

ALGEBRAIC_NORMAL_FORM_ROLE {
    XNOR_n :=
        1 ⊕ x1 ⊕ x2 ⊕ ... ⊕ xn

    CONSTANT_TERM := 1
    VARIABLE_TERMS := x1,...,xn
}

EQUIVALENCE_TEST(Expression E, XNORNetwork N) {
    VARIABLES := union(inputs(E),inputs(N))

    FOR_ALL assignments A {
        yE := EVALUATE(E,A)
        yN := EVALUATE_NETWORK(N,A)

        IF yE != yN
            RETURN FALSE
    }

    RETURN TRUE
}

SIMPLIFICATION_RULES {
    XNOR(A,A) -> 1
    XNOR(A,NOT(A)) -> 0
    XNOR(A,1) -> A
    XNOR(A,0) -> NOT(A)

    NOT(XNOR(A,B)) -> XOR(A,B)
    NOT(XOR(A,B)) -> XNOR(A,B)
}

APPLICATION_RELATIONSHIPS {
    XNORGate --used_in--> EqualityComparison
    XNORGate --used_in--> DigitalComparators
    XNORGate --used_in--> ParityLogic
    XNORGate --used_in--> ErrorDetection
    XNORGate --used_in--> PatternMatching
    XNORGate --used_in--> BitwiseComparison
    XNORGate --used_in--> ControlLogic
    XNORGate --used_in--> BooleanEquivalenceTesting
}

ONTOLOGY_LINKS {
    PARENT := LogicGateOntology

    ANCESTORS := {
        BooleanLogicOntology,
        MathematicalLogicOntology,
        MathematicalOntology
    }

    RELATED := {
        XORGateOntology,
        ANDGateOntology,
        ORGateOntology,
        NOTGateOntology,
        NANDGateOntology,
        NORGateOntology,
        BooleanFunctionOntology,
        BooleanExpressionOntology,
        BooleanAlgebraOntology,
        TruthTableOntology,
        LogicalEquivalenceOntology,
        BiconditionalOntology
    }
}

SEMANTIC_EQUIVALENCE {
    XNORGate ≈ ExclusiveNORGate
    XNORGate ≈ EquivalenceGate
        WHEN arity=2
    XNOR(A,B) ≈ ¬(A ⊕ B)
    XNOR(A,B) ≈ (A ∧ B) ∨ (¬A ∧ ¬B)
    XNOR(A,B) ≈ BooleanEquality(A,B)
    XNOR(A,B) ≈ Biconditional(A,B)
        WHEN A,B denote propositions
    XNOR_n ≈ even_complemented_parity
        WHEN nary semantics are explicitly defined
    TRUE ≈ 1
    FALSE ≈ 0
}

CONSTRAINTS {
    C1 :=
        every abstract XNORGate input MUST belong_to {0,1}

    C2 :=
        XNORGate output MUST belong_to {0,1}

    C3 :=
        binary XNOR output MUST equal 1 exactly when its two inputs are equal

    C4 :=
        n-ary XNOR MUST state its complemented-parity convention explicitly

    C5 :=
        binary XNORGate MUST match the canonical four-row truth table

    C6 :=
        XNOR MUST remain the Boolean complement of XOR for the same defined arity semantics

    C7 :=
        repeated binary XNOR MUST NOT be treated as automatically associative

    C8 :=
        gate-network transformations MUST preserve complete Boolean semantics

    C9 :=
        abstract Boolean semantics MUST remain distinct from implementation-specific electronic behaviour
}

REASONING_CHAIN Query Q {
    IDENTIFY XNORGate concept
    IDENTIFY requested representation
    DETERMINE arity
    RESOLVE equivalence_gate_aliases
    RESOLVE input_values

    IF evaluation_requested
        THEN EVALUATE_XNOR

    IF truth_table_requested
        THEN TRUTH_TABLE_GENERATION

    IF binary_equality_requested
        THEN BINARY_EQUALITY_DETECTOR

    IF multibit_equality_requested
        THEN MULTIBIT_EQUALITY_COMPARATOR

    IF expression_requested
        THEN RETURN complemented_XOR_expression

    IF XOR_NOT_requested
        THEN APPLY XOR_NOT_IMPLEMENTATION

    IF AND_OR_NOT_requested
        THEN APPLY AND_OR_NOT_IMPLEMENTATION

    IF NAND_only_requested
        THEN APPLY NAND_ONLY_IMPLEMENTATION

    IF NOR_only_requested
        THEN APPLY NOR_ONLY_IMPLEMENTATION

    IF nary_parity_context
        THEN RESOLVE complemented_parity_semantics

    IF GF2_context
        THEN RESOLVE affine_GF2_semantics

    IF simplification_requested
        THEN APPLY SIMPLIFICATION_RULES

    IF equivalence_requested
        THEN EQUIVALENCE_TEST

    VALIDATE canonical_XNOR_semantics
    VALIDATE arity_convention
    RETURN result WITH derivation
}

CONFIDENCE {
    CANONICAL_BINARY_XNOR_DEFINITION := 1.00
    BINARY_TRUTH_TABLE := 1.00
    BINARY_EQUALITY_MAPPING := 1.00
    COMPLEMENT_OF_XOR := 1.00
    NARY_COMPLEMENTED_PARITY :=
        1.00 WHEN convention_is_explicit
    STANDARD_GATE_TRANSFORMATIONS := 0.99
    NETWORK_EQUIVALENCE :=
        IF exhaustive_truth_table_verified THEN 1.00
        ELSE REQUIRE validation
    PHYSICAL_IMPLEMENTATION_CLAIM :=
        REQUIRE implementation_specific_source
}

UPDATE_MODEL {
    IMMUTABLE_CORE := {
        BooleanDomain,
        BinaryExclusiveNORTruthFunction,
        CanonicalBinaryTruthTable,
        ComplementOfXORRelationship,
        BinaryEqualitySemantics
    }

    EXTENSIBLE := {
        NaryConventions,
        CircuitApplications,
        ComparatorStructures,
        ParityStructures,
        AlternativeImplementations,
        HardwareRealisation,
        RelatedOntologies
    }

    ON_NEW_KNOWLEDGE {
        VALIDATE against XNORTruthFunction
        VALIDATE arity
        VALIDATE BooleanDomain
        CHECK nary_semantic_convention
        CHECK semantic_consistency
        CHECK truth_table_equivalence
        ADD relationship IF non_contradictory
        UPDATE confidence
    }
}

AI_CONSUMPTION {
    MACHINE_READABLE := TRUE
    HUMAN_INTERPRETABLE := TRUE
    RECURSIVE_REASONING := TRUE
    ENTITY_RESOLUTION := TRUE
    SYMBOL_RESOLUTION := TRUE
    RELATIONSHIP_TRAVERSAL := TRUE
    BOOLEAN_EVALUATION := TRUE
    EQUALITY_REASONING := TRUE
    PARITY_REASONING := TRUE
    GF2_REASONING := TRUE
    TRUTH_TABLE_REASONING := TRUE
    CIRCUIT_TRANSLATION := TRUE
    EQUIVALENCE_VALIDATION := TRUE
}

FLOW_HASH {
    TARGET := TARGET_URL
    SUBJECT := "XNOR Gate Ontology"
    VERSION := "1.0"
    CANONICAL_SIGNATURE :=
        HASH(TARGET + SUBJECT + DOMAIN + VERSION)
}

OUTPUT {
    PRIMARY_ENTITY := XNORGate

    INTERPRETATION :=
        "An XNOR gate implements the complement of exclusive disjunction. For two Boolean inputs it acts as an equality function, producing true when both inputs have the same value. Under an explicitly defined n-input convention it represents complemented parity and connects Boolean equivalence, comparison logic and affine reasoning over GF(2)."
}

END_FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ