Query editor
WITH x (hook_address, binary_representation) AS (VALUES(0x0000000000000000000000000000000000000000000000000008, '00000000000000000000000000000000000000000000000000000000000001000'),(0x0000000000000000000000000000000000000000000000000009, '00000000000000000000000000000000000000000000000000000000000001001'),(0x0000000000000000000000000000000000000000000000000090, '00000000000000000000000000000000000000000000000000000000001001000'),(0x0000000000000000000000000000000000000000000000003FFF, '00000000000000000000000000000000000000000000000000011111111111111'),(0x00000000000003b66afe4f14d8fcad40210ab263466efa030089, '00000000000000000000000000000000000000000000000000000000010001001'))SELECT *, to_base(CAST(varbinary_to_uint256(hook_addr_last_two_bytes) AS BIGINT), 2) as converted_bytesFROM (SELECT hook_address,substr(hook_address, -2) as hook_addr_last_two_bytes,binary_representationFROM x)