band, bnot, bor, bxor

band, bnot, bor, bxor --  perform bitwise operations.

Syntax

band (number, number)
bnot (number)
bor (number, number)
bxor (number, number)

		

Arguments

number

Any number. Non-numbers are treated as zero.

Returns

An integer which is the result of the particular operation.

Description

The binary operations cast their arguments to integers, and then perform bitwise operations to produce an integer result.

Example

    Gamma> band(7,5);
    5
    Gamma> bnot(7);
    -8
    Gamma> bor(7,5);
    7
    Gamma> bxor(7,5);
    2
    Gamma> 
    		

See Also

Bitwise Operators

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.