Briefly, there are 5 tax benefits of having a child dependent: Dependent exemption, child tax credit, dependent care credit, head of household, and eligible for EIC. The tax code assigns all 5 benefits to the parent who has custody more than half the time. Custody is defined as where the child sleeps at night. (If the child is on a sleep over of a camping trip etc, the day is counted toward the parent where the child would have slept if not for the event in question.)
So for the IRS there is no 50% custody, you have to count nights, and one parent will almost always have more than the other. If for some reason the # of days is exactly equal (like in a leap year, 366 days, exactly 183 nights for each parent) then the tax benefits are assigned to the parent with the higher income.
If the divorce decree says that the non-custodial parent (parent with less than 50% time) gets the dependents in a certain year, the custodial parent must fill out and sign a copy of form 8332 and give it to the other parent, this releases the tax benefits to the other parent. However, the form 8332 only transfers the dependent exemption and the child tax credit. Eligibility for Head of Household, Dependent Care Credit, and EIC always stays with the custodial parent and cannot be transferred. The only way to transfer all 5 tax benefits from one parent to the other parent is to arrange the children's sleeping schedules so that the desired parent qualifies for the particular year.
If you are the custodial parent, then in the years when you give your ex the form 8332 allowing him or her to claim the dependent exemption and child tax credit, you can still qualify for EIC, Head of Household and the Dependent Care benefit. You do this by carefully answering the questions in the dependent interview in turbotax by saying yes you have a dependent, and yes you are signing a form 8332 to allow the ex to claim the exemption. Turbotax will assign a special status to your children of "Non-dependent, EIC or Care Credit Only"