The test works by detecting tiny bits of fetal DNA floating through an expectant mom's bloodstream. In particular, the test looks for little fragments of a Y chromosome, which only males have. Some Y chromosome DNA in the blood sample means it's a boy; none means it's a girl.