First time here? Check out the FAQ!
answered 2024-08-20 13:36:29 +0100
sage: length = 10 sage: Bitset(f"{{:0{length}b}}".format(randint(0, 2**length - 1))) 0010101001 sage: Bitset(f"{{:0{length}b}}".format(randint(0, 2**length - 1))) 1100101000