Statements Description Example
bit_count(x, bits) → bigint Count the number of 1 in the binary expression of x. SELECT bit_count(9, 64); — 2

SELECT bit_count(9, 8); — 2

SELECT bit_count(-7, 64); — 62

SELECT bit_count(-7, 8); — 6

bitwise_and(x, y) → bigint Perform the AND operation on x and y in the binary form. -
bitwise_not(x) → bigint Calculate the opposite values of all bits of x in the binary form. -
bitwise_or(x, y) → bigint Perform the OR operation on x and y in the binary form. -
bitwise_xor(x, y) → bigint Perform the XOR operation on x and y in the binary form. -