Script - true and false values
Anything that doesn't encode a form of zero is considered to be true. Here's the code Bitcoin uses:

bool CastToBool(const valtype&amp; vch)
{
    for (int i = 0; i &lt; vch.size(); i++)
    {
        if (vch[i] != 0)
        {
            // Can be negative zero
            if (i == vch.size()-1 &amp;&amp; vch[i] == 0x80)
                return false;
            return true;
        }
    }
    return false;
}