---
title: "fromBinary"
description: "Returns an integer value of the binary formatted string argument."
---
# fromBinary
> Returns an integer value of the binary formatted string argument.
**This function is used by Ignition's Expression language.**
## Description
Returns an integer value of the binary formatted string argument. Numbers outside of the range (-231) - (231-1), and strings that are not binary numbers, return null.
## Syntax
`fromBinary(string)`
### Parameters
| Type | Parameter | Description |
|---|---|---|
| String | `string` | A string representation of a binary. |
### Results
**Integer** - The integer value of the specified binary.
## Examples
```python title="Code Snippet"
fromBinary("1111") //returns 15
```
```python title="Code Snippet"
fromBinary("-1111") //returns -15
```