# Thread: How many different button combinations on an NES controller?

1. ## How many different button combinations on an NES controller?

I'm working on a photoshop project regarding button states on the original NES controller and I need to calculate the total images I would need to have, to have a shot of each button combination possible.

In other words, I need to have a photo of when the left button was held down by itself, as well as when it was held down with only the "a" button, only the "b" button, etc.

There are some exceptions:

1) The d-pad can never be depressed in more than one direction.

Please tell me if there are more. The exceptions should really only be the physically impossible. They are going to be part of a larger online gaming controller that will be interactive, so I'll leave the programming to decide whether or not holding down "select" and "start" will do anything. But, the end-user should be able to do it.

So, how many combinations are there?

I'm fairly certain it involves multiplication. However, I'm not sure what to multiply. Are there any suggestions?

Thanks!

2. To find the total number of button states, you need to multiply the number of possible states for each button (which, I guess, is two for each button except for arrows). This is called the rule of product in combinatorics.

3. The d-pad, a button, and b button are all move independently.

The d-pad has 9 states (nothing, u, ul, l, dl, d, dr, r, ur).
a and b button both have 2 states (pressed, not pressed).

This is 9 x 2 x 2 = 36 combinations.