---
url: /dyad/dev/stdlib/BlockComponents/components/Math.IntegerToBoolean.md
description: Dyad Math.IntegerToBoolean docs.  Convert Integer to Boolean signal.
---

# `Math.IntegerToBoolean` {#Math.IntegerToBoolean}

Convert Integer to Boolean signal.

This block computes the Boolean output `y` from the Integer input `u` by the equation:

```
y = u ≥ threshold
```

where `threshold` is a parameter.

This component extends from [`BlockComponents.Interfaces.PartialBooleanSO`](../types/Interfaces.PartialBooleanSO.md)

## Usage {#Usage}

`BlockComponents.Math.IntegerToBoolean(threshold=1)`

## Parameters: {#Parameters:}

|        Name |                                         Description | Units | Default value |
| -----------:| ---------------------------------------------------:| -----:| -------------:|
| `threshold` | Output signal y is true, if input u >= threshold |     – |             1 |

## Connectors {#Connectors}

* `y` - This connector represents a boolean signal as an output from a component ([`BooleanOutput`](/stdlib/Dyad/connectors/BooleanOutput#BooleanOutput))

* `u` - This connector represents an integer signal as an input to a component ([`IntegerInput`](/stdlib/Dyad/connectors/IntegerInput#IntegerInput))

## Behavior {#Behavior}

$$ \begin{align}
y\left( t \right) &= u\left( t \right) \geq \mathtt{threshold}
\end{align}
$$

## Source {#Source}

````dyad
"""
Convert Integer to Boolean signal.

This block computes the Boolean output `y` from the Integer input `u` by the equation:

```
y = u ≥ threshold
```

where `threshold` is a parameter.
"""
component IntegerToBoolean
  extends BlockComponents.Interfaces.PartialBooleanSO
  "Connector of Integer input signal"
  u = IntegerInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Output signal y is true, if input u >= threshold"
  parameter threshold::Integer = 1
relations
  y = u >= threshold
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://BlockComponents/IntegerToBoolean.svg"}
  }
}
end
````

````dyad
"""
Convert Integer to Boolean signal.

This block computes the Boolean output `y` from the Integer input `u` by the equation:

```
y = u ≥ threshold
```

where `threshold` is a parameter.
"""
component IntegerToBoolean
  "Connector of Boolean output signal"
  y = BooleanOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Connector of Integer input signal"
  u = IntegerInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Output signal y is true, if input u >= threshold"
  parameter threshold::Integer = 1
relations
  y = u >= threshold
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://BlockComponents/IntegerToBoolean.svg"}
  }
}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`Constant`](Math.IntegerToBoolean.md)

  * [`IntegerToBoolean`](Math.IntegerToBoolean.md)

  * [`IntegerToBoolean`](Math.IntegerToBoolean.md)

  * [`RealToInteger`](Math.IntegerToBoolean.md)

  * [`Sine`](Math.IntegerToBoolean.md)
