---
title: "math:convert — Convert number"
description: "iXML command math:convert: Convert number."
canonical_url: "https://www.zeyos.com/ixml/ref/math-convert"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/math-convert.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# math:convert — Convert number

MATH:CONVERT converts the number representation of a value from a source representation to a target representation.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Result variable name |
| from | type | dec | Source representation |
| to | type | dec | Target representation |

#### Possible values
Possible values for `from`:
- bin — Binary
- oct — Octal
- dec — Decimal
- hex — Hexadecimal
- deg — Degrees (decimal)
- rad — Radian (decimal)

Possible values for `to`:
- bin — Binary
- oct — Octal
- dec — Decimal
- hex — Hexadecimal
- deg — Degrees (decimal)
- rad — Radian (decimal)


### Children
- (none)

### Parents
- (not restricted in the reference)

### Result
- binding: var; type: int|float|string

### Examples

```xml
<output>
	<math:convert from="hex" to="bin">7cd5a72c</math:convert>
</output>

<!-- 1111100110101011010011100101100 -->
```
