Logical functions (IF, AND, OR)