| This template uses Lua:
|
Usage
- {{hex2dec|0x0000}} → 0
- {{hex2dec|0xA0}} → 160
- {{hex2dec|0x7C0}} → 1984
- {{hex2dec|0xFFFF}} → 65535
- {{hex2dec|0x845FED}} → 8675309
- {{hex2dec|0x75BCD15}} → 123456789
- {{hex2dec|0xDEADBEEF}} → 3735928559
- {{hex2dec|0xFFFFFFFF}} → 4294967295
- Input formats
Input with or without 0x prefix:
- {{hex2dec|0xa0}} → 160
- {{hex2dec|a0}} → 160
Uppercase and lowercase accepted:
- {{hex2dec|A0}} → 160
- {{hex2dec|a0}} → 160
- Not a number input
- {{hex2dec|}} → 0
- {{hex2dec}} → 0
- {{hex2dec|0xAXYZ}} → 0
- {{hex2dec|XYZ}} → 0
- {{hex2dec|0xA B}} → 0
- {{hex2dec|A B}} → 0
See also
Math templates |
---|
|
Conversions |
---|
convert | many units (see: list) | cvt | many units; abbreviated {{convert}} | convinfobox | for use in infoboxes | bbl to t | barrels of oil to tonnes | long ton | long hundredweights, quarters and pounds to kilograms; long tons and hundredweights to pounds and metric tonnes | miles-chains | miles and chains to kilometres linking "chains" | rndfrac | decimals to fractions |
| |
|
|
Notation |
---|
bigmath | for stand-alone formulas, using a bigger font to match <templatestyles src="Noitalic/styles.css"/>\displaystyle PNG-rendered <templatestyles src="Noitalic/styles.css"/>TeX formulas | | bra–ket notation | frac | for creating fractions 3⁄5 (not for use in science or mathematical articles; instead, use <templatestyles src="Noitalic/styles.css"/>{{sfrac}} ) | intmath | integral symbols | | angular brackets | | multiline delimiters (2–5 lines inclusive) | math | for short inline formulas | mathcal | [mathematical] calligraphic font for use in mathematical formulas, as an alternative to <templatestyles src="Noitalic/styles.css"/>\mathcal{...} in <templatestyles src="Noitalic/styles.css"/>LaTeX markup |
| mvar | a short form to refer to individual italicized maths variables in normal text | | arbitrary characters/diacritics set above/below one another | radic | Radicals √2 | sfrac | for creating fractions 3/5 (this template should be used in science or mathematical articles instead of <templatestyles src="Noitalic/styles.css"/>{{frac}} ) | | Subscripts and superscripts | tmath | wraps a <templatestyles src="Noitalic/styles.css"/>TeX math expression in <templatestyles src="Noitalic/styles.css"/><math> tags | val | to report measurement values, uncertainties and units | vec | for various overarrows, underarrows, pointing left, right or both ways |
|
|
|
|
|