// Setup the digits array
g_digits [0] = 1 + 2 + 4 + 8 + 16 + 32 + 00;
g_digits [1] = 0 + 2 + 4 + 0 + 00 + 00 + 00;
g_digits [2] = 1 + 2 + 0 + 8 + 16 + 00 + 64;
g_digits [3] = 1 + 2 + 4 + 8 + 00 + 00 + 64;
g_digits [4] = 0 + 2 + 4 + 0 + 00 + 32 + 64;
g_digits [5] = 1 + 0 + 4 + 8 + 00 + 32 + 64;
g_digits [6] = 1 + 0 + 4 + 8 + 16 + 32 + 64;
g_digits [7] = 1 + 2 + 4 + 0 + 00 + 00 + 00;
g_digits [8] = 1 + 2 + 4 + 8 + 16 + 32 + 64;
g_digits [9] = 1 + 2 + 4 + 8 + 00 + 32 + 64;
I see you are setting bits in those variables. It is good you know about bits, but that is the long way to type.
Numbers can be decimal as you have above. They can also be written as binary, all 1 or 0. Binary numbers begin with 0b to tell the compiler it is binary, not decimal. There is also hexadecimal, known as hex, which is base 16. Hex numbers are 0 1 2 3 4 5 6 7 8 9 A B C D E F.
If you have Windows, the calculator can be switched to scientific mode and will let you use and see hex and binary as well as decimal.
Decimal 7, writes as 7 equal binary 111, writes in code as 0b111. But like decimal, large to small is left to right.
g_digits [9] = 1 + 2 + 4 + 8 + 00 + 32 + 64;
Using binary makes the same code but easier to write and read
g_digits [9] = 0b1101111;
When you read the binary from left to right the above is 64 + 32 + 8 + 4 + 2 + 1 or 2^6 + 2^5 + 2^3 + 2^2 + 2^1 + 2^0.
Arduino C++ has bit functions to make it even easier/more clear. Check into bitRead(), bitWrite() and the others.
Good luck, I know something of trying to use other language than my own from long ago in school. And you are trying for learning technical matters, which is even harder. You have brains and guts!