java - Three binary digits represent octal, and four binary digits represent hexadecimal. So how many binary digits represent decimal?
PHP中文网
PHP中文网 2017-05-16 13:28:36
0
2
1207

Three-digit binary represents octal, and four-digit binary represents hexadecimal. So how many binary digits represent decimal?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
漂亮男人

Very simple math problem~

2^3 = 8
2^4 = 16
2^n = 10

Then, n = log2(10) = 3.321928094887362. Not an integer.

大家讲道理

Based on your question "Three-digit binary represents octal, four-digit binary represents hexadecimal", it can be deduced that you should mean
The minimum of three-digit binary is 000 and the maximum is 111. Its range is exactly 0-7, which constitutes octal. One digit, so One octal requires three binary digits
And the minimum
four digit binary is 000, the maximum is 1111, its range is exactly 0-15, which constitutes one hexadecimal digit, so One hexadecimal The system requires four binary digits
And
according to the above, there should be no such statement about how many binary digits correspond to one decimal digit. The decimal notation method based on 10 as the base is 0,1,2,3,4,5,6, 7,8,9
while binary
000->0
001->1
010->2
011->3
100->4
101->5
110->6
111->7
1000->8

How many binary digits correspond to one decimal digit? It spans three and four digits
So by inferring, you can know why three binary digits represent octal and four binary digits represent hexadecimal

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template