You can perform the somatic components of spells even when you have weapons or a shield in one or both hands.