When a diploid karyotype contains two differentiated sex chromosomes, the sex containing one of each type is the heterogametic sex. In humans, males are heterogametic (XY) and females homogametic (XX).