In this study, an azo-Schiff base ligand was synthesized and then investigated using different analyses. The synthesized ligand as a colorimetric chemosensor was able to detect CN– and Ni2+ based upon the color changes from colorless to yellow. The limit of detection (LOD) for CN– and Ni2+ was determined at 2.19 × 10-6 M and 7.14 × 10-7 M, respectively. By DFT method, the boundary orbitals and energy gaps between them were determined. Using the TD-DFT method, the electronic transitions in the DMSO solvent were then simulated, which agreed with the experimental findings. This ligand revealed antibacterial activity against Staphylococcus aureus bacteria. Practically, this chemosensor functioned as a colorimetric test strip for Ni2+. Furthermore, chemosensor L was applied to detect CN– in apple seeds. By applying CN− (input 1) and Ni2+ (input 2) as chemical inputs and the absorption intensity signal as outputs at particular wavelengths of the chemosensor L, various logic functions such as (AND, OR, XNOR, NOR, INHIBT, IMPLICATION and XOR) were constructed. The chemosensor L could function as a half-subtractror by utilizing optical inputs. The complementary OR/NOR, IMP/INH and XOR/XNOR circuits were elaborated by employing two inputs.