3 horizontal lines, burger
3 horizontal lines, burger
3 horizontal lines, burger
3 horizontal lines, burger

3 horizontal lines, burger
Remove all
LOADING ...

Content



    How to Convert a Number from One Numeral System to Another and Back

    Clock
    13.10.2026
    /
    Clock
    13.10.2026
    /
    Clock
    2 minutes

    What this article about

    I will show how to convert numbers from one numeral system to another and back again, using examples and infographics. In this article, we will focus exclusively on positional numeral systems - that is, systems where the position (or the place of value) of a digit within a number of carries its own specific value. This is the type of system we use ourselves: the Arabic numeral system.

    How to convert a number from decimal to any other numeral system

    To convert a number from one system to another, the easiest approach - especially given our familiarity with the decimal system - is to first convert the number to decimal and then to the target base. To start, I will demonstrate how to convert any decimal number into hexadecimal:
    This is an example of converting a number from decimal to hexadecimal.
    The infographic above shows an example of converting a number from the decimal system to hexadecimal; the same method applies to converting from decimal to any other numeral system. The principle involves converting the integer and fractional parts separately and knowing when to stop.
    Now, let’s look at how to convert a number from any numeral system to decimal.

    How to convert a number from any numeral system to decimal

    To perform the conversion, you need to break the number down into individual digits. Convert them to the decimal system, and multiply each digit by the base of the target numeral system raised to the power of that digit's position within the number. Digit positions are numbered starting from zero to the left of the fractional part. The fractional part is numbered in reverse order using negative values. That is:
    So, as you can see, when converting alphanumeric values ​​to decimal, you get digits that shouldn't be separated. Some people—myself included—initially converted the whole number to decimal (e.g., 4147.815) and then converted each digit individually. You shouldn't do that; the result will be incorrect.
    Now, to convert a number from any numeral system to decimal, you simply need to plug in the base of the source system—using any number you like instead of 16.

    Table of letter-to-value mappings for numeral systems

    By the way, a table can help you determine which number corresponds to a specific letter:

    Other

    Similar articles


    How I2C (IIC) works using the ATMega328p and MPU6050 as an Example

    Clock
    11.12.2025
    /
    Clock
    13.04.2026
    Analyzing the I2C interface without using libraries, using the example of connecting the MPU6050 to the Atmega328P in pure C.

    How to generate and use a SSH keys

    Clock
    26.02.2026
    /
    Clock
    12.09.2026
    In summary, this guide explains how to generate a key pair for an SSH connection to a remote server. Also, how to transfer them to the remote server and how …

    How to add user on Linux server

    Clock
    28.02.2026
    /
    Clock
    12.09.2026
    How to add a user on a Linux server (Debian/Ubuntu/CentOS), why it's necessary, and how to make them an administrator. I'll briefly explain the differences between a privileged/root user and …