Ok, part of my code involves using memory banks.
At one point, I use PeekByte to get a value from the bank. I then use Str and Bin$ in succession to convert this to an 8-bit binary number.
Say, for example, this number is 10011011, stored in the variable a$.
Using Left$(a$,4) I can get the first four binary digits "1001".
How can I then convert this 4 digit binary number to decimal?
At one point, I use PeekByte to get a value from the bank. I then use Str and Bin$ in succession to convert this to an 8-bit binary number.
Say, for example, this number is 10011011, stored in the variable a$.
Using Left$(a$,4) I can get the first four binary digits "1001".
How can I then convert this 4 digit binary number to decimal?