Nature of Logic and Perception