Thanks for your question.
During a division, members of parliament move to either side of the Presiding Officer's chair to show how they are voting. Senators and members of the House of Representatives on either side of the President of the Senate's or Speaker of the House of Representatives' chair are counted and the results are recorded.
The doors are locked so that there is no confusion during the count caused by senators or members entering or leaving the room. Those who are in the room are counted; those who are locked out are not counted.
Discover more information about voting in the chambers with this fact sheet.