Skip to content

Boole

Boole[e] returns 0 if e is False and 1 if e is True.

Attributes[Boole] := {Listable, Protected}

Simple examples

In[1]:= Boole[True]
Out[1]= 1
In[2]:= Boole[False]
Out[2]= 0