|
SwapBit | ||
Result = SwapBit(Value, BitNo) | ||
Parameters: Value = An integer value BitNo = The bit you want to swap (0 = least significant bit) |
||
Returns: Result |
||
SwapBit swaps a specified bit of a given value, ie. if the bit is set(1) SwapBit clears it, if the bit is cleared SwapBit sets it. Bits range between 0 and 31. Where 0 is the least significant bit (LSB), 31 is the most significant bit (MSB). Mini Tutorial: Showing the effect of SwapBit
This example would output.
|
Related Info: | And | ClearBit | Or | SetBit | TestBit | Xor : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |