Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenThu, 12 May 2016 23:20:21 +0200why is dec2bin limited to 8+2bits in an 32 and 64 bits world ???https://ask.libreoffice.org/en/question/69797/why-is-dec2bin-limited-to-82bits-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.screenThu, 12 May 2016 23:20:21 +0200https://ask.libreoffice.org/en/question/69797/