---
title: "Integer32"
language: "en"
type: "Compiled Type"
summary: "Integer32 represents a 32-bit machine integer atomic type specifier."
canonical_url: "https://reference.wolfram.com/language/ref/compiledtype/Integer32.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Compiled Types"
    link: "https://reference.wolfram.com/language/guide/CompiledTypes.en.md"
  - 
    title: "Code Compilation"
    link: "https://reference.wolfram.com/language/guide/CodeCompilation.en.md"
related_tutorials: 
  - 
    title: "Wolfram Compiler Manual"
    link: "https://reference.wolfram.com/language/CompilerManual/tutorial/Overview.en.md"
---
# "Integer32" (Compiled Type)

"Integer32" represents a 32-bit machine integer atomic type specifier.

## Details

* ``"Integer32"`` can be used in ``Typed`` and related constructs to specify a type.

---

## Properties

* Values held by ``"Integer32"`` range from ``-2^31`` to ``2^31 - 1``.

## Conversions

From Expressions

* Suitably sized ``Integer`` expressions can be converted into compiled code elements with the type ``"Integer32"``.

To Expressions

* ``"Integer32"`` compiled elements can be converted into ``Integer`` expressions.

Arithmetic

* ``"Integer32"`` compiled elements are automatically promoted to real or complex elements when they are combined in binary arithmetic operations.

* Compiled elements with types smaller than ``"Integer32"`` are automatically promoted to ``"Integer32"`` when they are combined in binary arithmetic operations.

* ``"Integer32"`` compiled elements are automatically promoted to larger integral elements when they are combined in binary arithmetic operations.

* ``"Integer32"`` compiled elements are automatically promoted to ``"UnsignedInteger32"`` elements when they are combined in binary arithmetic operations.

## Runtime Errors

Overflow

* ``"Integer32"`` can give a runtime error if it is used in an operation that overflows.

---

## Examples (3)

### Basic Examples (3)

``"Integer32"`` can be used as an input and output from a ``CompiledCodeFunction`` :

```wl
In[1]:= cf = FunctionCompile[Function[Typed[arg, "Integer32"], arg]]

Out[1]=
HoldForm[CompiledCodeFunction][
 Association["Signature" -> TypeSpecifier[{"Integer32"} -> "Integer32"], 
  "Input" -> Function[Typed[arg, "Integer32"], arg], "ErrorFunction" -> Automatic, 
  "orcInstance" -> 140551061635584, "orcModuleId" -> 0, "targetMachineId" -> 140551083935168], 
 5088034792]

In[2]:= cf[ 100]

Out[2]= 100
```

---

An overflow causes an error while running the function. The computation is terminated, a message is issued and the Wolfram Engine is used to compute the result:

```wl
In[1]:=
cf = FunctionCompile[Function[Typed[arg, "Integer32"], arg ^ arg]];
cf[2^4]
```

CompiledCodeFunction::uncomp: A compiled code runtime error occurred; reverting to uncompiled evaluation: IntegerOverflow.

```wl
Out[1]= 18446744073709551616
```

---

The ``"Integer32"`` argument is automatically promoted when combined with a real number:

```wl
In[1]:=
cf = FunctionCompile[Function[{Typed[arg1, "Integer32"], Typed[arg2, "Real64"]}, arg1 + arg2]];
Information[cf, "Signature"]

Out[1]= {"Integer32", "Real64"} -> "Real64"
```

When an ``"Integer32"`` argument is combined with an integer of a smaller storage size, the smaller type is automatically promoted:

```wl
In[2]:=
cf = FunctionCompile[Function[{Typed[arg1, "Integer32"], Typed[arg2, "Integer8"]}, arg1 + arg2]];
Information[cf, "Signature"]

Out[2]= {"Integer32", "Integer8"} -> "Integer32"
```

The ``"Integer32"`` argument is automatically promoted when combined with an integer of a larger storage size:

```wl
In[3]:=
cf = FunctionCompile[Function[{Typed[arg1, "Integer32"], Typed[arg2, "Integer64"]}, arg1 + arg2]];
Information[cf, "Signature"]

Out[3]= {"Integer32", "Integer64"} -> "Integer64"
```

The ``"Integer32"`` argument is automatically promoted when combined with an unsigned integer of the same storage size:

```wl
In[4]:=
cf = FunctionCompile[Function[{Typed[arg1, "Integer32"], Typed[arg2, "UnsignedInteger32"]}, arg1 + arg2]];
Information[cf, "Signature"]

Out[4]= {"Integer32", "UnsignedInteger32"} -> "UnsignedInteger32"
```

## See Also

* [`Integer`](https://reference.wolfram.com/language/ref/Integer.en.md)
* [`Typed`](https://reference.wolfram.com/language/ref/Typed.en.md)
* [`TypeSpecifier`](https://reference.wolfram.com/language/ref/TypeSpecifier.en.md)
* [`FunctionCompile`](https://reference.wolfram.com/language/ref/FunctionCompile.en.md)
* [`MachineInteger`](https://reference.wolfram.com/language/ref/compiledtype/MachineInteger.en.md)
* [`UnsignedInteger32`](https://reference.wolfram.com/language/ref/compiledtype/UnsignedInteger32.en.md)
* [`Integer64`](https://reference.wolfram.com/language/ref/compiledtype/Integer64.en.md)
* [`UnsignedInteger64`](https://reference.wolfram.com/language/ref/compiledtype/UnsignedInteger64.en.md)
* [`Real64`](https://reference.wolfram.com/language/ref/compiledtype/Real64.en.md)
* [`ComplexReal64`](https://reference.wolfram.com/language/ref/compiledtype/ComplexReal64.en.md)

## Tech Notes

* [Wolfram Compiler Manual](https://reference.wolfram.com/language/CompilerManual/tutorial/Overview.en.md)

## Related Guides

* [Compiled Types](https://reference.wolfram.com/language/guide/CompiledTypes.en.md)
* [Code Compilation](https://reference.wolfram.com/language/guide/CodeCompilation.en.md)

## History

* [Introduced in 2019 (12.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn120.en.md)