Ask Your Question
0

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

asked 2016-05-12 23:20:21 +0200

screen gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-05-13 07:24:51 +0200

karolus gravatar image

updated 2016-05-13 07:28:18 +0200

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 )

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-05-12 23:20:21 +0200

Seen: 1,735 times

Last updated: May 13 '16