Understanding variables

I have just started learning the basics of programming my Arduino Uno smd and am one of those types who has to fully understand a subject before moving on to the next. I am currently playing around with the different types of variables and their limitations, particularlly overflow and am using the following sketch to display this effect:

byte test = 127;

void setup()                    
{
  Serial.begin(9600);           
  Serial.print("Test value is: ");  Serial.println(test,DEC);

  test = test + 1;

  Serial.print("Now it is ");  Serial.println(test,DEC);
}

void loop()           
{

}

Using the different types of int and long I have no problem as they return the results expected. However when I try to use the Byte type of variable I have the following problem.

1) If I don't use DEC in the println statement the number in the test variable is returned as an ASCII symbol 2) I expect the number shown to overflow to -128 but it moves to 129 3) Overflow actually occurs at 255 where it changes to 0. It's acting like an unsigned byte

Am I doing something wrong here. I am running on a XP service pac 3 system and using Arduino 022 IDE.

1) If I don't use DEC in the println statement the number in the test variable is returned as an ASCII symbol

Serial.print[ln] is an "overloaded" function. For integer data-types with more than eight bits (e.g. int and long), by default the value is first converted to text and the text is sent to the serial port. For integer data-types with eight bits (e.g. char and byte), by default the value is sent "as is" to the serial port; no conversion is performed.

2) I expect the number shown to overflow to -128 but it moves to 129

byte is an unsigned data-type so you should never see negative values.

3) Overflow actually occurs at 255 where it changes to 0. It's acting like an unsigned byte

That's exactly what it is. Good observation.

Thanks for your reply, coding badly, I understand now

Cheers Ian