NOR,XOR, NAND logic support added

nor , xor and nand logic functions added.
And a variable helper function as well