>I'm looking for a function in VB that can convert binary into decimal. I`ve searched the online help. Any ideas.
The formula works like this
0 = 0
1 = 1
10 = 2
11 = 3
100 = 4
...
So the forumula is for each nth digit in the binary number multiply the binary digit by 2 to the power of N-1
100 = 1x2x2 + 0x2 + 0x1 = 4
111 = 1x2x2 + 1x2 + 1x1 = 7
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only