int val;
byte valB;
int valc;


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

  val = 122;
  Serial.println(val);
  Serial.println(val,DEC);
  Serial.println(val,HEX);
  Serial.println(val,BIN);
  Serial.println();
  Serial.println();

  valB =0b11111011;

  Serial.println(valB);
  Serial.println(valB,DEC);
  Serial.println(valB,HEX);
  Serial.println(valB,BIN);

  Serial.println();
  Serial.println();

  valc =0xaf;

  Serial.println(valc);
  Serial.println(valc,DEC);
  Serial.println(valc,HEX);
  Serial.println(valc,BIN);

  Serial.println();
  Serial.println();

for (int i = 0; i<4; i++)
{
    int val2 = valB << i;
  Serial.print("Left shift ");
  Serial.println(i);
  Serial.println(val2,BIN);
  Serial.println(val2,DEC);
  //Serial.println(val2,HEX);
  Serial.println();
}

  Serial.println();
  Serial.println();
  
  for (int i = 0; i<4; i++)
{
    int val2 = valB >> i;

  Serial.print("Right shift ");
  Serial.println(i);
  Serial.println(val2,BIN);
  Serial.println(val2,DEC);
  //Serial.println(val2,HEX);
  Serial.println();
}

}

void loop() {
  // put your main code here, to run repeatedly:

}