Template:BinaryDigit

first argument: n second argument: i

output: digit at place i (with place value 2i) in the binary representation of n

calculation:

(The error message "Unrecognized punctuation character" below does not matter.)