It looks like it is two's complement. To change the sign of a number with two's complement, take the number in binary form, invert (not) the bits and add 1, e.g.:
The byte 5 is %00000101, invert it to get %11111010, then add 1 to get the form for -5 which is %11111011
The negative of -5 should get us back to 5 so to check, -5 is %11111011, invert it %00000100, and add 1 to get %00000101.
If we find the -ve of %10000101 then we invert it to get %01111010, add 1 to get %01111011 which is 1+2+8+16+32+64=123 so the original number %10000101 was -123.
If the sign was changed by flicking the first (most significant) bit then there would be a +0 and a -0, losing out on one number.
To extend a number from a byte to a long the first bit is extended so the byte -5 is %11111011 but the long -5 is %11111111111111111111111111111011
But that leaves the question, why is
extended to a long? I have no idea...