DEC2BIN() and HEX2BIN() support 10 binary digits only.
While 10 digit are enough for decimal and hex numbers, 10 bit are very few for
a binary number. Consider that as two's complement representation, the range is
restricted to -512 / +511 only. Binary numbers should be supported up to 32 or 64 bit.
As current DEC2BIN() and HEX2BIN() are stuck to 10 binary digits for compatibility reason (see https://bugs.documentfoundation.org/show_bug.cgi?id=45950), we need new (related) functions to generate more than 10 binary digits.
Opening a new bug report is not the right way to go here. An expert developer on the other issue closed it and said it would be "even worse" to create yet another formula. Please keep comments to the original bug report and discuss this with the expert developer (Eike) on that bug report. Closing this as a duplicate.
*** This bug has been marked as a duplicate of bug 45950 ***
there should be an error.
Where did you read 'said it would be "even worse" to create yet another formula'?
At the opposite, the conclusion by Eike was that we need to implement two new functions, because the old one must be remain untouched for compatibility.
This is why I opened this new bug, to ask two new functions with support for more binary digits. I propose DEC2BINARY() and HEX2BINARY()
Eike - thoughts here? Valid enhancement or did I read your previous comments right from bug 45950?
Well, it is of course a valid RFE, but with very low priority, and as such not exactly a duplicate of bug 45950.
Note that for positive numbers there's always the possibility to convert using the BASE() and DECIMAL() functions, e.g. BASE(DECIMAL("beef",16),2) for hex2bin.