Skip to content

Bit Manipulation

Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Bit Manipulation › Bit Manipulation

Bit Manipulation

Macros that work with the bits and bytes of numbers.

Description

The macros documented here provide access to the individual bits, bytes and words of integer values.

Byte Manipulation Macros

Gets the value of individual bytes or words of UInteger values.

Bit Manipulation Macros

Gets the state of individual bits of numeric values.

Byte Manipulation Macros

LoByte

Gets the least significant byte (LSB, or lo-byte) value of an UInteger value.

HiByte

Gets the most significant byte (MSB, or hi-byte) value of the least significant word (LSW, or lo-word) of an UInteger value.

LoWord

Gets the least significant word (LSW, or lo-word) value of an UInteger value.

HiWord

Gets the most significant word (LSW, or hi-word) value of an UInteger value.

Bit Manipulation Macros

Bit

Gets the state of an individual bit in an integer value.

BitReset

Gets the value of an integer with a specified bit cleared.

BitSet

Gets the value of an integer with a specified bit set.


Category: Bit Manipulation


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally