Search for a tool
Negadecimal

Tool to convert and calculate numbers in base -10, also called negadecimal base (positional numeral system in base minus ten)

Results

Negadecimal -

Tag(s) : Arithmetics

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Negadecimal' tool for free! Thank you!

Negadecimal

Negadecimal to Decimal Converter


Decimal to Negadecimal Converter


Answers to Questions (FAQ)

What is Negadecimal? (Definition)

The negadecimal system is the name given to the positional numeral system in base $ -10 $ (negative/minus ten radix).

For every number $ N $ written in radix $ -10 $ and made of digits $ a_n, a_{n-1}, \cdots, a_1, a_0 $ then $$ N = \sum_{i=0} a_i \times (-10)^i $$ or the following calculation: $ N = a_n(-10)^n + \cdots + a_1(-10)^1 + a_0(-10)^0 $

How to convert a number into negadecimal?

To change the base from a decimal number (base 10) to negadecimal (base -10), apply the algorithm:

N = []
While (n != 0) {
r = n % (-10)
n = floor( n / (-10) )
if (r < 0) {
n += 1
r += 10
}
N = [r,N]
}

Example: $ 123_{(10)} $ go througn the steps: $ r = 123 % (-10) = -7 $, $ n = \lfloor 123/(-10) \rfloor = -13 $ as $ r < 0 $, $ n = -12 $ and $ r = -7 + 10 = 3 $ so the last digit is $ 3 $. Continue to get $ 823_{(-10)} $

How to convert a negadecimal number into decimal?

To calculate the decimal value of a number in radix -10, apply the formula: $$ N = \sum_{i=0} a_i \times (-10)^i $$ with $ a_i $ the digits of $ N $.

Example: $ 789_{(-10)} = 7 \times (-10)^2 + 8 \times (-10)^1 + 9 \times (-10)^0 = 7 \times 100 + 8 \times (-10) + 9 = 629_{(10)} $

Why using negadecimal?

Negadecimal has the advantage of being able to store negative numbers without a minus - sign.

Source code

dCode retains ownership of the "Negadecimal" source code. Except explicit open source licence (indicated Creative Commons / free), the "Negadecimal" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Negadecimal" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Negadecimal" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.

Cite dCode

The copy-paste of the page "Negadecimal" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Negadecimal on dCode.fr [online website], retrieved on 2024-11-05, https://www.dcode.fr/negadecimal-base

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Negadecimal' tool for free! Thank you!


https://www.dcode.fr/negadecimal-base
© 2024 dCode — El 'kit de herramientas' definitivo para resolver todos los juegos/acertijos/geocaching/CTF.
 
Feedback