+ Reply to Thread
Results 1 to 5 of 5

Converting large numbers into binary

  1. #1
    Registered User
    Join Date
    03-01-2014
    Location
    America
    MS-Off Ver
    Excel 2010
    Posts
    1

    Converting large numbers into binary

    My task is to convert 4503599627370495 into binary. Haven't had any luck with DEC2BIN() due to the number's size. Not only is dec2bin an issue, excel doesn't easily handle the number because it is one too many significant digits. Excel recognizes the number above as 4503599627370490. Any ideas?
    Last edited by excelerat8r; 03-01-2014 at 12:18 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: Converting large numbers into binary

    Hi excelerat8r and welcome to the forum,

    The easy way is to do it by hand. Look at this site and start dividing by 2.

    http://m.wikihow.com/Convert-from-Decimal-to-Binary

    You might also start subtracting large powers of 2 and keep track what is left over.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Converting large numbers into binary

    Using SHG's UDF 'Dbl2Bin' found here: http://www.box.net/shared/530h20x44e, I came up with 52 straight 1's.

    Which, oddly enough, is the same answer I got using the divide by 2 method.

    - Moo
    Attached Files Attached Files
    Last edited by Moo the Dog; 03-01-2014 at 01:56 AM.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: Converting large numbers into binary

    I agree with Moo
    Try your number on this site
    http://www.exploringbinary.com/binary-converter/

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Converting large numbers into binary

    Just a note on that: The function converts a Double to binary, and a Double has 53 bits of precision. You're coercing a string to a Double to avoid Excel's cosmetic limitation of 15 digits of decimal precision, which is fine, but it's running close to the edge.

    The largest whole number that the function will accurately convert to binary is 2^53-1 = 9,007,199,254,740,991

    4,503,599,627,370,495 returns 52 1's

    9,007,199,254,740,991 returns 53 1's

    Above that, one or more LSBs will always be zero.
    Last edited by shg; 03-01-2014 at 03:27 PM.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] large binary numbers
    By Barb Reinhardt in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-06-2005, 06:05 PM
  2. [SOLVED] large binary numbers
    By Himu in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. [SOLVED] large binary numbers
    By Barb Reinhardt in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  4. large binary numbers
    By Himu in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. large binary numbers
    By Himu in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1