Usually bad breath comes from small particles of food that are stuck in your teeth, or even in your gums. These small particles may sit there for months if you don’t floss regularly, or use a product like Listerine. Your mouth is full of bacteria, you would be surprised at just how much bacteria is in your mouth. This bacteria feeds on the small particles in your mouth, just like when we eat there is a waste product, and just like us the bacteria’s waste product smells, in your case like fart.
Halitosis, term coined by Listerine, is bad breath but is easily cured with proper care in cleaning your mouth. However I’m not going to simply blame you for not brushing and flossing, you may have chronic bad breath that isn’t curable by simply flossing. There is a bacteria in your mouth called anaerobic bacteria, and it is this bacteria that is believed to cause bad breath primarily. This bacteria thrives under your tongue, remember to brush that too, and it lives in an oxygen poor, and acidic environment. You need to add oxygen to your mouth and reduce the acidity of your mouth. To do this you can use hydrogen peroxide as a mouth wash, although you need to use a very light solution, if you mix a 3% solution of hydrogen peroxide with an equal part salt water you will be adding a good amount of oxygen to kill off that horrible bacteria. Then to finish the job you want to reduce the acidity of your mouth, to do this you can use baking soda as toothpaste, mix three parts baking soda with one part salt.
This link will help you further.
http://www.qualitydentistry.com/dental/halitosis/treatment.html.