Source: https://www.pitt.edu/~kmram/1192-2192/lectures/CMOSCircuits.pdf