|
-
Dec 18th, 2005, 02:07 AM
#1
Thread Starter
No place like 127.0.0.1
-
Dec 18th, 2005, 08:48 AM
#2
Re: Convert A Number From Binary (Base 2) Numbering to Decimal (Base 10)
As in a formula that performs the operation without a LOOP?
Without "AND" masking?
Without "DIVIDE by Power of 2" bitshifting?
-
Dec 18th, 2005, 08:17 PM
#3
Thread Starter
No place like 127.0.0.1
Re: Convert A Number From Binary (Base 2) Numbering to Decimal (Base 10)
Wait, were those questions? Yes it is a formula that does it without those things? I don't understand why you asked those things... But okay. 
I guess it does kind of involve a loop because of the use sigma.
-
Dec 18th, 2005, 09:05 PM
#4
Re: Convert A Number From Binary (Base 2) Numbering to Decimal (Base 10)
Yes they were questions - it was early this morning when I read your post
I've been doing binary/bit manipulation for so long in VB (and other BASICS) that I cannot imagine a single formula to do what I've always done with loops and logic - can't wait to see what you come up with
-
Dec 18th, 2005, 10:37 PM
#5
Thread Starter
No place like 127.0.0.1
Re: Convert A Number From Binary (Base 2) Numbering to Decimal (Base 10)
I think you misunderstand. I posted the formula in the first post. It does involve a "loop" because of the sigma notation. There is no way to do it otherwise. Bitshifting might be faster for a computer though to avoid the floating point math.
NOTE: The brackets that look like this: [ ] but without the top part of the hook mean int().
-
Dec 19th, 2005, 12:07 PM
#6
Addicted Member
Re: Convert A Number From Binary (Base 2) Numbering to Decimal (Base 10)
That's a pretty neat way to do the conversion!
-
Dec 21st, 2005, 11:01 PM
#7
Thread Starter
No place like 127.0.0.1
Re: Convert A Number From Binary (Base 2) Numbering to Decimal (Base 10)
I added 2 .DOCs that are explanations of the formula. I wrote them up for my own use and I thought I might post them here. Enjoy!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|