3F7₁₆ → decimal — number base conversion

corepositional expansion in base 16

Answer

1015

Why this example is worth doing

Hexadecimal to decimal by positional weights, with the digit F standing for fifteen. The page's specific contribution here is the letter digits: A to F are digits, not variables, and the reason base sixteen needs them is that positional notation requires exactly as many digit symbols as the radix. Stating that explicitly turns the letters from an arbitrary convention into a consequence.

Try your own input in the Binary ⇄ decimal ⇄ hex ⇄ octal. Convert between any two bases, integers and fractions, with the positional working.

How the answer is reached

Base 16 to base 10

Convert 3F7 from base 16 to base 10. The sign is carried across unchanged; only the magnitude is converted.

Positional expansion of the input — Base 16 to base 10
digitvalueweightweight (base 10)digit x weight
3316^2256768
F1516^116240
7716^017
total1015

Integer part: divide by 10 and read the remainders bottom to top.

Read the last column bottom to top. ↑ — Base 16 to base 10
ndivide byquotientremainder
10151015 ÷ 101015
101101 ÷ 10101
1010 ÷ 1010
11 ÷ 1001

3F7 (base 16)1015 (base 10)

Compare with

Open this example in the Binary ⇄ decimal ⇄ hex ⇄ octal

The field arrives filled in with this example’s input.

Note:

Notation this page assumes

  • Bit strings are written most significant bit first, and bit 0 is the least significant bit.
  • A width is stated explicitly wherever it changes the answer; nothing is silently sign-extended or truncated.
  • Fractions are converted digit by digit and shown to a stated number of places rather than rounded silently.

Sources

  • Knuth, The Art of Computer Programming, Vol. 2, §4.1 “Positional Number Systems” (1997)
  • IEEE 754-2019, Standard for Floating-Point Arithmetic