[#BloombergLP-bdlb-BitUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::BitUtil
:relfileprefix: ../../
:mrdocs:

This utility `struct` provides a namespace for a set of bit&hyphen;level, stateless functions that operate on the built&hyphen;in 32&hyphen; and 64&hyphen;bit unsigned integer types&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;bitutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct BitUtil;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/BitUtil/uint32_t.adoc[`uint32&lowbar;t`] 
| Alias for `bsl&colon;&colon;uint32&lowbar;t` provided for older toolchains&period;
| xref:BloombergLP/bdlb/BitUtil/uint64_t.adoc[`uint64&lowbar;t`] 
| Alias for `bsl&colon;&colon;uint64&lowbar;t` provided for older toolchains&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/BitUtil/isBitSet-06.adoc[`isBitSet`] 
| `isBitSet` overloads
| xref:BloombergLP/bdlb/BitUtil/log2-01.adoc[`log2`] 
| `log2` overloads
| xref:BloombergLP/bdlb/BitUtil/numBitsSet-0f.adoc[`numBitsSet`] 
| `numBitsSet` overloads
| xref:BloombergLP/bdlb/BitUtil/numLeadingUnsetBits-0c.adoc[`numLeadingUnsetBits`] 
| `numLeadingUnsetBits` overloads
| xref:BloombergLP/bdlb/BitUtil/numTrailingUnsetBits-03.adoc[`numTrailingUnsetBits`] 
| `numTrailingUnsetBits` overloads
| xref:BloombergLP/bdlb/BitUtil/roundUp-06.adoc[`roundUp`] 
| `roundUp` overloads
| xref:BloombergLP/bdlb/BitUtil/roundUpToBinaryPower-0d.adoc[`roundUpToBinaryPower`] 
| `roundUpToBinaryPower` overloads
| xref:BloombergLP/bdlb/BitUtil/sizeInBits.adoc[`sizeInBits`] 
| Return the number of bits in the specified `value` of the (template parameter) type `INTEGER`&period;
| xref:BloombergLP/bdlb/BitUtil/withBitCleared-09.adoc[`withBitCleared`] 
| `withBitCleared` overloads
| xref:BloombergLP/bdlb/BitUtil/withBitSet-0f.adoc[`withBitSet`] 
| `withBitSet` overloads
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
