by Karel v/d Veldt (1 Submission)
Category: Coding Standards
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(3 Votes)
With this code you can convert binary strings (of any size) to their decimal equivalent and vice versa. The binary-to-decimal converting code can convert binary strings from the left to the right (eg 1000 = 1) and from the right to the left (0001 = 1, standard). So you can choose in what direction you want to convert. You can also convert decimal numbers back to binary strings but the highest possible number with that is 999999 (else it crashes).
Code Returns
A binary string or a decimal number.
Side Effects
None.
Upload