user11063: I have an Atmega328P-AU with 16Mhz crystal(schematics). And its analog pins A0 to A3 are connected to button inputs.
All these pins are pulled-down(10K res). And in code, I have digitalRead(A0) to digtalRead(A3).
When I press button attached to A3 and A2. They works as they should. But when I press any button attached to A0 or A1, both their digitalRead() returns true.
I checked 3 times, all resistors and buttons wires are well connected and are not shorted.
Here is test code
void setup()
{
    Serial.begin(9600);
    pinMode(A0, INPUT);
    pinMode(A1, INPUT);
    pinMode(A3, INPUT);
    pinMode(A2, INPUT);
}

void loop()
{    
if (digitalRead(A0))
    Serial.println("A0");
if(digitalRead(A1))
    Serial.println("A1");
if (digitalRead(A2))
    Serial.println("A2");
if (digitalRead(A3))
    Serial.println("A3" );
delay(400);
}

Here are outputs.
When pressed A0
A0
A1

When pressed A1(same result)
A0
A1

When pressed A2
A2

When pressed A3
A3

I'm wondering what could be causing this problem ?
Edit: 
Test

When I press A1 button, the A1 pin is high with 4.8V as well as A0
pin is high with 2.6V to 3.8V.
When nothing is pressed, A1 has 180mV while A0 has -180mV.


simulate this circuit – Schematic created using CircuitLab

user7937: Assuming you've not activated any ADC functionality in your Arduino code (i.e. assuming the sample code you've posted here is 100% what you've tried, and no analogReference(); statement), then I still think your problem is a partial short between AO & A1.  If my above assumptions are not the case, then there are other possibilities.
With a 5.0V Vcc rail, anything more than 0.5Vcc (i.e. 2.5V) will register as a high/1 (datasheet section 30 - Electrical characteristics, 30.2 DC Characteristics), so based on the measurements you posted to the edit of your question, your code is indeed correctly reporting a 1 on A0 when you push A1 button.
But it's only barely a 1/high, and as you've said, it varies from 2.6 to 3.8, another classic sign of a soldering or partial short circuit somewhere.
If you're able to remove the '328 from the circuit, use your multimeter to read resistance between A0 & A1.  Also try a new/different '328, maybe you damaged one of its input in the past.

11063: <p>I have an Atmega328P-AU with 16Mhz crystal(<a href="https://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Arduino-Pro-Mini-v14.pdf" rel="nofollow noreferrer">schematics</a>). And its analog pins A0 to A3 are connected to button inputs.
All these pins are pulled-down(10K res). And in code, I have digitalRead(A0) to digtalRead(A3).</p>

<p>When I press button attached to A3 and A2. They works as they should. But when I press any button attached to A0 or A1, both their <code>digitalRead()</code> returns true.</p>

<p>I checked 3 times, all resistors and buttons wires are well connected and are not shorted.</p>

<p>Here is test code</p>

<pre><code>void setup()
{
    Serial.begin(9600);
    pinMode(A0, INPUT);
    pinMode(A1, INPUT);
    pinMode(A3, INPUT);
    pinMode(A2, INPUT);
}

void loop()
{    
if (digitalRead(A0))
    Serial.println("A0");
if(digitalRead(A1))
    Serial.println("A1");
if (digitalRead(A2))
    Serial.println("A2");
if (digitalRead(A3))
    Serial.println("A3" );
delay(400);
}
</code></pre>

<p>Here are outputs.</p>

<p>When pressed <code>A0</code></p>

<pre><code>A0
A1
</code></pre>

<p>When pressed <code>A1</code>(same result)</p>

<pre><code>A0
A1
</code></pre>

<p>When pressed <code>A2</code></p>

<pre><code>A2
</code></pre>

<p>When pressed <code>A3</code></p>

<pre><code>A3
</code></pre>

<p>I'm wondering what could be causing this problem ?</p>

<p>Edit: 
Test</p>

<ul>
<li><p>When I press A1 button, the A1 pin is high with 4.8V as well as A0
pin is high with 2.6V to 3.8V.</p></li>
<li><p>When nothing is pressed, A1 has 180mV while A0 has -180mV.</p></li>
</ul>



<p><img src="https://i.stack.imgur.com/ohUAe.png" alt="schematic"></p>



<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fohUAe.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="nofollow">CircuitLab</a></sup></p>
 7937: <p>Assuming you've not activated any ADC functionality in your Arduino code (i.e. assuming the sample code you've posted here is 100% what you've tried, and no analogReference(); statement), then I still think your problem is a partial short between AO &amp; A1.  If my above assumptions are not the case, then there are other possibilities.</p>

<p>With a 5.0V Vcc rail, anything more than 0.5Vcc (i.e. 2.5V) will register as a high/1 (datasheet section 30 - Electrical characteristics, 30.2 DC Characteristics), so based on the measurements you posted to the edit of your question, your code is indeed correctly reporting a 1 on A0 when you push A1 button.</p>

<p>But it's only barely a 1/high, and as you've said, it varies from 2.6 to 3.8, another classic sign of a soldering or partial short circuit somewhere.</p>

<p>If you're able to remove the '328 from the circuit, use your multimeter to read resistance between A0 &amp; A1.  Also try a new/different '328, maybe you damaged one of its input in the past.</p>
