---
title: trailingZeroBitCount
framework: swift
role: symbol
role_heading: Instance Property
path: swift/uint8/trailingzerobitcount
---

# trailingZeroBitCount

The number of trailing zeros in this value’s binary representation.

## Declaration

```swift
var trailingZeroBitCount: Int { get }
```

## Discussion

Discussion For example, in a fixed-width integer type with a bitWidth value of 8, the number -8 has three trailing zeros. let x = Int8(bitPattern: 0b1111_1000) // x == -8 // x.trailingZeroBitCount == 3 If the value is zero, then trailingZeroBitCount is equal to bitWidth.
