Template:Bintodec
Appearance
0
This templates returns an integer of which the binary representation in reverse order forms the Boolean array indicating which of the parameters 1-7 are defined and non-empty.
Examples:
{{bintodec}}
â 0 [1]{{bintodec|5}}
â 1 [2]{{bintodec|5|2}}
gives 3 [3]{{bintodec|3=x|5=y}}
gives 20{{bintodec|3=x|5=y|3=}}
gives 16
Without special provisions this template can be extended to work for arrays of at most 46 elements:
{{#expr:2^46
}} â 70368744177664
{{#expr:2^47
}} â 1.4073748835533E+14