The representation of an integer constant: a binary representation (binary, octal, decimal, hexadecimal)
In life: Decimal (0-9), Week (Seven decimal (0-6)), Time (12 binary (0-11), 24 binary (0-23))
Computers are binary to read the data in our lives.
Conversions between the binaries:
Decimal to binary: divides the decimal by 2 until the quotient is 0, and the remainder is connected from the bottom to the binary.
Ten---->1010
Binary to decimal: multiplies each bit of the binary by 2^n, N starts at 0, N adds one each time, and adds the result.
1001----"1*2^0 +0*2^1 +0*2^2+1*2^3 = 9
Binary transposition octal:
Way 1:2 binary---> Decimal---> Octal
Mode two: An octal equivalent of three binary for, will be binary three bit a split, calculated
010 100 101 = 245
Change binary to 16: (0-9) (A ()-f (15))
0000 1010 0101 = A5
Java basic data type constants, character constants