Improved Logic Gates.

  boolean Status1 = digitalRead(3);
  boolean Status2 = digitalRead(4);
    if ((Status1==HIGH) && (Status2==HIGH))
     { 
          digitalWrite(0,HIGH);  //Your Logic Result on Pin 5       
       //add a delay for example
       //delay(400);
     }
      else
        digitalWrite(0,LOW);
  1. define the input / output pins somewhere so your program is more portabe;
  2. you can easily rewrite that to this:
#define AND(x, y) (digitalRead(x) && digitalRead(y))

...
  digitalWrite(OUTPUT_PIN, AND(INPUT_PIN1, INPUT_PIN2)); //output and of pin1/pin2 on output pin

You can implement other functions similarly.

  1. things like this have very limited uses: the test is done only when that line was executed. So a transistion when that line isn't executed will be missed - I would use an interrupt for sure.