The Boolean function nonlinearity of a Boolean function
is its least Hamming distance from an affine
Boolean function:
Here addition and the dot product are taken modulo 2. Equivalently, this is the distance of the truth table of from the first-order Reed-Muller
code
.
Thus the largest possible nonlinearity on
variables is its code covering
radius.
Wang et al. (2026) proved that the maximum for nine variables is 242.