> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntblaze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Go int32

`int32` is a built-in, statically typed, signed integer data type in Go that occupies exactly 32 bits (4 bytes) of memory. It represents whole numbers using two's complement binary representation, ensuring a fixed memory footprint regardless of the underlying hardware architecture.

## Technical Specifications

* **Memory Size:** 32 bits (4 bytes)
* **Sign:** Signed (supports positive, negative, and zero)
* **Minimum Value:** `-2,147,483,648` (`math.MinInt32`)
* **Maximum Value:** `2,147,483,647` (`math.MaxInt32`)
* **Zero Value:** `0`

## Syntax and Initialization

You can declare an `int32` using standard variable declaration, short variable declaration with type conversion, or the `new` keyword.

```go theme={"dark"}
// Explicit declaration
var a int32 = 2147483647

// Declaration relying on the zero value (0)
var b int32

// Short declaration with explicit type conversion
c := int32(-1000)

// Pointer to an int32 allocated with zero value
d := new(int32)
```

## Type Strictness and Conversion

Go enforces strict typing. `int32` is treated as a distinct type from `int`, `int16`, `int64`, and `uint32`. Even on a 32-bit system where the standard `int` type is 32 bits wide, the compiler will not implicitly convert between `int` and `int32`. Explicit type conversion is mandatory for arithmetic operations or assignments involving mixed numeric types.

```go theme={"dark"}
var val32 int32 = 50
var valInt int = 100

// Invalid: mismatched types int32 and int
// result := val32 + valInt 

// Valid: explicit conversion
result := val32 + int32(valInt)
```

## The `rune` Alias

In Go, `rune` is a built-in type alias for `int32`. They are syntactically and semantically identical to the compiler. While `rune` is conventionally used to represent a Unicode code point, it is fully interchangeable with `int32` without explicit conversion.

```go theme={"dark"}
var myInt int32 = 65
var myRune rune = 'A' // 'A' is an untyped constant representing 65

// Valid: No conversion needed because rune is an alias for int32
myInt = myRune 
```

## Overflow Behavior

If an arithmetic operation exceeds the bounds of `int32`, Go silently wraps around using two's complement arithmetic. It does not panic or throw an exception at runtime.

```go theme={"dark"}
var max int32 = 2147483647 // math.MaxInt32
max = max + 1              // Wraps around to -2147483648 (math.MinInt32)
```

*(Note: Constant expressions evaluated at compile-time will trigger a compiler error if they overflow `int32` bounds; wrap-around only occurs at runtime.)*

<div
  style={{ 
display: "flex", 
justifyContent: "space-between", 
alignItems: "center", 
maxWidth: "754px", 
padding: "1rem 0",
marginBottom: "24px"
}}
>
  <span style={{ fontWeight: "bold", fontSize: "1.25rem", color: "var(--tw-prose-headings)", fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif" }}>Tired of Poor Go Skills? Fix That With Deep Grasping!</span>

  <a
    href="https://syntblaze.com"
    target="_blank"
    style={{ 
  marginLeft: "24px",
  textDecoration: "none", 
  backgroundColor: "#007AFF",
  color: "#ffffff", 
  padding: "6px 16px", 
  borderRadius: "16px",
  fontSize: "0.9rem",
  fontWeight: "600",
  textAlign: "center",
  transition: "background-color 0.2s ease"
}}
  >
    Learn More
  </a>
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/skill-tracking.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=b9b0305c93bb501c9e767b5c76c88835" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/skill-tracking.png" />

  <img src="https://mintcdn.com/syntblazellc/23tyuOzaWS88qFlc/images/nuggets.png?fit=max&auto=format&n=23tyuOzaWS88qFlc&q=85&s=c86c80197299762989e9b882419b2109" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/nuggets.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/bite-sized-exercises.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=a65f9a38c37ff28ab73ed783c53c60e3" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/bite-sized-exercises.png" />
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap", marginTop: "12px" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/mastery-chain.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=748a1763454713e679260fbb95f154a2" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/mastery-chain.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-previews.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=242f61448ff5dd6deaaab2dccc13b507" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-previews.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-explanations.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=cf0fc1c31f9cd0fc26716781be05fbc9" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-explanations.png" />
</div>
