counting 7 segment display

Maybe this:
change

for (int x = 0; x<7; x=x+1){
digitalWrite(digit1Array[x], (code here to pick off the High/low for a bit from digitDisplay[digit] for the segment pin - thinking  about that still) );
}

to

for (int x = 1; x<0x80; x=x<1){  
// mask bit for the segments: 0x01 (A), 0x02 (B), 0x04 (C), 0x08 (D), 0x10 (E), 0x20 (F), 0x40 (G)
  if ( digitDisplay[digit] & x)  ==0 ){segment = 0;}
else {segment = 1;}
digitalWrite(digit1Array[x], segment);
}