Use Logical AND to Determine Which Bits Are Set in an Integer (32730)
The information in this article applies to:
- Microsoft Visual Basic for MS-DOS
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
- Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0
- Microsoft GW-Basic Interpreter 3.20
- Microsoft GW-Basic Interpreter 3.20 and later
This article was previously published under Q32730 SUMMARY
The logical AND operator can be used in Basic to determine which
bits are set. For example, the program below determines whether a bit
has been set in the High or Low byte of a 2-byte integer variable.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB32730 |
---|
|