Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Computer number format
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Converting between bases=== {| class="wikitable" style="float: right; clear:right; margin-left:1em; text-align:right;" |+ Table 3: Comparison of values in different bases |- ! Decimal !! Binary !! Octal !! Hexadecimal |- | 0 || 000000 || 00 || 00 |- | 1 || 000001 || 01 || 01 |- | 2 || 000010 || 02 || 02 |- | 3 || 000011 || 03 || 03 |- | 4 || 000100 || 04 || 04 |- | 5 || 000101 || 05 || 05 |- | 6 || 000110 || 06 || 06 |- | 7 || 000111 || 07 || 07 |- | 8 || 001000 || 10 || 08 |- | 9 || 001001 || 11 || 09 |- | 10 || 001010 || 12 || 0A |- | 11 || 001011 || 13 || 0B |- | 12 || 001100 || 14 || 0C |- | 13 || 001101 || 15 || 0D |- | 14 || 001110 || 16 || 0E |- | 15 || 001111 || 17 || 0F |} {{Main | Positional_notation#Base_conversion| l1=Positional notation (base conversion) }} Each of these number systems is a positional system, but while decimal weights are powers of 10, the octal weights are powers of 8 and the hexadecimal weights are powers of 16. To convert from hexadecimal or octal to decimal, for each digit one multiplies the value of the digit by the value of its position and then adds the results. For example: : <math> \begin{align} & \text{octal } 756 \\[5pt] = {} & (7 \times 8^2) + (5 \times 8^1) + (6 \times 8^0) \\[5pt] = {} & (7 \times 64) + (5 \times 8) + (6 \times 1) \\[5pt] = {} & 448 + 40 + 6 \\[5pt] = {} & \text{decimal } 494 \end{align} \qquad \begin{align} & \text{hex } \mathrm{3b2} \\[5pt] = {} & (3 \times 16^2) + (11 \times 16^1) + (2 \times 16^0) \\[5pt] = {} & (3 \times 256) + (11 \times 16) + (2 \times 1) \\[5pt] = {} & 768 + 176 + 2 \\[5pt] = {} & \text{decimal } 946 \end{align} </math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)