How to calculate the number of states of a 7-segment LCD?

350 Views Asked by At

A 7-segment LCD display can display a number of 128 states.
The following image shows the 16x8-grid with all the possible states:

enter image description here

How can you calculate the number of states?

2

There are 2 best solutions below

3
On

The combinations of segments can be calculated with the binomial coefficient:

$$ _nC_k=\binom nk=\frac{n!}{k!(n-k)!} $$
I came across this problem evaluating the different number of segments lightened:

No segment $= 1$
One segment $= \binom 71 = \frac{7!}{1!(6)!} = 7$
Two segments $= \binom 72 = \frac{7!}{2!(5)!} = 21$
Three segments $= \binom 73 = \frac{7!}{3!(4)!} = 35$
Four segments $= \binom 74 = \frac{7!}{4!(3)!} = 35$
Five segments $= \binom 75 = \frac{7!}{5!(2)!} = 21$
Six segments $= \binom 76 = \frac{7!}{6!(1)!} = 7$
Seven segments $= 1$

Number of states = 1+7+21+35+35+21+7+1 = 128

1
On

There are $7$ segments and so the number is $2^7=128$.