JAVA stumbled into the second daily volume of self-learning

Source: Internet
Author: User

Concept: A quantity that cannot be changed is called a constant.

Category: 1 integer constants all integers such as 1,2,3,4,,,,,

2 decimal constant All decimals For example 3.45 2.44 2.1

3 Boolean constant only 2 value true false

A 4 character constant identifies a numeric letter symbol with a single quote ' '

5 A string constant identifies one or more alphanumeric characters with a double-quote ""

6 NULL constant There is only one value that is null

Binary Concepts

The Carry system/Position counting method is a notation, so it is also called the Carry notation/bit value counting method, which can represent all the values with a finite number symbol. The number of digits that can be used is called the Radix (En:radix) or base, and the cardinality is N, which can be called N-binary, or n-binary. Now the most common is the decimal, usually using 10 Arabic numerals 0-9 to count.

For any one number, we can use a different rounding system to represent it. For example, the decimal number 57 (10), can be expressed in binary notation as 111001 (2), can also be represented as 212 (5), or octal as 71 (8), hexadecimal is 39 (16), they represent the same value.

The number system, also known as the counter, refers to the method of representing numerical values with a set of fixed symbols and uniform rules. A computer is a tool for information processing, which must be converted into binary form data before it can be processed, stored, and transmitted by a computer.

Conversion of the binary

Decimal--------------> Binary divide 2 Take the remainder from position to high rank

For example, the decimal 50 conversion into binary is 110010 (self-drawn haha is not very ugly OH)

Binary------------------> Decimal from right to left multiplied by 2 and the sum of the results is the decimal number of that number.

So who can read it, huh?

Because 0 times the result of any number is 0, so long as the number of binary digits of the number of 1 multiplied by the number of the power of 2 is the result of the corresponding decimal number

Binary------------------> Hex takes a binary number of every four bits for each group of results and then connects

Binary--------------------> octal takes one binary number per three bits for each group of results and then connects

Negative binary representation negative number of positive number binary inverse then +1

In fact, the key to learning is to insist that as long as we can adhere to adhere to adhere to adhere to adhere to persist we will see ourselves covered by the high-rise of the summer comrades insist on it

JAVA stumbled into the second daily volume of self-learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.