Arduino binary LED 10 bit display I'm working on a simple ADC project, the goal is to adjust the on/off of the LEDs according to the binary reading (1-on,0-off). I've tried this with 8 bit, and it works as intended. But on 10 bit, two of the LEDs with representation of 2^8 and 2^9 won't turn on even though the reading on the serial monitor is 1023 (should be 1111111111 -all LEDs on). I wonder if there's anything wrong with my code or circuit?
(I'm totally new to arduino, sorry for the noobness)
-I'm using Arduino UNO R3, the details are shown in the image
void setup(){
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(4, OUTPUT);
  
  Serial.begin(9600);
}

void loop(){
  int sensorValue = analogRead(A0);
  Serial.print(&quot;Decimal=&quot;);
  Serial.print(sensorValue);
  Serial.print(&quot;\tBinary=&quot;);
  Serial.println(sensorValue,BIN);
  
  if(sensorValue&gt;=0&amp;&amp;sensorValue&lt;=1023){
    digitalWrite(4,(sensorValue&amp;1));
    digitalWrite(5,(sensorValue&amp;2));
    digitalWrite(6,(sensorValue&amp;4));
    digitalWrite(7,(sensorValue&amp;8));
    digitalWrite(8,(sensorValue&amp;16));
    digitalWrite(9,(sensorValue&amp;32));
    digitalWrite(10,(sensorValue&amp;64));
    digitalWrite(11,(sensorValue&amp;128));
    digitalWrite(12,(sensorValue&amp;256));
    digitalWrite(13,(sensorValue&amp;512));
  }
  delay(20); 
}
According to the official documentation, the second parameter of
digitalWrite() should be either HIGH or LOW. Thus, in order to be
compliant with the published API, you are supposed to write:
digitalWrite(12, sensorValue&amp;256 ? HIGH : LOW);

In practice, digitalWrite() interprets any non-zero value as HIGH.
However, its prototype is:
void digitalWrite(uint8_t pin, uint8_t val);

Both parameters have the type uint8_t, which means “8-bit unsigned
integer”. If you provide a value that doesn't fit in 8 bits, the
implicit cast to uint8_t will reduce it modulo 28. Thus,
both 256 and 512 become zero through the implicit cast.