Decode a 7-segment display You probably all know the 7-segment display which can display among other things all digits from \$0\dots 9\$:



Challenge

We only consider the segments \$\texttt{A}\dots\texttt{G}\$, your task is to decode a single digit given which segments are turned on.

This can be encoded as an 8-bit integer, here's a table of each digit with their binary representation and the corresponding little-endian and big-endian values:

$$
\begin{array}{c|c|rr|rr}
\text{Digit} &amp; \texttt{.ABCDEFG} &amp; \text{Little-endian} &amp;&amp; \text{Big-endian} &amp; \\ \hline
0 &amp; \texttt{01111110} &amp; 126 &amp; \texttt{0x7E} &amp; 126 &amp; \texttt{0x7E} \\
1 &amp; \texttt{00110000} &amp;  48 &amp; \texttt{0x30} &amp;  12 &amp; \texttt{0x0C} \\
2 &amp; \texttt{01101101} &amp; 109 &amp; \texttt{0x6D} &amp; 182 &amp; \texttt{0xB6} \\
3 &amp; \texttt{01111001} &amp; 121 &amp; \texttt{0x79} &amp; 158 &amp; \texttt{0x9E} \\
4 &amp; \texttt{00110011} &amp;  51 &amp; \texttt{0x33} &amp; 204 &amp; \texttt{0xCC} \\
5 &amp; \texttt{01011011} &amp;  91 &amp; \texttt{0x5B} &amp; 218 &amp; \texttt{0xDA} \\
6 &amp; \texttt{01011111} &amp;  95 &amp; \texttt{0x5F} &amp; 250 &amp; \texttt{0xFA} \\
7 &amp; \texttt{01110000} &amp; 112 &amp; \texttt{0x70} &amp;  14 &amp; \texttt{0x0E} \\
8 &amp; \texttt{01111111} &amp; 127 &amp; \texttt{0x7F} &amp; 254 &amp; \texttt{0xFE} \\
9 &amp; \texttt{01111011} &amp; 123 &amp; \texttt{0x7B} &amp; 222 &amp; \texttt{0xDE} 
\end{array}
$$

Rules &amp; I/O


Input will be one of


single integer (like in the table above one of the two given orders)
a list/array/.. of bits
a string consisting of characters ABCDEFG (you may assume it's sorted, as an example ABC encodes \$7\$), their case is your choice (not mixed-case)

Output will be the digit it encodes
You may assume no invalid inputs (invalid means that there is no corresponding digit)


Tests

Since this challenge allows multiple representations, please refer to the table.
JavaScript (ES6), 26 bytes
Takes input in little Endian.

n=&gt;'0958634172'[n*3%77%10]

Try it online!