- 13
- 0
- 约2.13万字
- 约 25页
- 2017-06-10 发布于河南
- 举报
十六进制的算法(国外英文资料)
十六进制的算法(国外英文资料)
Is A representation method of data in computer. Daily in decimal notation is different with us. It is composed of 0-9, A - F,. And the corresponding relation of decimal is:
0-9 corresponding 0-9;
A - F corresponding 10-15;
The number of Ns is going to be equal to 0 minus N minus 1, which is more than 9 in the letter A minus F
Such as:
The decimal system of 32 is the hexadecimal system: 20
Hexadecimal 32 represented as decimal is: 3 x 16 ^ 1 + 2 x 16 ^ 0 = 50
Why is octal and hexadecimal required?
In programming, we often use a decimal system... After all, C/C + + is a high-level language.
Such as:
Int a = 100, b = 99;
However, because the data is represented in the computer, in the end, in binary form, sometimes binary can be used to solve the problem more visually.
But the binary is too long. For example, the int type occupies 4 bytes, 32 bits. For example, 100, the binary representation of type int will be:
0000 0000 0000 0000 0110 0000
No one would like to think or operate in the face of such a long number. Therefore, C C + + does not provide a way to write binary Numbers directly in code.
You can solve this problem by using 16 or 8. Because the larger the system, the shorter the number of expressions. But why should it be 16 or 8, and not others, such as 9 or 20?
2, 8, 16, thats 2 to the 1 to the third power, to the fourth power. This allows the three types of systems to convert very directly to one another. The system of 8 or 16 reduces the binary number, but keeps the expression of the binary number. You can find this in the next section on conversion.
The Numbers of 6.2, 8, and hexadecimal Numbers are converted to decimal Numbers
The 6.2.1 binary is converted to decimal number
The power of the binary number 0 is 2 to the 0, the first digit is 2 to the 1...
So, we have a binary number: 0110 0100, which is converted into a decimal system:
Here are the vertical:
0110 0100 is converted into decimal
0 0 * 2 ^ 0 = 0
The first bit 0 * 2 ^ 1 = 0
2nd 1
您可能关注的文档
最近下载
- ISO 28004-1_2007 供应链安全管理体系实施指南培训课件.pptx VIP
- 部编版六年级语文下册 第一单元(10课时)大单元作业设计.pdf VIP
- 2025年高考试题上海高考英语(含答案解析版).docx VIP
- 【真题研究】同等学力教育学.pdf VIP
- 蓝天救援技能培训课件.ppt VIP
- 2025外交部所属事业单位招聘95人笔试试题附答案解析.docx VIP
- 2026年学校党风廉政和反腐败工作计划.docx VIP
- 五求职策略与就业技巧.pptx VIP
- 2025绍兴市交通控股集团有限公司招聘3人笔试备考题库附答案详解(完整版).docx VIP
- 医学实验动物学教程第五堂实验动物学.ppt VIP
原创力文档

文档评论(0)