There is a short window in time that it is possible to test HIV negative and still be HIV infected. When HIV initially infects the body, your immune system begins to develop antibodies to the virus. It is those antibodies that HIV tests look for when you get tested. However,it takes some time for enough of those antibodies to be produced for an HIV test to detect. Therefore if enough have not been produced when you are tested, the test can be negative when in fact you have been infected. Keep in mind that during this window, HIV can be transmitted from one person to another. Safer sex practices must be employed.
Because of this window in time, experts suggest a series of HIV tests; one when you believe you have been exposed; one 6 weeks after exposure; and finally one 3 months after exposure. If you have a negative test after 3 months you can assume you have not been infected.