bit shift - shifting a shifted value
===

I have tried to make a longer function but it has acted very weird. I had tried to isolate the  problem and I have been able to find the buggy part.

This program made for an Arduino but this phenomenon probably appear in other environment. I have tried to make a lot of searches but I cannot find the solution.

So, my buggy part:
------------------
**Why do not these two codes give the same result?  
How can I construct a one line function without extra variable  
but same operation like "Code 1"?**

Results:

 - Code 1: 0b00101100
 - Code 2: 0b01101100


Source codes:


----------


Code 1: (correct operation but not one line)

    #include <binary.h>
    
    const byte value=B00110110;
    byte buffer,result;

    void setup(){
      Serial.begin(115200);
      
      buffer = (value << 3);
      result = (buffer >> 2);

      Serial.println(result,BIN);
    }

    void loop(){
    }

It gives: **0b00101100**


----------


Code 2: (incorrect operation but one line)

    #include <binary.h>
    
    const byte value=B00110110;
    byte result;

    void setup(){
      Serial.begin(115200);

      result = ((value << 3) >> 2);

      Serial.println(result,BIN);
    }

    void loop(){
    }

It gives: **0b01101100**


----------
