law and_comm

bend-osdev-word64@0.1.1.0 · LAWS_bits.bend:7

import bend-osdev-word64@0.1.1.0/LAWS_bits.bend as LAWSBits
import Base
import bend-osdev-word64@0.1.1.0/word64.bend as W

7# The bits: and, or and xor commute; and + or is the sum of the values, and
8# so is xor + 2 and; with no bit in common (and is 0), or is the sum; not is
9# the subtraction from 2^64 - 1.
10law and_comm:
11  for +a: W.W64
12  for +b: W.W64
13  {W.W64.and(a, b) == W.W64.and(b, a) : W.W64}

Uses (4)

Used by (0)

No other definition uses this definition.