3-bit binary counter using LEDs

Hello guys , I have been working on the 3-bit binary counter using LEDs for sometime now. Can you suggest changes to this code as it does not produce an output as of now or can you give me a better code to get the desired output ?

int led2 = 5;
int led1 = 4;
int led0 = 3;

void setup() {
pinMode(led0, OUTPUT);
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
Serial.begin(9600);
}

void loop() {
reset();
for(int i = 0; i < 8; ++i)
{
signal( led2, ((i >> 2) % 2) == 1);
signal( led1, ((i >> 1) % 2) == 1);
signal( led0, ((i >> 0) % 2) == 1);
delay(2000);
}
}

void reset()
{
signal( led2, 0);
signal( led1, 0);
signal( led0, 0);
}

void signal(int led, bool on)
{
if(on)
{
digitalWrite(led, HIGH);
}
else
{
digitalWrite(led, LOW);
}
}

Are you certain your leds are wired correctly?

When I run your sketch with some serial debuging prints, the sketch looks like it should be working properly.

int led2 = 5;
int led1 = 4;
int led0 = 3;

void setup() {
  pinMode(led0, OUTPUT);
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  reset();
  for (int i = 0; i < 8; ++i)
  {
    Serial.print("index ");
    Serial.println(i);

    signal( led2, ((i >> 2) % 2) == 1);
    signal( led1, ((i >> 1) % 2) == 1);
    signal( led0, ((i >> 0) % 2) == 1);
    delay(2000);
  }
}


void reset()
{
  Serial.println("reset");
  signal( led2, 0);
  signal( led1, 0);
  signal( led0, 0);
}

void signal(int led, bool on)
{
  if (on)
  {
    digitalWrite(led, HIGH);
    Serial.println(" on");
  }
  else
  {
    digitalWrite(led, LOW);
    Serial.println(" off");
  }
}

Why not write the for loop to reflect what you really want:

for( int i = 0; i < 8; i++ ) {
    signal( led2, i >> 2 );
    signal( led1, (i >> 1) & 1 );
    signal( led0, i & 1 );
    delay(2000);
}