Basic questions can be confusing: Do you want '3' as a numeric or do you want it as a string '3'.
Assuming you want the result numeric:
1) If your "binary string 0011" is 4 bytes (i.e. ascii): use Scan from String with %b (%d reads decimal characters).
0r
2)If your "binary string 0011" is a 4 bit nibble: typecast.
=====================================================
Fading out. " ... J. Arthur Rank on gong."