Skip to content

Boolean Instructions

Haoxi Zhan edited this page Nov 30, 2013 · 2 revisions

Boolean instructions are defined in instructions/boolean.clj. And, or, not and xor are very famous but there are several more instructions.

Type Instruction Usage input output

Boolean Calculations

boolean_and

AND

:boolean

:boolean

boolean_or

OR

:boolean

:boolean

boolean_not

NOT

:boolean

:boolean

boolean_xor

XOR

:boolean

:boolean

boolean_invert_first_then_and

(AND (NOT A) B)

:boolean

:boolean

boolean_invert_second_then_and

(AND A (NOT B)

:boolean

:boolean

Convert among types

boolean_frominteger

0 to false, other to true

:integer

:boolean

boolean_fromfloat

0.0 to false, other to true

:float

:boolean

Clone this wiki locally