#include void setup() { Serial.begin( 9600 ); } /* Examples of shifting unsigned ints */ void loop() { uint16_t x; uint16_t y; uint16_t z; x = 0x00; Serial.println(x, HEX); y = ~x; Serial.println(y, HEX); for (uint8_t 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); }