# Optics

Index of Refraction Define refractive index $n$ $$n = \frac{c}{v} > 1 \to v = \frac{c}{n}$$ The higher the refractive index, the slower the light in the medium Optical Path Length (OPL) OPL = geometric length of the path of light $\times$ refractive index Snell’s Law (Law of Refraction) $$n_1 \sin \theta_1 = n_2 \sin \theta_2$$ Total Internal Reflection  n_1 \sin \theta_c = n_2 \sin \frac{\pi}{2} = n_2 \\

# PMOS & NMOS

During CMOS (Complementary metal–oxide–semiconductor), there are 2 kinds of MOS transistors, which can be modeled as a 3-terminal device that acts like a voltage-controlled resistance. Normally, when we increase the voltage of the gate, PMOS will close while NMOS will open. Therefore, we can use a series of PMOS and NMOS to build a CMOS inverter. From inverter, we could build basic NAND gate and NOR gate. Generally, to build a NAND gate, we could put PMOS in parallel and NMOS in series That is because when PMOS in parallel, only when both the input of Q1 and Q2 are closed (which means both A and B are in H), the output will be closed (L).