Simple dice

The binary stuff. If you have eight LEDs, you can represent each one as on and off with a 1 or 0. So imagine a line like this:

1 1 1 1 0 0 0 0

representing LED8 LED7 LED6 LED5 LED4 LED3 LED2 LED1.

So the 11110000 would mean that LED8, LED7, LED6 and LED5 are on and 4 3 2 1 are off. In decimal, 1111000 is equal to 240. You could therefore represent any combination of LEDs on and off with one 8-bit integer (from 0 to 255). Then just mask each bit to find out if that LED is on or off.

I did a search on "Arduino binary" and came up with this link:

So it's even easier than I thought. With basically one command, you can write to all the LEDs at once. No if/else, no arrays, no cases.