oh well...ive been had
First what really elects a president is an electoral college, not popular vote.
The executive Power shall be vested in a President of the United States of America. He shall hold his Office during the Term of four Years, and, together with the Vice President, chosen for the same Term, be elected, as follows:
Each State shall appoint, in such Manner as the Legislature thereof may direct, a Number of Electors, equal to the whole Number of Senators and Representatives to which the State may be entitled in the Congress: but no Senator or Representative, or Person holding an Office of Trust or Profit under the United States, shall be appointed an Elector.
The Electors shall meet in their respective States, and vote by Ballot for two Persons, of whom one at least shall not be an Inhabitant of the same State with themselves. And they shall make a List of all the Persons voted for, and of the Number of Votes for each; which List they shall sign and certify, and transmit sealed to the Seat of the Government of the United States, directed to the President of the Senate. The President of the Senate shall, in the Presence of the Senate and House of Representatives, open all the Certificates, and the Votes shall then be counted. The Person having the greatest Number of Votes shall be the President, if such Number be a Majority of the whole Number of Electors appointed; and if there be more than one who have such Majority, and have an equal Number of Votes, then the House of Representatives shall immediately chuse by Ballot one of them for President; and if no Person have a Majority, then from the five highest on the List the said House shall in like Manner chuse the President. But in chusing the President, the Votes shall be taken by States, the Representation from each State having one Vote; A quorum for this purpose shall consist of a Member or Members from two thirds of the States, and a Majority of all the States shall be necessary to a Choice. In every Case, after the Choice of the President, the Person having the greatest Number of Votes of the Electors shall be the Vice President. But if there should remain two or more who have equal Votes, the Senate shall chuse from them by Ballot the Vice President.
The Congress may determine the Time of chusing the Electors, and the Day on which they shall give their Votes; which Day shall be the same throughout the United States.
Then it gets worse...sort of
The Electoral College was established by the founding fathers as a compromise between election of the president by Congress and election by popular vote. The electors are a popularly elected body chosen by the States and the District of Columbia on the Tuesday after the first Monday in November (November 2, 2004). (This is when we tell the our electors who we want) The Electoral College consists of 538 electors (one for each of 435 members of the House of Representatives and 100 Senators; and 3 for the District of Columbia by virtue of the 23rd Amendment). Each State's allotment of electors is equal to the number of House members to which it is entitled plus two Senators. The decennial census is used to reapportion the number of electors allocated among the States.
The slates of electors are generally chosen by the political parties. State laws vary on the appointment of electors. The States prepare a list of the slate of electors for the candidate who receives the most popular votes on a Certificate of Ascertainment. The Governor of each State prepares seven original Certificates of Ascertainment. The States send one original, along with two authenticated copies or two additional originals to the Archivist of the United States at the National Archives and Records Administration (NARA) by registered mail. The Certificates of Ascertainment must be submitted as soon as practicable, but no later than the day after the meetings of the electors, which occur on the first Monday after the second Wednesday in December (December 13, 2004). The Archivist transmits the originals to NARA's Office of the Federal Register (OFR). The OFR forwards one copy to each House of Congress and retains the original.
The electors meet in each State on the first Monday after the second Wednesday in December (This when they actually elect a president)(December 13, 2004). A majority of 270 electoral votes is required to elect the President and Vice President. No Constitutional provision or Federal law requires electors to vote in accordance with the popular vote in their State.
The electors prepare six original Certificates of Vote and annex a Certificate of Ascertainment to each one. Each Certificate of Vote lists all persons voted for as President and the number of electors voting for each person and separately lists all persons voted for as Vice President and the number of electors voting for each person.
If no presidential candidate wins a majority of electoral votes, the 12th Amendment to the Constitution provides for the presidential election to be decided by the House of Representatives. The House would select the President by majority vote, choosing from the three candidates who received the greatest number of electoral votes. The vote would be taken by State, with each State delegation having one vote. If no Vice Presidential candidate wins a majority of electoral votes, the Senate would select the Vice President by majority vote, with each Senator choosing from the two candidates who received the greatest number of electoral votes.
This is very very complicated to be sure.