Closed avidseeker closed 1 year ago
Asymptote defines the bitwise functions int AND(int,int), int OR(int,int), int XOR(int,int), int NOT(int), int CLZ(int) (count leading zeros), int CTZ(int) (count trailing zeros), int popcount(int) (count bits populated by ones), and int bitreverse(int a, int bits) (reverse bits within a word of length bits).
Bitmasks are helpful in representing a vector of binary choices.
I was wondering if it's possible to implement binary operators:
<< >> & | !