Why is dec2bin limited to 8+2bits in an 32 and 64 bits world?

why is the formula ‘dec2bin’ limited to 8+2bits in an 32 and 64 bits world ???
I need to make this in a spreadsheet formula
14335 = 11 0111 1111 1111 111 > last 3 bits 111(7) =complement 000(0) against 6t 0n-6t=-6 > 8n-6t= 2 ,8is4bit 1000 so borrow ‘1’

Now you force me to calculate a 9 or 10 bit value from a 16 bit value on a 64 bit machine so i can get the minor 3bit value i need !!!
on my 8bit zx spectrum i do that daily, but i hoped NOT TO DAY on a 64bitter !!!

on 255(0xFF) you have BIN 11111111
With a CARRY you have 1+11111111=511
With a sign bit you have 1+1+11111111= -512 to 511

DEC2BIN
The result is the binary number for the decimal number entered between -512 and 511.
Syntax
DEC2BIN(Number; Places)
Number is a decimal number. If Number is negative, the function returns a binary number with 10 characters. The most significant bit is the sign bit, the other 9 bits return the value.
Places means the number of places to be output.
Example
=DEC2BIN(100;8) returns 01100100.

Hallo

Use =BASE(number;2[;optional places]) instead, its limited only on calc’s 64bit floatingpoint representation for every number ( roughly less than 14 digits )

i like! quick answers ‘to the point’,
little correction: imho calc is capable to handle more than 14 decimal digits, 15 ‘nearly safe’, 16 for integers, and has valid content in the 17th place sometimes, but:

  • doesn’t show all that to the user, and
  • is somewhat restricted in accuracy for calculations with such values,
    as tested today with 7.2 alpha BASE(x;2) looks capable handling such figures, but within the general limits!, try to understand the output of ‘=BASE(2^56-5+3-3;2)’ vs. ‘=BASE(2^56-5+4-4;2)’ and you are mostly done :wink: