Perhaps this will help. Didn't test. If I typoed something, sorry.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
int bits = 12345; // binary 0011 0000 0011 1001
// use bits to flash built-in LED on a 1-second cycle
for (int index = 0; index < 16; index++)
{
if ((bits >> index) & 1) // shift right, then mask bottom bit
{
// if bit was 1, give long flash on LED
digitalWrite(LED_BUILTIN, HIGH);
delay(900);
digitalWrite(LED_BUILTIN, LOW);
delay(100);
}
else
{
// if bit was 0, give short flash on LED
digitalWrite(LED_BUILTIN, HIGH);
delay(100);
digitalWrite(LED_BUILTIN, LOW);
delay(900);
}
}
delay(5000); wait 5 seconds, then repeat.
}