From to the Federal (United States) Flag Code
(PUBLIC LAW 94 - 344):
Section 3 (m):
"The flag, when flown at half-staff, should be first hoisted to the peak for an instant and then lowered to the half-staff position. The flag should be again raised to the peak before it is lowered for the day. On Memorial Day the flag should be displayed at half-staff until noon only, then raised to the top of the staff.
By order of the President, the flag shall be flown at half staff upon the death of principal figures of the United States Government and the Governor of a State, territory, or possession, as a mark of respect to their memory. In the event of the death of other officials or foreign dignitaries, the flag is to be displayed at half staff according to Presidential orders, or in accordance with recognized customs or practices not inconsistent with law.
The flag shall be flown at half-staff thirty days from the death of the President or a former President; ten days from the day of death of the Vice President, the Chief Justice or a retired Chief Justice of the United States, or the Speaker of the House of Representatives; from the day of death until interment of an Associate Justice of the Supreme Court, a Secretary of an executive or military department, a former Vice President, or the Governor of a State, territory, or possession; and on the day of death and the following day for a Member of Congress."