“…In this work, we have utilized our previously reported terpyridyl-imidazole system (tpy-HImzPh 3 ) ( Bhaumik et al, 2011 ), wherein a terpyridine moiety capable of coordinating with several bivalent 3d metals is covalently coupled with a triphenyl-imidazole motif capable of interacting with selected anions ( Chart 1 ) ( Bhaumik et al, 2011 ; Karmakar et al, 2014 ; Mondal et al, 2017 ; Karmakar et al, 2015a ; Mukherjee et al, 2021 ). Using its absorption and emission spectral responses as a function of a specific set of cations and anions, multiple Boolean logic (BL) functions such as combinatorial logic of AND, OR, and NOT gates ( Omana et al, 2003 ; Zhang et al, 2015 ; Magri and Spiteri, 2017 ; Goldsworthy et al, 2018 ) and molecular level keypad lock are demonstrated ( Margulies et al, 2007 ; Strack et al, 2008 ; Andrasson et al, 2009 ; Kumar et al, 2009 ; Bhalla and Kumar, 2012 ; Zou et al, 2012 ; Jiang and Ng, 2014 ; Carvalho et al, 2015 ; Chen et al, 2015 ; Karmakar et al, 2015b ; Mondal et al, 2015 ).…”