input analog array > output digital array

Would that be correct?

for (int i=0; i < 5; i++) {
   if (analogRead(anIn[i]) < 512)
   {
     In[i] = LOW;
   }
   else
   { 
     In[i] = HIGH;
   }
 }

And AWOL if I put a 4V signal in an analog input, shouldn't it read around 818?