#include void setup() { Serial.begin( 9600 ); } /* Examples of shifting interacting with signed ints */ void loop() { int16_t x; int16_t y; uint16_t z; x = 0x00; Serial.println(x, HEX); y = ~x; Serial.println(y, HEX); for (int i=0; i <= 16; i++ ) { Serial.print("i "); Serial.print(i); z = y << i; Serial.print(", y << i "); Serial.print(z, HEX); z = y >> i; Serial.print(", y >> i "); Serial.print(z, HEX); Serial.println(""); } while ( 1 ) {} delay(1000); }