---
title: bitWidth
framework: swift
role: symbol
role_heading: Type Property
path: swift/uint128/bitwidth
---

# bitWidth

The number of bits used for the underlying binary representation of values of this type.

## Declaration

```swift
static var bitWidth: Int { get }
```

## Discussion

Discussion An unsigned, fixed-width integer type can represent values from 0 through (2 ** bitWidth) - 1, where ** is exponentiation. A signed, fixed-width integer type can represent values from -(2 ** (bitWidth - 1)) through (2 ** (bitWidth - 1)) - 1. For example, the Int8 type has a bitWidth value of 8 and can store any integer in the range -128...127.
