<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "P256K",
  "identifier" : "/documentation/P256K/UInt256/init(bitPattern:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "P256K"
    ],
    "preciseIdentifier" : "s:5P256K7UInt256V10bitPatternAcA6Int256V_tcfc"
  },
  "title" : "init(bitPattern:)"
}
-->

# init(bitPattern:)

Creates a `UInt256` with the same bit pattern as a signed [`Int256`](/documentation/P256K/Int256) value.

```
init(bitPattern source: Int256)
```

## Parameters

`source`

The signed value whose bits are reinterpreted.

## Discussion

Preserves the raw 256 bits verbatim; negative `Int256` values become large
unsigned values via two’s-complement interpretation. Matches the Swift
standard-library convention (e.g. `UInt64(bitPattern: Int64)`).