The Phase of the guided light is a fundamental and important property to control and operate a photonic integrated circuit (PIC). Silicon photonic PICs provide potential for low-cost, scalable solutions to a myriad of applications such as optical logic, optical communications and routing. This thesis presents a theoretical and experimental demonstration of controlling an on-chip optical phased array (OPA) - a photonic device for optical beamforming and beam steering. This thesis also presents a work on optical logic architectures where two different phase control schemes are applied on the same device. Finally, optical routing architectures are proposed that has ultracompact photonic switches as the building block. All these devices fall under the umbrella of programmable PICs and this thesis is focused on the design and control of programmable PICS for various applications.