Legumes contain both protein and carbohydrate. For example, most beans are about one-quarter protein and three-quarters carbohydrate. The protein makes them an especially high-quality food source for food-insecure populations, whose diets are often protein-deficient.