Computer Architecture (I)-hexadecimal

Source: Internet
Author: User

When learning computer basics, we will all mention various hexadecimal formats. In R notation, It is equal to R in 1. We usually use decimal numbers in our daily life, week 7, 12-digit time, and 24-digit time. However, binary is commonly used in computers, and binary can only be recognized. Today, we will briefly talk about the conversion between common hexadecimal formats.

 

1. R: Convert to decimal.
Tip: expand by right and sum them in sequence.
Example:
Binary 1101.11 to decimal

Note: (1) the weight is the size of the location. For example, the decimal value of 243,2 is the 2nd power of 10, and the value of 4 is the 10th power, 3 is the power 0 of 10.
(2) to identify which base is currently used, mark it with a scalar.

 

2. Convert decimal to R in hexadecimal notation
Tip: Except R, remainder, inverted
Example:
Convert decimal 68 to binary

Let's take an octal example. Convert decimal 168 to octal:

 

3. Convert decimal places to r decimal places
Tip: perform an integer. after the decimal point, take 2 as an integer.
Example:
Decimal decimal: 0.3125 to binary decimal:

Convert decimal number 68.3125 to binary number:

Note: When the decimal point is converted to the binary system, the decimal point will never be 0. Therefore, the required precision can be calculated.

 

4. Binary to hexadecimal
Tip: Start from decimal point, four to one. That is, the four digits of the integer part correspond to one hexadecimal value. There are not 4 digits on the left, 0 on the front, 4 digits on the right of the decimal part, and 0 on the back.
Example:

5. hexadecimal to binary
Tip: from left to right, one to four.
Example:

6. Conversion between octal and binary
Tip: three-to-one,One to three. Refer to hexadecimal
Example:

 

Other hexadecimal conversions can be converted to binary before conversion. The next blog will introduce the code system. welcome to join us.

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.