and

Group: logic

Calculates Boolean "and" of two values.

Syntax

    (0)     and r0 r1 r2
    

Semantics

Calculates Boolean "and" of operands from Rhs and Lhs, and stores the result in Output. Operands in Lhs and Rhs do not have to be Boolean values and can be values of any type.

Exceptions

This instruction does not raise any extra exceptions.

Examples

.function: example/0
    izero %1 local      -- zero is considered false
    istore %2 local 1   -- one is considered true

    -- local register 3 now contains false value
    and %3 local %1 local %2 local

    return
.end
    

Related instructions

or, not.