pub fn u64_to_bits(x: u64, n_bits: u32) -> Vec<bool>