// https://wokwi.com/projects/389676427778338817
// https://forum.arduino.cc/t/4-bit-variable-to-4-different-pins/1223620

int yourPin[4] = {4, 6, 8, 9};

void setup() {
  Serial.begin(115200);
  Serial.println("jello whirled!\n");

  for (int ii = 0; ii < 4; ii++)
    pinMode(yourPin[ii], OUTPUT);

    for (int yourVariable = 0; yourVariable < 16; yourVariable++) {
      Serial.print(yourVariable, HEX); Serial.print("     ");

      for (int bitNumber = 0; bitNumber < 4; bitNumber++) {
        Serial.print(bitRead(yourVariable, bitNumber));
        digitalWrite(yourPin[bitNumber], bitRead(yourVariable, bitNumber) ? HIGH : LOW);
        Serial.print("         ");
      }

    Serial.println("");
    delay(555);
  }
}

void loop() {
}