Using neurons to build logical functions