Converting Bytes to Bits
Jump to navigation Jump to search
Bits are numbered from 0 to 7 and normally are read from the most significant bit(MSB = 7) to the least significant bit(LSB = 0).
- The following example shows how to convert an _UNSIGNED _BYTE(0 to 255) or INTEGER(0 to 255) value to a Binary STRING number in Qbasic.
- Notes: The above code can be adapted to place a value into a bit Array for up to 8 flag values in a single Byte.