Radix: Difference between revisions
From wikinotes
No edit summary |
|||
Line 20: | Line 20: | ||
decimal: 10 | decimal: 10 | ||
hexadecimal: 16 | hexadecimal: 16 | ||
</syntaxhighlight> | |||
Calculate the maximum possible number with N digits in base B. | |||
<syntaxhighlight lang="bash"> | |||
2**8 == 256 # 8x base-2 digits | |||
16**2 == 256 # 2x base-16 digits | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Number Bases --> | </blockquote><!-- Number Bases --> |
Revision as of 00:26, 8 August 2021
A number's radix or number's base describes when the next higher digit gets incremented.
For example, in the decimal number system (base-10), incrementing beyond 9
adds an extra digit 10
.
In the binary number system (base-2), incrementing beyond 01
increments the higher digit 10
.
Documentation
wikipedia https://en.wikipedia.org/wiki/Radix
Number Bases
binary: 2 octal: 8 decimal: 10 hexadecimal: 16Calculate the maximum possible number with N digits in base B.
2**8 == 256 # 8x base-2 digits 16**2 == 256 # 2x base-16 digits