# _Bits
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L1)</span>
```pony
primitive val _Bits
```

## Constructors

### create
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L1)</span>


```pony
new val create()
: _Bits val^
```

#### Returns

* [_Bits](collections-persistent-_Bits) val^

---

## Public Functions

### set_bit
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L2)</span>


```pony
fun box set_bit(
  bm: U32 val,
  i: U32 val)
: U32 val
```
#### Parameters

*   bm: [U32](builtin-U32) val
*   i: [U32](builtin-U32) val

#### Returns

* [U32](builtin-U32) val

---

### clear_bit
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L5)</span>


```pony
fun box clear_bit(
  bm: U32 val,
  i: U32 val)
: U32 val
```
#### Parameters

*   bm: [U32](builtin-U32) val
*   i: [U32](builtin-U32) val

#### Returns

* [U32](builtin-U32) val

---

### has_bit
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L8)</span>


```pony
fun box has_bit(
  bm: U32 val,
  i: U32 val)
: Bool val
```
#### Parameters

*   bm: [U32](builtin-U32) val
*   i: [U32](builtin-U32) val

#### Returns

* [Bool](builtin-Bool) val

---

### mask
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L11)</span>


```pony
fun box mask(
  n: USize val,
  d: USize val)
: USize val
```
#### Parameters

*   n: [USize](builtin-USize) val
*   d: [USize](builtin-USize) val

#### Returns

* [USize](builtin-USize) val

---

### next_pow32
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L14)</span>


```pony
fun box next_pow32(
  n: USize val)
: USize val
```
#### Parameters

*   n: [USize](builtin-USize) val

#### Returns

* [USize](builtin-USize) val

---

### eq
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L2)</span>


```pony
fun box eq(
  that: _Bits val)
: Bool val
```
#### Parameters

*   that: [_Bits](collections-persistent-_Bits) val

#### Returns

* [Bool](builtin-Bool) val

---

### ne
<span class="source-link">[[Source]](src/collections-persistent/_bits.md#L2)</span>


```pony
fun box ne(
  that: _Bits val)
: Bool val
```
#### Parameters

*   that: [_Bits](collections-persistent-_Bits) val

#### Returns

* [Bool](builtin-Bool) val

---

