Multiple if statement conditions I would like to make this code using the Arduino Uno. I am using three on/off switches and based on the truth table would like to turn on one of 8 LEDs. When I use digitalWrite(), I get an error code saying that there are too few arguments. 

Here is the code

int x = A3;    // select the input pin for the switch
int y = A4;
int z = A5;

int ledPin1 = 2;      // select the pin for the LED
int ledPin2 = 3;
int ledPin3 = 4;
int ledPin4 = 7;
int ledPin5 = 8;
int ledPin6 = 9;
int ledPin7 = 12;
int ledPin8 = 13;

void setup(){

  // declare the ledPin as an OUTPUT:
  pinMode(ledPin1, OUTPUT);
  pinMode(ledPin2, OUTPUT);
  pinMode(ledPin3, OUTPUT);
  pinMode(ledPin4, OUTPUT);
  pinMode(ledPin5, OUTPUT);
  pinMode(ledPin6, OUTPUT);
  pinMode(ledPin7, OUTPUT);
  pinMode(ledPin8, OUTPUT);

  pinMode(x, INPUT);
  pinMode(y, INPUT);
  pinMode(z, INPUT);
}

void loop() {

  if ( (x = LOW) &amp;&amp; (y = LOW) &amp;&amp; (z = LOW))              //condition 1
  {
    digitalWrite (ledPin1 = HIGH); 
    digitalWrite (ledPin2 = LOW); 
    digitalWrite (ledPin3 = LOW); 
    digitalWrite (ledPin4 = LOW); 
    digitalWrite (ledPin5 = LOW); 
    digitalWrite (ledPin6 = LOW); 
    digitalWrite (ledPin7 = LOW); 
    digitalWrite (ledPin8 = LOW); 
  }

  if ( (x = LOW) &amp;&amp; (y = LOW) &amp;&amp; (z = HIGH))             //condition 2
  {
    ledPin1 = LOW; 
    ledPin2 = HIGH; 
    ledPin3 = LOW; 
    ledPin4 = LOW; 
    ledPin5 = LOW; 
    ledPin6 = LOW; 
    ledPin7 = LOW; 
    ledPin8 = LOW; 
  }

  if ( (x = LOW) &amp;&amp; (y = HIGH) &amp;&amp; (z = LOW))             //condition 3
  {
    ledPin1 = LOW; 
    ledPin2 = LOW; 
    ledPin3 = HIGH; 
    ledPin4 = LOW; 
    ledPin5 = LOW; 
    ledPin6 = LOW; 
    ledPin7 = LOW; 
    ledPin8 = LOW;
  }

  if ( (x = LOW) &amp;&amp; (y = HIGH) &amp;&amp; (z = HIGH))              //condition 4
  {
    ledPin1 = LOW; 
    ledPin2 = LOW; 
    ledPin3 = LOW; 
    ledPin4 = HIGH; 
    ledPin5 = LOW; 
    ledPin6 = LOW; 
    ledPin7 = LOW; 
    ledPin8 = LOW;
  }

  if ( (x = HIGH) &amp;&amp; (y = LOW) &amp;&amp; (z = LOW))               //condition 5
  {
    ledPin1 = LOW; 
    ledPin2 = LOW; 
    ledPin3 = LOW; 
    ledPin4 = LOW; 
    ledPin5 = HIGH; 
    ledPin6 = LOW; 
    ledPin7 = LOW; 
    ledPin8 = LOW;
  }

  if ( (x = HIGH) &amp;&amp; (y = LOW) &amp;&amp; (z = HIGH))               //condition 6
  {
    ledPin1 = LOW; 
    ledPin2 = LOW; 
    ledPin3 = LOW; 
    ledPin4 = LOW; 
    ledPin5 = LOW; 
    ledPin6 = HIGH; 
    ledPin7 = LOW; 
    ledPin8 = LOW;
  }

  if ( (x = HIGH) &amp;&amp; (y = HIGH) &amp;&amp; (z = LOW))                //condition 7
  {
    ledPin1 = LOW; 
    ledPin2 = LOW; 
    ledPin3 = LOW; 
    ledPin4 = LOW; 
    ledPin5 = LOW; 
    ledPin6 = LOW; 
    ledPin7 = HIGH; 
    ledPin8 = LOW;
  }

  if ( (x = HIGH) &amp;&amp; (y = HIGH) &amp;&amp; (z = HIGH))                //condition 8
  {
    ledPin1 = LOW; 
    ledPin2 = LOW; 
    ledPin3 = LOW; 
    ledPin4 = LOW; 
    ledPin5 = LOW; 
    ledPin6 = LOW; 
    ledPin7 = LOW; 
    ledPin8 = HIGH;
  }
}
digitalWrite (ledPin1 = HIGH); should be digitalWrite (ledPin1, HIGH);

PS if ( (x = LOW) &amp;&amp; (y = LOW) &amp;&amp; (z = LOW)) should be if ( (x == LOW) &amp;&amp; (y == LOW) &amp;&amp; (z == LOW)). = is for assignment, == is for comparison.