int outpins[]={8, 9, 10, 11};
int inpin = 13;
int buttonState = 0;




void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  for(int i=0; i<=3; i++)
    {
      pinMode(outpins[i], OUTPUT);
    }
  pinMode(inpin, INPUT);
}
  

void loop() {
  buttonState=digitalRead(inpin); 
if(buttonState == HIGH){


  // put your main code here, to run repeatedly:
  // dit dit dit daah daah daah did did did . . . -- -- -- . . . iim dohio dugarna.
  int container;
  for(int i =0; i<=15;i++)
  {
      converter(i);
      Serial.print(i);
      delay(1000);
  }
}
}

void converter(int value)
{
  for(int i=0; i<=3; i++)
  {
    digitalWrite(outpins[i],value%2);
    value=value/2;
  }
}