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
2
votes
1 answer

Is notation of a number in base-(-2) numeral system unambiguous?

I have a problem with proving this thesis: Notation of a number in base-(-2) numeral system is unambiguous. I think I need to use mathematical induction, but I don't know how.
ArcCha
  • 23
2
votes
1 answer

Is there a classification system where the sum of the digits are a factor?

This may be confusing. An example: 12 1+2=3 3 is a factor of 12. 135 1+3+5=9 9 is a factor of 135. 555 5+5+5=15 15 is a factor of 555. What is the name of this classification system or did I create a new one?
2
votes
0 answers

Why did the babylonians use sexagecimal system ? Why did we stop? Why do we still use it for time/angle?

I was told that we chose the decimal system because we have 10 fingers and it makes it easier to count (which in itself is not a very convincing argumat to me). But then why did the babylonians used a system which was on base 60. Why was it that…
2
votes
2 answers

Find the appropriate base

$$213_x=139_{10}$$ $$21_x=1021_4$$ How would I solve this
Greeny Ghuji
  • 61
  • 1
  • 4
2
votes
3 answers

Big Integer Base Converter?

I need to convert some really big numbers from base-10 to base-8. All online converters I found cap the conversion at around 20 digits. Are there any downloadable programs with no digit limit? I'm running Windows 10, but Linux or Mac are…
abcjme
  • 133
2
votes
3 answers

What exactly is a $\delta$ neighborhood

The set of all point $x$ such that $|x-a| < \delta$ is called a $\delta$ neighborhood of the point $a$. The set of all points $x$ such that $0<|x-a|<\delta$ in which $x=a$ is excluded, is called a deleted $\delta$ neighborhood of $a$ or an open ball…
JohnPhteven
  • 2,007
2
votes
2 answers

Why is the common positional notation unintuitive

Let's say I want to invent my own positional numeral system. I start with several symbols representing the smallest amounts: A, B, C, D, E, F. Since I don't want to have infinitely many symbols and since I'm making a positional system, the symbol…
Jeyekomon
  • 1,369
2
votes
3 answers

Letters in number bases.

I was given a question in number bases. 3P44(base 5) = 246(base 10) find P I tried converting 246 to base 5 which I taught will be equivalent to 3P44 an then substitute the 25s place as P, but seems incorrect. This is kind of beyond my…
2
votes
0 answers

What is the radix (base) of number $(9)_r$ if its decimal representation is $(21)_{10}$?

I want to find $r$. The method that I followed is: $(9\times r^0) = (2\times 10^1) + (1\times 10^0)$ which gives no solution.
ahsan
  • 121
2
votes
2 answers

DUODEC to BIN, OCT, DEC problem

I am a new student of basic Mathematics and I am learning number systems, so this is a basic question. This exercise gives me the following duodecimal number: 9AX (where A=11, X=10) And it requires to be converted to binary, octal and decimal. Of…
Raj
  • 23
2
votes
3 answers

If a number irrational, can it be rational in some rational-based number system?

The number $\frac{22}{7}$ is irrational in our base-$10$ system, but in, say, base-$14$, it is rational (it comes out to $3.2$ in that system). It's easy for fractions that are irrational as decimals, as you can just represent them in a base that's…
mdlp0716
  • 151
  • 1
  • 9
2
votes
1 answer

Why is unary not a legitimate radix?

In binary the only digits are '0' and '1'. Let's define base-one (unary) as having '0' as its sole digit. There's an obvious problem, though - there can be no numeral representing zero, but there's also an obvious fix: '0' can represent (drum roll)…
2
votes
1 answer

Negative decimal to other base conversion

I'm trying to learn on how to convert a negative decimal number (with fraction) to binary, octal and hexadecimal. So, base 10: -89.3125 Here is what I did to convert this to binary: -89= 1011001 (positive) // 0100110 (invert) // +1 (add one)…
2
votes
1 answer

Solving simultaneous equations with imaginary numbers

Consider the following simultaneous equation: $$\begin{cases} 5z-(3+i)w=7-i\\ (2-i)z+2iw = -1+i \end{cases} $$ What is the simplest way to manipulate one of the equations so that a variable can be eliminated and the equation solved?
RayQuang
  • 245
2
votes
2 answers

Mayan Number System Explained.

I have recently been studying the Mayans and have encountered their number system. A dot represents 1 A line represents 5 A shell represents 0 The base of the number system is 20 During my research I understand how the numbers were written…
sbswim
  • 161