Describe the semiconductor behaviour of the p-n junctions for bipolar transistor or triac switching devices.