contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
operator   complement    
    Related Concepts  

Summary   Numeric

A bit sequence.

 

Syntax

  complement numeric-expression


Purpose

The complement of two bit sequences is a new sequence where each bit is "flipped". In other words, each bit is:

For example, the complement of 0 is "111111111111111111111111111111111111" base 2. (This actually results in a negative number on most systems because the topmost bit is a sign bit. A "1" in this position usually indicates a negative number. This is one reason to avoid dealing with numeric expressions as both bit sequences and numbers at the same time.)

Other languages sometimes refer to this operator as a "bit-wise not" because the operation is analogous to the logical "not" operation. To avoid confusion, OmniMark reserves the operator "!" (not) for the logical "not" operation.

Usage example:

  set c to complement 1

  set c to c mask complement 1

      Related Concepts
   Bit-oriented arithmetic
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:02 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.