当前位置:网站首页>Conversion between number systems
Conversion between number systems
2022-08-09 08:15:00 【direction of light 79】
One, number system conversion
Number system: A method of counting, which refers to a method of representing numerical values with a set of fixed symbols and uniform rules
Digits: It refers to the number symbols in a number
Base: refers to the number of digital symbols that can be used on a digit in a certain carry counting system
Digit weight:Refers to the size represented by the digits in a certain carry counting system, that is, the size of the value represented by "1" in a certain position
Second, the numerical value of the computer
Binary, Octal, Decimal, Hexadecimal
High to bottom
0 0 0 0 1 1 1 1
7 6 5 4 3 2 1 0
In the number system, there is also a rule, that is, the N base must be rounded up by one every N.
Decimal is every decimal one
Binary is every two into one
Octal is every octal
Hexadecimal is every hexadecimal one


Three, Common binary:
11111111——255
11111110——254
11000000—192
10101000——168
01100100—100
011111111——127
10000000——128
11100000——224
11110000—240
4. Hexadecimal conversion method
Decimal to binary 175, 175=10101111(B)

Octal to binary 175O, 175O=(1 111 101)B

Hexadecimal to binary 175H, 175H=(1 0111 0101)B

2. Subnet divisionSubnettingspan>
https://so.csdn.net/so/search?q=%E5%AD%90%E7%BD%91%E5%88%92%E5%88%86&spm=1001.2101.3001.7020
IPv4 consists of 32-bit binary numbers, generally expressed in dotted decimal, divided into 4 groups of 8 bits each.For example: 11000000.10101000.00000000.00000010, usually expressed in decimal form for the convenience of configuration, for example: 192.168.0.2
IPv6 consists of 128 bits, usually separated by colons, expressed in hexadecimal.
IPv4 address consists of two parts: network part + host part 192.168.1.117
network part (192.168.1), host part (117), 192.168.1.0 (network address), 192.168.1.255 (broadcast address)
2. Subnetting

Example: 192.168.1.189/26
11000000.10101000.00000001.10111101 IP address
11111111 11111111 11111111 11000000 Subnet Mask
11000000 10101000 00000001 10000000 Network Address
192 . 168 . 1 . 128
11000000 10101000 00000001 10111111 Broadcast address
192 . 168 . 1 . 191
Number of subnets=2^n, where n is the number of bits in the subnet part (in class C addressesFor example, n is the number of 1 in the last 8 bits of the subnet mask)
Number of hosts (available IP)=2^N - 2, where Nis the number of bits in the host part (taking a class C address as an example, n is the number of 0 in the last 8 bits of the subnet mask)

Summary
Learn hexadecimal conversion, know how to convert octal and hexadecimal into binary, mainly memorize the hexadecimal comparison table and several common binary.The subnetting part understands the classification of IP addresses, and the conversion of network addresses and broadcast addresses.Familiar with the calculation of the number of subnets and the number of hosts.
边栏推荐
猜你喜欢
随机推荐
网络布线及数制转换
C: print the diamond
Database MySQL installation and uninstallation
pc端ncnn搭建与测试
eTS UI开发学习
MySql homework practice questions
CUDA和cuDNN 安装10.0版本
Object detection app based on appinventor and EasyDL object detection API
web basic concepts
H3C_利用策略路由实现出口双线路负载(选路)的部署
204. 数素数
pip3换源提升速度
LVM与磁盘配额
Literature retrieval operation code
VMware virtual machine cannot be connected to the Internet after forced shutdown
204. Count Primes
LeetCode·每日一题·636.函数的独占时间·栈模拟
编程洗衣机:字符串输出后的乱码
磁盘管理与挂载
Buns make up the number----Euclide+dp









