def bit

lawful-words@0.1.0.0 · defs.bend:16

import lawful-words@0.1.0.0/defs.bend as Defs
import Base

16# Bit k of a word (bit 0 is the lowest; every bit from 32 up is 0).
17def bit(a: U32, k: Nat) -> Bool:
18  Nat.is_eq(Nat.mod(Nat.div(U32.to_nat(a), Nat.pow(2n, k)), 2n), 1n)

Uses (8)

Used by (43)