Buildings used in whole or in part as a home or residence of a single family or person and every building used in whole or in part as a home or residence of two or more persons or families living in separate apartments and all premises, either residential or nonresidential, shall conform to the requirements of this code.