<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 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" : "Swift",
  "identifier" : "/documentation/Swift/UInt8/decodeAtomicRepresentation(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s5UInt8V15SynchronizationE26decodeAtomicRepresentationyAbC18_Atomic8BitStorageVnFZ"
  },
  "title" : "decodeAtomicRepresentation(_:)"
}
-->

# decodeAtomicRepresentation(_:)

Recovers the logical atomic type `Self` by destroying some
`AtomicRepresentation` storage instance returned from an atomic operation.

```
static func decodeAtomicRepresentation(_ representation: consuming UInt8.AtomicRepresentation) -> UInt8
```

## Return Value

The newly decoded logical type `Self`.

## Discussion> Note: This is not an atomic operation. This simply decodes the storage
> representation used in atomic operations back into the logical type for
> normal use, `Self`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)