In Drosophila, sex is determined by the X:A ratio. One major numerator element on the X chromosome is sisterless-b (sis-b), also called scute, which encodes an HLH-type transcription factor. We report here that an essential pan-neural gene, the autosomal HLH gene deadpan (dpn), acts as a denominator element. As revealed by dosage-dependent dominant interactions, males die with too high a ratio of sc+ to dpn+, caused by misexpression of Sex lethal (Sxl) in embryos, and females die with too low a ratio of sc+ to dpn+, because of altered embryonic Sxl expression. In addition, we found that the HLH gene extramacrochaetae (emc), like daughterless (da), is needed maternally for proper communication of the X:A ratio, thus supporting the idea that a set of HLH genes comprises a functional cassette that makes a sensitive and stable genetic switch used in both neural determination and sex determination.