Logic Gates

How Integer Gate Logic Emulates Digital Logic Gates Using Weights, Bias, and a Piecewise Activation Function

A Fundamentally Different Approach to Neural Computation

Integer Gate Logic (IGL) is a patented artificial intelligence architecture developed by MLiglon Corporation that combines compact integer-valued parameters with a specialized, non-monotonic piecewise activation function. Together, these elements allow individual computational nodes to emulate familiar digital logic gates, including AND, OR, XOR, XNOR, NAND, and NOR, while also producing intermediate numerical outputs that extend beyond strictly binary logic.

The significance of this architecture is not simply that IGL can reproduce Boolean operations. Conventional neural networks can also learn Boolean functions, including XOR, through suitable multilayer architectures. What distinguishes IGL is its ability to express these behaviors directly through the interaction of a small number of integer parameters and a specially designed activation function.

A single two-input IGL node can reproduce XOR using only three learned parameters: two weights and one bias. It does not require an additional hidden layer to implement that particular logical relationship.

The mechanism is especially relevant to researchers investigating compact machine-learning representations, discrete optimization, embedded artificial intelligence, and alternatives to conventional gradient-based training.

1. The Fundamental IGL Node Equation

At its simplest, a two-input IGL node performs two operations.

First, it calculates a weighted sum:

S = W₁X₁ + W₂X₂ + B

Second, it applies the patented Linear Logic Offset Activation Function (LLO-AF):

Y = f(S)

The variables have the following meanings:

  • X₁, X₂: Input values supplied to the computational node.
  • W₁, W₂: Integer-valued weights controlling the contribution of each input.
  • B: Integer-valued bias that shifts the weighted sum into different activation regions.
  • S: The calculated weighted sum.
  • f(S): The piecewise activation function.
  • Y: The resulting node output.

In conventional neural networks, the weighted sum is commonly followed by a monotonic activation such as ReLU or sigmoid. The IGL approach instead uses an activation function with multiple rising and falling regions.

This distinction is crucial.

A node’s output is determined not merely by the magnitude of the weighted sum, but also by which region of the non-monotonic activation function the weighted sum occupies.

As a result, increasing an input does not necessarily increase the node’s output. Under some parameter configurations, increasing an input can reduce the output or cause it to become zero.

This capability is central to IGL’s logic-gate emulation behavior.

2. The Patented Five-Region Activation Function

The activation function illustrated in Figures 7 and 7A of U.S. Patent 12,488,222 B1 has five distinct regions.

Using a positive integer scaling parameter P, its normalized form is:

RegionWeighted sum SActivation output f(S)
R1 — ZeroS ≤ 00
R2 — Rising0 < S ≤ PS
R3 — FallingP < S ≤ 2P2P − S
R4 — Rising2P < S ≤ 3PS − 2P
R5 — SaturationS > 3PP

The resulting activation pattern is:

ZERO → RISE → FALL → RISE → PLATEAU

At the principal breakpoints, the activation function produces:

Sf(S)
00
PP
2P0
3PP
Greater than 3PP

For the simplified case P = 1, the output values at the successive breakpoints are:

0 → 1 → 0 → 1

This creates two different positive-output regions separated by a zero-output valley.

That valley is essential for expressing non-monotonic logical relationships such as XOR.

The function is continuous and piecewise linear, but it is not globally differentiable at its transition points. IGL training therefore does not depend on conventional backpropagation through this activation function.

Why the falling region matters

Consider a conventional monotonic activation function applied to a weighted sum of two binary inputs.

With positive weights, activating additional inputs generally cannot decrease the output. This behavior makes it impossible for a single conventional monotonic-threshold neuron to represent XOR.

XOR requires an output of one when exactly one input is active, but zero when both inputs are active.

IGL’s falling activation region provides precisely this behavior.

The weighted sum can increase from P to 2P while the output decreases from P to zero.

This means that the node can respond positively to either individual input while suppressing its output when both inputs become active.

3. Example: Implementing XOR With One IGL Node

The exclusive OR function produces a positive output when exactly one input is active.

Its Boolean truth table is:

X₁X₂XOR
000
011
101
110

IGL can reproduce this behavior using the following normalized parameters:

W₁ = 1, W₂ = 1, B = 0, P = 1

The weighted sum becomes:

S = X₁ + X₂

Evaluating all four binary input combinations gives:

X₁X₂CalculationSf(S)
000 + 0 + 000
010 + 1 + 011
101 + 0 + 011
111 + 1 + 020

The node produces the exact XOR output sequence:

0, 1, 1, 0

The result is generated entirely by ordinary arithmetic followed by the specialized activation function.

No multiplication between the inputs is needed, and no additional hidden neurons are required to express this two-input Boolean function.

Most importantly, the node does not require separate programmed logic for XOR. The behavior emerges from its weights, bias, and fixed activation function.

This is a particularly useful illustration of how a small discrete parameter representation can express a nonlinear classification function.

4. Emulating Other Boolean Gates by Changing Only Three Parameters

The same activation function can reproduce other Boolean gates without changing the computational node’s internal structure.

Only the weights and bias need to change.

The following settings are drawn from the normalized logic-gate configurations illustrated in the patent.

All values below use P = 1.

Logic gateW₁W₂BOutput for 00, 01, 10, 11
AND11−10, 0, 0, 1
OR22−10, 1, 1, 1
XOR1100, 1, 1, 0
XNOR1111, 0, 0, 1
NAND−2−231, 1, 1, 0
NOR−1−111, 0, 0, 0

The same basic node can also emulate single-input logic functions, including identity and inversion, as well as constant-output functions.

AND: Both inputs must be active

For AND, choose:

W₁ = 1, W₂ = 1, B = −1.

The four weighted sums are:

−1, 0, 0, 1.

Only the final input combination produces a positive activation output.

OR: Either input is sufficient

For OR, choose:

W₁ = 2, W₂ = 2, B = −1.

The weighted sums become:

−1, 1, 1, 3.

The first produces zero. Both individual-input cases produce one, while the simultaneous-input case reaches the upper saturation region and also produces one.

XNOR: Both inputs must agree

For XNOR, choose:

W₁ = 1, W₂ = 1, B = 1.

The weighted sums become:

1, 2, 2, 3.

The two matching-input cases generate outputs of one. The mismatched-input cases fall into the zero-output valley.

NAND and NOR: Logic through negative weights

Negative weights allow the activation function to implement complementary and inhibitory relationships.

For NAND:

W₁ = −2, W₂ = −2, B = 3.

For NOR:

W₁ = −1, W₂ = −1, B = 1.

These configurations demonstrate that the same activation function supports both positive and negative responses to activated inputs.

The primary insight is that logical behavior is encoded in the parameter values rather than in separate gate-specific computational circuitry.

5. Beyond Binary Logic: Intermediate and Graded Outputs

An especially interesting capability of IGL is that the activation function is not restricted to outputs of exactly zero or one.

Although the exact Boolean-gate examples place their weighted sums at selected breakpoints, other parameter combinations place the sums between those breakpoints.

The resulting outputs may be fractional or intermediate values.

This creates a continuum of behaviors between strict digital logic and graded nonlinear decision functions.

Consider an XOR-like configuration:

W₁ = 0.75, W₂ = 0.75, B = 0

With P = 1, the four input combinations produce:

X₁X₂Sf(S)
000.000.00
010.750.75
100.750.75
111.500.50

Unlike the exact XOR example, the simultaneous-input case no longer falls completely to zero.

The node still favors individual input activation, but it retains a partial response when both inputs are present.

This represents a graded XOR-like response, rather than an exact Boolean XOR.

The distinction can be useful when inputs are noisy, uncertain, partially activated, or represent continuous features rather than strict binary states.

The intermediate output is a deterministic activation value, not automatically a calibrated probability.

6. How Fractional Weights and Bias Change Logical Behavior

Small changes in weights and bias can substantially alter the input-output relationship.

Consider the following five examples, all using the same activation function with P = 1.

BehaviorW₁W₂BOutputs: 00, 01, 10, 11
Soft XOR0.750.7500, 0.75, 0.75, 0.50
Shifted XOR-like1.001.000.250.25, 0.75, 0.75, 0.25
Graded cooperative response0.500.5000, 0.50, 0.50, 1.00
Asymmetric response1.000.5000, 0.50, 1.00, 0.50
Graded NOR-like response−0.50−0.501.001.00, 0.50, 0.50, 0

Each row represents a different nonlinear response pattern produced by the same computational mechanism.

Several important behaviors emerge.

Sensitivity control. Smaller weights can produce partial responses rather than immediately driving the output to its maximum.

Asymmetric input importance. Different values for W₁ and W₂ allow one input to contribute more strongly than another.

Threshold displacement. Changing B shifts the four possible weighted sums relative to the activation function’s breakpoints.

Inhibitory relationships. Negative weights can suppress activation when certain inputs become active.

Non-monotonic feature interactions. Combining inputs can produce an output smaller than either input produces individually.

In a multilayer network, these behaviors allow individual nodes to serve as learned feature detectors, suppressors, selectors, and nonlinear combiners.

The resulting network is not confined to implementing literal Boolean circuits. Instead, it can construct complex numerical transformations from many interconnected logic-capable nodes.

7. Fractional Logic Without Floating-Point Inference

The preceding examples use decimal parameter values for clarity.

However, fractional relationships can be represented using scaled integers.

For example, the soft XOR configuration uses:

W₁ = 0.75, W₂ = 0.75, B = 0.

Choose an integer scale factor of P = 16.

The corresponding integer parameters are:

W₁ = 12, W₂ = 12, B = 0

The resulting calculations are:

InputsInteger sum SInteger f(S)Normalized output f(S)/16
00000.00
0112120.75
1012120.75
112480.50

These calculations reproduce the earlier fractional responses exactly.

The underlying operations remain integer additions, multiplications, comparisons, and subtractions.

Floating-point computation is not inherently necessary for the node’s inference operation.

This distinction is relevant to microcontrollers, digital signal processors, and other processors that support efficient fixed-point operations.

Precision and accumulator widths must nevertheless be selected carefully to avoid overflow and preserve the desired scaled values.

8. Potential Hardware Advantages of the IGL Arithmetic Model

The arithmetic structure of IGL offers several opportunities for hardware-efficient implementation.

Compact parameter storage

A basic two-input node requires two weights and one bias.

When the selected parameter ranges permit, these values can be stored using one-byte or two-byte integer representations.

This can reduce parameter storage relative to conventional FP32 representations, although complete runtime memory requirements also depend on connectivity information, intermediate outputs, and buffers.

Integer-native computation

The weighted sum can be evaluated through integer multiply-and-add operations.

The piecewise activation function can then be calculated with comparisons and simple arithmetic.

These operations are widely supported by general-purpose processors, microcontrollers, DSPs, and specialized hardware.

Lookup-table activation

Because the input to the activation function can be represented within a bounded integer range, its output may also be obtained through a lookup table.

Depending on the processor, table size, cache behavior, and arithmetic cost, this may provide faster execution than repeatedly evaluating the piecewise expression.

Efficient low-precision data movement

Compact integer representations can reduce the number of bytes transferred between memory and processing units.

For memory-bandwidth-limited systems, this can be valuable.

Specialized hardware opportunities

The architecture is a candidate for implementation using SIMD instructions, DSP vector units, FPGA logic, or application-specific accelerators.

Its deterministic discrete arithmetic may simplify some implementation choices, although actual performance and energy advantages must be established through hardware-specific benchmarking.

9. How IGL Learns These Behaviors

The logic-gate configurations described above need not be manually selected for every node in a practical IGL network.

The training process can search for useful combinations of weights and bias according to their effect on a learning objective.

As described in the IGL patent family, chain isolation optimization provides a mechanism for adjusting selected node parameters without conventional gradient backpropagation.

In simplified terms, the process involves selecting a node, evaluating candidate parameter variations, recalculating the affected downstream computations, measuring the resulting error, and retaining beneficial changes according to the selected optimization criteria.

For example, a node might begin with parameter values that generate a roughly OR-like response. Through successive discrete adjustments, its behavior could shift toward a more selective AND-like, XOR-like, or asymmetric nonlinear function.

Other nodes in the network may learn different responses.

The resulting computation consists of interconnected locally learned functions, collectively producing the network’s final predictions.

The activation function therefore provides a repertoire of nonlinear responses, while the training algorithm searches for combinations that are useful for the task.

The computational cost of this optimization depends on the number of candidates evaluated, network connectivity, batch size, and selected search procedure. Eliminating backpropagation does not, by itself, guarantee faster training.

10. Why This Matters to AI Researchers

The most important scientific property of this architecture is the ability to represent several distinct Boolean functions and a broader family of graded nonlinear functions using the same three-parameter computational node.

This creates a different representation space from that of a conventional neuron with a monotonic activation function.

Several research opportunities follow.

Expressive capacity per node. Logic functions such as XOR can be implemented by a single IGL node, potentially reducing the number of computational elements needed for some nonlinear relationships.

Discrete parameter optimization. Since node behavior is controlled by integer-valued parameters, learning algorithms can investigate candidate values directly rather than relying exclusively on gradients.

Structured feature interactions. Nodes can express excitatory, inhibitory, asymmetric, and non-monotonic combinations of input features.

Quantization-native model design. Low-precision parameters are part of the computational representation rather than necessarily being introduced through post-training quantization.

Embedded deployment. Integer arithmetic, compact parameter storage, and possible lookup-table implementation offer useful design options for Edge AI, TinyML, intelligent sensors, robotics, and real-time signal classification.

Hybrid architectures. Logic-capable nodes could also be investigated as components within convolutional, hierarchical, or other structured machine-learning systems.

These properties motivate systematic comparisons with conventional neural networks, including parameter-matched and compute-matched baselines.

The strongest advantages are likely to depend on the task, model architecture, implementation, and available hardware rather than applying equally to every machine-learning problem.

Conclusion: Complex Learned Behavior From Simple Integer Arithmetic

The IGL activation function demonstrates how an unconventional nonlinear transformation can dramatically change the behavior available to a computational node.

With only two weights, one bias, and a fixed piecewise activation function, a single node can reproduce multiple Boolean gates or generate intermediate numerical responses.

The key is the function’s non-monotonic rise–fall–rise structure, which allows increased weighted input to either increase or decrease the output depending on the selected activation region.

Integer weights and bias determine where the input combinations fall within those regions.

As the parameters change, the same node can transition between different logical and graded behaviors without changing its underlying computational structure.

This provides the foundation for a distinctive class of machine-learning networks in which compact integer-based nodes can learn complex nonlinear relationships without requiring conventional gradient-based training.

For AI researchers and engineers, the larger opportunity is to explore how networks built from these nodes can achieve useful predictive accuracy with efficient parameter representations, localized optimization, and hardware-oriented computation.

Integer Gate Logic combines the expressive power of learned nonlinear functions with the implementation simplicity of discrete arithmetic—opening a promising research direction for compact, efficient, and scalable artificial intelligence.


Technical references

U.S. Patent 12,242,946 B1 — Integer Gate Logic technology, issued March 4, 2025.

U.S. Patent 12,488,222 B1 — Integer Gate Logic enhancements, issued December 2, 2025. Particularly relevant are Figure 6 (computational node), Figure 7 (piecewise activation function), Figure 7A (normalized gate-emulation settings), and Figures 8A–8C (additional activation-function representations).

Technical note: The equations and worked examples above use the normalized activation form with P = 1 unless otherwise stated. Intermediate output values are deterministic activation responses rather than intrinsically calibrated probabilities. Performance advantages depend on the particular implementation and benchmark conditions.