Name:
clearbit
Syntax:

CLEARBIT var, bit

Var - is the target variable.

Bit - is the target bit (0-7 for byte variables, 0-15 for word variables)

Description:

Clear a specific bit in the variable.

This command clears (clears to 0) a specific bit in the target variable.

Applies To:
20X2, 28X1, 28X2, 40X1, 40X2
See Also:
Related Create:
    Share:
    Print:

    Clear a bit in a byte variable

    Clear bit 0 or byte variable b6

    Code Example:
    	clearbit b6, 0
    
    Copy Code Submit an Example

    Clear a bit in a word variable

    Clear bit 15 of word variable w4

    Code Example:
    	clearbit w4, 15
    Copy Code Submit an Example

    Submit Your Own Code!

    You must be logged in to submit code examples. Login now.