Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel General
How to convert binary to decimal & vice versa?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Harlan Grove, post: 1160318"] hmmm wrote... If you just want to go up to 2^16-1, one purely built-in way to convert the decimal number x to binary is =MOD(INT(x/2^15),2)&MOD(INT(x/2^14),2)&MOD(INT(x/2^13),2)&MOD(INT(x/2^12),2) &MOD(INT(x/2^11),2)&MOD(INT(x/2^10),2)&MOD(INT(x/2^9),2)&MOD(INT(x/2^8),2) &MOD(INT(x/2^7),2)&MOD(INT(x/2^6),2)&MOD(INT(x/2^5),2)&MOD(INT(x/2^4),2) &MOD(INT(x/2^3),2)&MOD(INT(x/2^2),2)&MOD(INT(x/2),2)&MOD(x,2) And to convert the binary number b to decimal, =SUMPRODUCT(MID(b,ROW(INDIRECT("1:"&LEN(b))),1) *2^(LEN(b)-ROW(INDIRECT("1:"&LEN(b))))) [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel General
How to convert binary to decimal & vice versa?
Top