Thai researchers have developed optode membranes that incorporate tetramethoxyethylester calixarene or valinomycin. These recognize sodium or potassium ions, respectively. Embedding the membranes with different types of chromoionophores in a plasticized poly(vinyl chloride) (PVC) matrix yields chemical logic gates that undergo competitive ion exchange where the chemical “input” would be protons or sodium/potassium ions. The presence of different ions changes the membrane’s optical response, which is the logic “output”. Different setups duplicate different logical functions, such as NAND, NOR, OR.