Answer:
![Codes= 512](https://img.qammunity.org/2021/formulas/mathematics/college/uk7ddbab6jw83v4y1x1o042rwa2rnqg2ph.png)
Explanation:
Given
![Switches = 9](https://img.qammunity.org/2021/formulas/mathematics/college/dv5mznw5wprlf8hrko3fmw8n7cvaibqn6e.png)
------- on or off
Required
Determine the number of codes to be programmed
Since each switch has any of the on or off controls (i.e on or off), then:
The first switch can be coded in any of the 2 controls
The second switch can be coded in any of the 2 controls
The third switch can be coded in any of the 2 controls
Up till the ninth switch
So, we have that:
![Codes= 2 * 2 *2*2*2* 2 *2*2*2](https://img.qammunity.org/2021/formulas/mathematics/college/5r2dh9ocrqac75qk7py9q9zuhis11yzilc.png)
![Codes = 2^9](https://img.qammunity.org/2021/formulas/mathematics/college/7p8vo423v2iuqogjtbb03heb8twu6uavj5.png)
![Codes= 512](https://img.qammunity.org/2021/formulas/mathematics/college/uk7ddbab6jw83v4y1x1o042rwa2rnqg2ph.png)
Hence, there are 512 possible codes