that was decided during the council of trent. many cardinals and bishops argued over this, it was a month long symposium. The countryside was sorely taxed, taking care of the personal needs of these great men. Several were executed in the process but in the end, nodding came to mean "yes" and the side to side motion came to mean "no".
The extent of conviction was indicated by the vigorousness of the movement. If someone asked you if you wanted cream in your coffee, and you did, you were supposed to bob your head up and down rapidly, even VIOLENTLY at least eight times.