BitTest – Test the value of a bit

BitTest – Test the value of a bit

' Test the value of a bit'' NOTE: requires Power2()Function BitTest(ByVal value As Long, ByVal bit As Long) As Boolean    ' simply AND with the bit mask    ' Range checking is performed in Power2()    BitTest = (value And Power2(bit))End Function


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist