Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
(def i (read-string (str "2r" s)))
var i = int.parse(s, radix: 2);
erlang:list_to_integer(S,2).
character (len=:), allocatable :: s
integer :: i
s = '1101'
read (s,'(B4)') i
const i = parseInt(s, 2)
Integer i = Integer.valueOf(s, 2);
$i = bindec($s);
$i = oct('0b' . $s);
i = int(s, 2)
i = s.to_i(2)
let i = i32::from_str_radix(s, 2).expect("Not a binary number!");