Simple dice

It IS true. There is a built-in constant called PORTD that writes to all eight pins simultaneously. Look at the example on the link I posted last night: & - Arduino Reference and also check this one in the reference area: Arduino Reference - Arduino Reference .

Basically, you tell the port that it's going to be an output and then you use a line like PORTD = some_binary_value.

PORTD allows you to write to all the pins. So if you wrote PORTD = B1010100 you would set pins 7, 5 and 3 high.

So you could do something as simple as:

randomSeed(analogRead(0));
value = random(1,255);
DDRD = DDRD | B11111111; //set the port to output using all pins
PORTD = value; //turns pins on and off according to value of value

Note that you cannot generate a random number between 1 and 12 because 12 is 00001100 in binary, which would only turn on pins 3 and 2. To control all the pins you need values between 0 and 255.

HEY, this is important. I didn't know this until you brought this whole thing up. I learned something really great from your question. So THANKS!