Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template:Binary/doc

From Wikipedia, the free encyclopedia

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

Usage

[edit]

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]