This article is a mirror article of machine translation, please click here to jump to the original article.

View: 1382|Reply: 0

The bit weight method converts binary, 8, and hexadecimal into decimal system

[Copy link]
Posted on 11/6/2024 8:41:30 AM | | | |
Requirements: Decimal conversion, usually when calculating, it is more convenient to use decimal to calculate, and it is necessary to convert binary, 8, and 16 to decimal first.

For example, the number 6 represents 60 in the ten-digit position, 600 in the hundredth digit, and 0.6 after the decimal point. The magnitude of the bit weight is an integer power of exponential with the base number as the base and the serial number of the digit's position as the exponent. The place weight of the decimal single-digit position is 100, the place weight of the decimal position is 101, and the place weight of the decimal place is 10-1.

The decimal number 34958.34 has a value of:

(34958.34)10=3×104+4×103+9×102+5×101+8×100+3×10-1+4×10-2

Left decimal point: From right to left, each corresponding weight is 100, 101, 102, 103, and 104

Right of the decimal point: from left to right, the corresponding weights of each digit are 10-1 and 10-2 respectively

Binary number (100101.01)2=1×25+0×24+0×23+1×22+0×21+1×20+0×2-1+1×2-2

Decimal point left: From right to left, the corresponding weights of each digit are 20, 21, 22, 23, and 24

Right of the decimal point: from left to right, the corresponding weights of each digit are 2-1 and 2-2 respectively

Different base systems have different weights due to the cardinality of their rounds.







Previous:.NET/C# elegantly sets the int value in the range of the range
Next:Redundant technology in computers
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com