I just add a small program to illustrate the type cast between signed and unsigned: var si: ShortInt; begin si:= -127; WriteLn( 'si ', si); WriteLn( 'Byte(si) ', Byte(si)); si:= -1; WriteLn( 'si ', si); WriteLn( 'Byte(si) ', Byte(si)); end. gives $ ./project1 si -127 Byte(si) 129 si -1 Byte(si) 255 $