摘要 |
A method for efficiently comparing two trinary logic representations, including the steps of creating a first data structure (a VALUE data structure) representative of a first set of properties; creating a second data structure (a KNOWN data structure) representative of whether the first set of properties is known; creating a third data structure (a TARGET data structure) representative of a target set of properties; creating a fourth data structure (a WANT data structure) representative of whether the target set of properties is wanted; and comparing the first, second, third, and fourth data structures using bit-wise binary operations to determine whether the first set of known properties are wanted as a target set of properties. In exemplary embodiments, the bit-wise binary operations are performed according to the Boolean equation: (not WANT) or (KNOWN and ((TARGET xor VALUE))). Alternatively, the bit-wise binary operation are performed according to the Boolean equation: (not WANT) or (KNOWN and ((TARGET and VALUE) or ((not TARGET) and (not (VALUE))). These data structures may be any size computer word, including 16 and 32-bit words.
|