New functions: S, R, Sg0, Sg1, sg0, and sg1