Jump to content

Template:Binary/doc

Gotšwa go Wikipedia

This template is for quickly converting a decimal number to binary.

Use {{Binary|x|y}} where x is the decimal number and y is the decimal precision (positive numbers, defaults displays up to 10 digits following the binary point).

Examples:

CodeResultNotes
{{Binary|128892}}111110111011111002Regular integer
{{Binary|73.3333333|5}}1001001.010102Truncated decimal
{{Binary|73.3333333|0}}10010012Truncated at decimal point
{{Binary|73|5}}1001001.000002Decimals padded to integer
{{Binary|73.25}}1001001.012Auto truncation
{{Binary|73.25|4}}1001001.01002Decimals padded
{{Binary|{{#expr:1+3/8}}}}1.0112Expression support

See also

[edit source]

Template:Math templates