Search for a tool
Négabinary

Tool to convert numbers with negabinary. The Negabinary system allow to represent positive and negative numbers without bit sign in a binary format (0 and 1) using the base -2.

Results

Négabinary -

Tag(s) : Mathematics, Informatics

dCode and you

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!
You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!


Team dCode read all messages and answer them if you leave an email (not published). It is thanks to you that dCode has the best Négabinary tool. Thank you.

This page is using the new English version of dCode, please make comments !

Négabinary

Sponsored ads

Negabinary to Decimal Converter



Decimal to Negabinary Converter



Binary to Negabinary Converter



Tool to convert numbers with negabinary. The Negabinary system allow to represent positive and negative numbers without bit sign in a binary format (0 and 1) using the base -2.

Answers to Questions

How to convert a decimal number into negabinary?

The numbers in the negabinary system are described by the formula:

$$ \sum_{i=0}^{n}b_{i}(-2)^{i} $$

With \( b \) a bit and \( i \) its rank in the inverted negabinary development.

To convert an integer, it is enough to make a divisionhref repeated by \( -2 \) and to concatenate the obtained remainders starting with the end.

If we want to represent 12 in negabinary:
12 / -2 = -6, remainder 0
-6 / -2 = 3, remainder 0
3 / -2 = -1, remainder 1
-1 / -2 = 1, remainder 1
1 / -2 = 0, remainder 1
12 (decimal) in negabinary is written 11100.

How to convert a Negabinay number to Decimal?

Negabinary writing corresponds to a writing in base -2.

110 (negabinary) is equivalent to \( 1 \times (-2)^2 + 1 \times (-2)^1 + 0 \times (-2)^0 = 2 \)

How to recognize a positive or negative integer in negabinary?

In nega-binary, negative integers have an even number of bits, while the positive integers have an odd number of bits.

Ask a new question

Source code

dCode retains ownership of the source code of the script Négabinary. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, etc.) which dCode owns rights can be transferred after sales quote. So if you need to download the Négabinary script for offline use, for you, your company or association, see you on contact page !

Questions / Comments


Team dCode read all messages and answer them if you leave an email (not published). It is thanks to you that dCode has the best Négabinary tool. Thank you.


Source : http://www.dcode.fr/negabinary-system
© 2017 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaches. dCode