Difference between revisions of "Template:Decimal2Base/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jkasd
(​Created page with '{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This template converts numbers from decimal to a given base. =...')
 
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
{{lua|Module:BaseConvert}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
This template converts numbers from decimal to a given base.
 
This template converts numbers from decimal to a given base.
Line 13: Line 14:
 
<nowiki> {{Decimal2Base|{{#expr: 6 * 9}}|13}} </nowiki>
 
<nowiki> {{Decimal2Base|{{#expr: 6 * 9}}|13}} </nowiki>
 
yields  {{Decimal2Base|{{#expr: 6 * 9}}|13}}.
 
yields  {{Decimal2Base|{{#expr: 6 * 9}}|13}}.
 +
 +
<nowiki> {{Decimal2Base|58|16}} </nowiki>
 +
yields  {{Decimal2Base|58|16}}.
 +
 +
 
=== See also ===
 
=== See also ===
[[Template:Roman]]
+
{{Math templates|numeral systems}}<includeonly>{{Sandbox other||
<includeonly>
 
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Numerical conversion templates]]
+
[[Category:Numerical conversion templates|{{PAGENAME}}]]
</includeonly>
+
[[Category:Lua-based templates|{{PAGENAME}}]]
 +
}}</includeonly>

Latest revision as of 23:09, 24 April 2020

This template converts numbers from decimal to a given base.

Usage

Use: {{Decimal2Base|n|radix}} where n is the number in decimal and radix is the base you want to convert to.

Examples: {{Decimal2Base|42|3}} yields 1120.

{{Decimal2Base|{{#expr: 6 * 9}}|13}} yields 42.

{{Decimal2Base|58|16}} yields 3A.


See also