Hacker News new | ask | show | jobs
by jonsen 3609 days ago
In this decimal digit context it would be appropriate to define

  NOT d = 9 - d
Similar to

  NOT b = 1 - b 
for binary digits. And in fuzzy logic.

Taking the logic identity

  a XOR b = ( a AND NOT b ) OR ( NOT a AND b )
it would be

  MAX( MIN( a, NOT( b ) ), MIN( NOT( a ), b ) )