echo 'obase=2; $current_version' | bc
When you put single-quotes around a text string, everything inside them becomes literal. You need to use double-quotes if you want variables to expand.
(double-quotes don't escape $`\
, or !
when history expansion is enabled).
echo "obase=2; $current_version" | bc
Edit: this is bash pitfall #28