Answer the question
In order to leave comments, you need to log in
What does the phrase "two's complement integer" mean in Java's definition of primitive types?
We open the official Oracle documentation about primitive types and in the definitions of primitive types we meet the phrase signed two's complement integer. , for example here:
byte: The byte data type is an 8-bit signed two's complement integer.
int: By default, the int data type is a 32-bit signed two's complement integer, which has a minimum value of -231 and a maximum value of 231-1.
Answer the question
In order to leave comments, you need to log in
https://en.wikipedia.org/wiki/%D0%94%D0%BE%D0%BF%D...
In particular, for byte this means that numbers take values from -128 to 127, and not from 0 to 255 as it might seem.
Same for signed integer int
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question