Questions tagged [number-systems]

Representations of numeric values in decimal, binary, octal, hexadecimal, and other bases; one's-complement and two's-complement signed numbers; scientific notation; floating-point numbers in digital computers; history of number systems; nonstandard number systems; algorithms for arithmetic within specific number systems or for conversions between number systems.

Number systems provide systematic ways to write numeric values such as the (base-ten) numbers $289$ or $2.125$. Some questions with this tag involve algorithms for converting base-ten numbers to or from another number system; conversions between other number systems; algorithms to perform arithmetic (addition, subtraction, multiplication, etc.) within a specific number system without converting the operands to base ten; symbols for writing numbers in systems other than base ten; ancient number systems (such as Roman numerals) and the historical development of number systems; and specialized or unusual number systems.

A base-$b$ number system represents an integer as a sequence of digits, each of which is an integer such that $0 \leq d < b$. Ordinary decimal numbers are written in base ten; other well-known bases include binary (base $2$), octal (base $8$), and hexadecimal (base sixteen). Optionally, the base or radix, $b$, may be appended as a subscript. The value of such a numeric representation is

$${\left(d_m d_{m-1} \cdots d_2 d_1 d_0\right)}_b = d_m b^m + d_{m-1} b^{m-1} + \cdots + d_2 b^2 + d_1 b^1 + d_0 b^0.$$

For example, $21_{16} = 33_{10} = 41_8 = 100001_2$, representing the same value as hexadecimal, decimal, octal, and binary numbers, respectively. The factors $b^0$, $b^1$, $b^2$, and so forth are the place values of the digits. A base-$b$ number with a fractional part is written by appending a decimal point and digits with place values $b^{-1}$, $b^{-2}$, $b^{-3}$, and so forth; for example, $$101.011_2 = 1\cdot2^2 + 0\cdot2^1 + 1\cdot2^0 + 0\cdot2^{-1} + 1\cdot2^{-2} + 1\cdot2^{-3} = 4 + 1 + \frac14 + \frac18 = 5.375_{10}.$$

In a mixed-radix number system, such as the factorial number system, the ratio between the places value of two digits depends on their distances from the decimal point. A number system can have a negative radix, for example the negabinary number system, which has the radix $-2$.

Digital computing has raised interest in various other number systems. In an $n$-digit $b$'s-complement base-$b$ representation, the integer $-x$ is represented by $b^n - x$, whereas in a $(b-1)$'s complement representation, $-x$ is represented by $(b^n - 1) - x$. Computers often use two's-complement (or sometimes one's-complement) binary numbers.

Very large or small numbers can be written in scientific notation, for example $1.234 \times 10^9$. Floating-point numbers in digital computers, typically using the IEEE 754 standard, serve a similar purpose.

More esoteric number systems of interest in computer science include:

  • Balanced base-$b$ number systems, which use both positive and negative digit values. The balanced ternary (base $3$) system with digit values $\{-1,0,1\}$ is an example of this kind of number system.
  • Redundant base-$b$ systems, which allow more than $n$ values of each digit. There may be many ways to represent a given number in such a number system.
  • Residue number systems, in which each digit position is assigned a fixed modulus and the digit in that position is the remainder when the number's value is divided by that modulus.

Other possible numbering systems include the Fibonacci base system and systems using a non-integer radix such as the $\phi$ number system.

949 questions
7
votes
1 answer

How to take the square root of a number in a negative base?

For example, in negadecimal (base -10): how to take the square root of $185_{-10}=25_{10}$? Or in negabinary (base -2): the square root of $1100100_{-2}=36_{10}$? Converting to another base, taking the square root and converting back to the negative…
gilianzz
  • 369
6
votes
4 answers

What base is Roman Numerals?

What is the base for Roman Numerals? It starts off with unary then goes back and forth between multiples of 5 and 10.
6
votes
4 answers

The base in which $1065 = 13 \cdot 54$ is true

How can one find the base $r$ in which $1065 = 13 \cdot 54$ is a true statement? My attempt was constructing an equation including $r$ but because the left side has 4 digits, I got a polynomial of degree 3. $$r^{3}-5r^{2}-13r-7=0$$ I could realize…
Theorem
  • 2,938
6
votes
2 answers

Converting a number from one base to another without going through base 10.

I have a problem. I am very good at converting numbers from base to base after going through base 10. The question is, how can I do the conversions without going through base 10? Thanks
5
votes
1 answer

Numerals vs. Numbers

I've noticed three different approaches in general use: Numbers are abstract and numerals are used to express numbers following a particular set of rules. The number of days in two weeks is a number. 14, E, and XIV are numerals showing various ways…
trw
  • 1,063
5
votes
2 answers

Unusual property of $6 _{10}$, $5 _{8}$ and $9 _{16}$

I realized an unusual property with $6 _{10}$, $5 _{8}$ and $9 _{16}$. What these have in common is when you multiply them to an even number, you get the same 1's digit. Here it is for base 10. $$6 \cdot 2 = 12$$ $$6 \cdot 4 = 24$$ $$6 \cdot 6 =…
5
votes
2 answers

What is the last digit of $\operatorname{lcm}(3^{2003}-1,3^{2003}+1)$?

What is the last digit of $\operatorname{lcm}(3^{2003}-1,3^{2003}+1)$? I am able to find out that LCM is $\dfrac{3^{4006}-1}2$. Since $3^{4006}$ has last digit as $8$, now second last digit can be anything from $0-9$. Based on that second last…
5
votes
2 answers

Is a decimal number system the best to grasp mathematics?

I am often amazed by how accurate a decimal numeral system is to describe the mathematics world. A lot of things feel very logical like the result of any multiplication by 5 will always end with a 0 or a 5. Or this again with this rule: a number is…
MagTun
  • 153
4
votes
3 answers

Convert Hexadecimal to Binary number

I would like to know how to convert a Hexadecimal lets say 3BF to the binary format in a calculational way. (Not the comparing with tables) It would be great to have a step by step guide how the 1110111111 result is produced.
Dyonisos
  • 153
4
votes
1 answer

Numbers, is there any scope beyond?

I came across a term "Construction" in a mathematical analysis book. First of all numbers came into being because of counting. Hence man counted using natural numbers. Now given the system of counting numbers only, it is impossible to answer…
user16186
  • 541
4
votes
1 answer

A new type of numbers?

Humans started to think about solution to the equation x+2=0, they invented therein negative numbers. And now what about the equation $\sqrt{x}$+1=0, we invent new type of number? For example we denote those numbers as $\pm$1 such that those numbers…
base-88
  • 43
4
votes
1 answer

Sum of digits of a perfect square in other bases

Sum of digits of a perfect square in other bases I noticed that in base ten, the sum of digits of $n$ is equivalent to $n\pmod{9}$, and if a number in decimal is perfect square, then the sum of digits of that number must be a quadratic residue…
4
votes
1 answer

Are there number systems with fractional or irrational bases?

I'm wondering if there are number systems with bases other than integers? For example, with a fractional, imaginary, irrational, transcendental basis, or with the basis "infinity"? If there are, then how is the translation made in and between them?
Глеб
  • 151
4
votes
2 answers

In which base number system is $23^2=562$?

This is an exercise from a math chapter called number systems where I learn how to convert decimal numbers to other number bases like binary and hexadecimal. Here I need to discover which base number system is $23^2 = 562$. I know that the resulting…
KHAWAYA
  • 63
4
votes
5 answers

How we can write 36 in base 37?

i've been imagining that in the base 16 the number 10 is A and 11 is B so in the base 37, 35 will be Z so how we can write 36 ?
1
2
3
15 16