The Scientist: Anthony Starpoli, M.D., a board-certified internist and gastroenterologist in New York specializing in gastrointestinal disorders.

The Answer: Beans have long had a reputation as the musical fruit (lyrical legume?), but they’re certainly not the only food that’s likely to leave you bloated and windy. Many vegetables are full of fiber and certain starches that can’t be digested as easily as simple carbs, proteins and fats—and that difference can have uncomfortable consequences.

First, there’s the matter of resistant starch, found in peas, chickpeas, beans and potatoes. Resistant starch can’t be digested in the stomach or small intestine (hence “resistant”), so it skips right through to your colon. There, the bacteria that live in your gut feed on the starch in a process called bacterial fermentation. Fermentation releases hydrogen and methane gas. Cue bloat, burps and farts.

Some people also lack the enzyme to break down raffinose, a complex sugar found in Brussels sprouts, cauliflower, broccoli, cabbage, asparagus and beans (double whammy!). Think of it like eating dairy when you’re lactose intolerant. The undigested sugar winds up in the colon, fueling gas-producing bacterial fermentation. Products like Beano help you process those foods further upstream. Cooking your vegetables also helps break them down before you even put them in your mouth (but it can reduce their nutrient value, too).

Even people who can break down raffinose may suffer from gassiness if they eat broccoli morning, noon and night. And some people’s bodies move food through their digestive systems more quickly than others’, increasing the odds that undigested food will wind up fermenting in the colon… and making you toot.

MORE ON GAS FROM YOUBEAUTY.COM

Video: The Science of GasNatural Relief for Upset StomachsAsk a Scientist: What’s Up with IBS?