Sex assignment refers to the assigning (naming) of the biological sex at the birth of a baby. In the majority of births, a relative, midwife, or physician inspects the genitalia when the baby is delivered, sees ordinary male or female genitalia, and declares, "it's a girl" or "it's a boy" without the expectation of ambiguity. Assignment may also be done prior to birth through prenatal sex discernment. The assignment is perceived as a recognition of an essential aspect of a baby, apparent to everyone. In nearly all cases, usually without conscious deliberation, the parents rear the child as a member of the assigned sex/gender.
The act of assignment is a social act, and as in nearly all cases, and all societies, an act that is a simple recognition of a simple biological reality. The act of assignment carries the implicit expectation that future gender identity will develop in the gender of anatomy, assignment, and rearing.
In some cases, the assigned sex or one or more of these related assumptions prove to be false. In the case of some transgender individuals or intersex individuals, gender identity does not simply follow the assigned sex or sex of rearing. There have also been rare instances where parents (for a variety of reasons) have reared an anatomically typical child in the opposite gender. In some conditions usually termed intersex, internal anatomy may not be consistent with assumptions based on external anatomy.