1. A memory device for performing logical operations on two or more input variables, the memory device comprising: a match line; a first memory cell coupled to the match line and including a first and second memory element, each memory element being coupled to a particular logical product of the a first input variable and a second input variable; and a second memory cell coupled to the match line and including a third and fourth memory element, each memory element being coupled to a particular logical product of the first input variable and the second input variable; wherein the first, second, third and fourth memory elements may have either a first value or a second value programmed therein and wherein the first, second, third and fourth memory elements are programmed to either the high or low resistive values based on a particular logic function to be performed.