**Use case**

Viewing binary data such as bitmasks, hashes, internal representation of IEEE-754 numbers, etc.
Mostly for debugging.

**Describe the solution you'd like**

Similar to `hex`/`unhex`.

`bin` - returns a string with `0` and `1`. Bits are in "human" order, most significant first. Most significant zero bits are not printed (except the case with single zero).

**Describe alternatives you've considered**

Now I have to run interactive `python` from command line, but I will be more happy using ClickHouse.

**Caveats**

The name `bin` may suggest that the function will "split data into bins" but it is completely unrelated.
}
        else if (const auto * col_in_fixed = checkAndGetColumn<ColumnFixedString>(column.get()))
        {
            if (col_in_fixed->getN() != uuid_text_length)
                throw Exception("Illegal type " + col_type_name.type->getName() +
                                " of column " + col_in_fixed->getName() +
                                " argument of function " + getName() +
                                ", expected FixedString(" + toString(uuid_text_length) + ")",
                                ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
            const auto size = col_in_fixed->size();
            const auto & vec_in = col_in_fixed->getChars();
            auto col_res = ColumnFixedString::create(uuid_bytes_length);
            ColumnString::Chars & vec_res = col_res->getChars();
            vec_res.resize(size * uuid_bytes_length);
            size_t src_offset = 0;
            size_t dst_offset = 0;
            for (size_t i = 0; i < size; ++i)
            {
                parseUUID(&vec_in[src_offset], &vec_res[dst_offset]);
                src_offset += uuid_text_length;
                dst_offset += uuid_bytes_length;
            }
            return col_res;
        }
        else
            throw Exception("Illegal column " + arguments[0].column->getName()
                + " of argument of function " + getName(), ErrorCodes::ILLEGAL_COLUMN);
    }
};
class FunctionHex : public IFunction