breathe effect LED with shift registers(sn74hc595n) problem

How can I made breathe effect LED with two shift registers(sn74hc595n). Thank you for help.

Here is how I connect

Here is the code I have writen.

int latchPin = 8;
int clockPin = 12;
int dataPin = 11;

#define AD5 A5
int Intensity = 0;

void setup() {
  Serial.begin(9600);
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}

void loop() {
light();
if (Intensity<200){
  randomLED();
}
}

void light() {
  Intensity = analogRead(AD5);
  Serial.println(Intensity);
  delay(40);
}

void randomLED() {
  int led = random(16);
  int numberToDisplay = 1 << led;
  byte high_Byte = highByte(numberToDisplay);
  byte low_Byte = lowByte(numberToDisplay);
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, high_Byte);
  shiftOut(dataPin, clockPin, MSBFIRST, low_Byte);
  digitalWrite(latchPin, HIGH);
  delay(40);
}

and what does "the code you have written" do? (use code tags, not quote for code)

J-M-L:
and what does "the code you have written" do? (use code tags, not quote for code)

Thank you for the remind about the code tags.
I want the code can turn on a LED for a few second and it is randomly. Also, I want the LED is fade in and fade out.

And what does your code for the time being? Does it work but just light a random led at max value? How fast does it go through every loop?

J-M-L:
And what does your code for the time being? Does it work but just light a random led at max value? How fast does it go through every loop?

The code is work for random light at max value and I can control the time. In this code is 40 microseconds. The only thing is I can't make fade in fade out