I have 4 variables "L S K B", any or all of which may either be "on" or "off". I need to get all possible on/off combinations . . . "- S K B", "L - K B", "L - - B", "L - - -", etc.

Is there a formula for determining this for different numbers of variables?