Converting Decimal to Binary

  • Thread starter Thread starter Russ
  • Start date Start date
R

Russ

Anyone know how to convert decimal numbers >= 512 to
binary in Excel? DEC2BIN apparently only work for numbers
up to 511.

Thanks!
 
Anyone know how to convert decimal numbers >= 512 to
binary in Excel? DEC2BIN apparently only work for numbers
up to 511.

Pick your number apart into powers of 512. For numbers from 0 to -1+2^36,

=DEC2BIN(INT(x/2^27),9)&DEC2BIN(INT(MOD(x,2^27)/2^18),9)
&DEC2BIN(INT(MOD(x,2^18)/2^9),9)&DEC2BIN(MOD(x,2^9),9)
 
Back
Top