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

Does $n = n.\overline 01?$ Similar to $(n-1).\overline 9 = n$ which is just coming form the other direction of $n$.

Just like what the title says. Does: $$n = n.\overline 01?$$ For example, $1.\overline 01 = 1$? Similar to $(n-1).\overline 9 = n$, for example, $0.\overline 9 = 1$. The last statement is true but intuitively I also feel the first is true as well…
MathCubes
  • 119
  • 7
0
votes
1 answer

Irrationals vs rationals

In real number system, given a number"n" whats the number immediately after"n" lets say the number after "n" is "y". Is "y" rational or irrational??? By the completeness property of real number system "y" can be both rational and irrational.. So "y"…
Tom Lynd
  • 1,342
0
votes
3 answers

Number system that provides alternative to real numbers (mentioned by 3Blue1Brown), wha't the name?

https://youtu.be/U_lKUK2MCsg?t=171 Grant Sanderson (3Blue1Brown channel) (auto-generated subtitles): I think the way that we extend to the real numbers there's a little bit of choice in that so there's this funny number system called the serial…
0
votes
2 answers

Base conversion doubt

(123) in base 8 can be converted to base 10 as follows => $3*8^{0}+2*8^{1}+1*8^{2} = 83$ But when I do the conversion by taking a group of 2 numbers together like $(01)*(8^{2})^{1} + (23)*(8^{2})^{0} =64+23 = 87$ Why is the discrepancy arising ?
Fin27
  • 958
0
votes
0 answers

Determining if a positional notation can express every natural number

Recently I've researched some positional notations. However, some of them I've invented can't express every natural number. I want to determine which of them can express every natural number, and which cannot, so that I can concentrate on those that…
0
votes
1 answer

In the unary numeral system, how are the numbers between 1 and -1 labelled?

In the unary numeral system, does 1 - 1 = -1 ? Because if this is true, then how would the numbers between 1 and -1 be represented? Where on a number line would .1 and -.1 be? I am not necessarily looking for an answer to each of these other…
0
votes
0 answers

Correct way to find 8's complement?

I'm trying to figure out how to find 8's complement, but am unable to do so. Online it shows that we need to subtract each digit from 7 when the number is in it's octal bit. It gives the 7's complement and then we add 1 to it to gets the 8's…
0
votes
3 answers

Can we have a number system whose base value is r=0.

Is it possible to have a number system with 0 as its base value? I haven't found any explanation as to why only numbers more than 1 is taken as a base value. For example, binary: base value is 2. decimal base value is 10.
0
votes
0 answers

Is (P, +, . , < , 1) a subsystem of (I, +, . , <, 0, 1)?

I'm reading The Number Systems — Foundations of Algebra and Analysis, second edition, by Solomon Feferman. I have a doubt regarding the statement of theorem 4.22, chapter 4. Theorem: --- There exists an ordered integral domain (I, +, . , <, 0, 1)…
Paulo Argolo
  • 4,210
0
votes
1 answer

Negative numbers in numeral system

Is there a numeral system in which numbers can have negative values? If so, what could be the base? For example (from the head), $34$ represent as $-1, 4, -1$ (read from left to right)
0
votes
0 answers

How to convert Septimal numbers into Decimal number system.

I have started reading a book called 'What is Mathematics?' by Ian Stewart, and there he explains the number system with a base of 7. Septimal number system. I don't understand how one may write 7^2 in such a system, since we only have numbers 0-6.…
0
votes
1 answer

Numbers in $-A - (-B)$ form for $ 2's$ Complement

I know for $2's$ complement representation, you are supposed to perform an operation like $A - B$ into addition but perform $2's$ complement on $B$. So $0101 - 1001 = 0101 + 0111$ Now, if I had a question in the form of $-A - (-B)$, would I combine…
0
votes
1 answer

Conversion: dec to bin

We have: $$\begin{align} A&=\frac{19}{32} \\[0.3em] B&=\frac{21}{32}\\[0.3em] C&=\frac{19}{64}\\[0.3em] D&=\frac{21}{64}.\\[0.3em] \end{align}$$ In binary it is: $$\begin{align} A&=0,10011\strut…
TomDavies92
  • 1,215
  • 3
  • 13
  • 24
0
votes
1 answer

Positional notation: proof of relations for different base but same digits

I have the following situation: Be $n_1, n_2, b_1, b_2 \in \mathbb{N}$ with the notation of $n_1$ in base $b_1$ and $n_2$ in $b_2$ and the digits $z_{l-1}z_{l-2}...z_0$ Furthermore, be $b_1 > b_2$ and $m \in \mathbb{N}$ Proof (or refute) that there…
Max
  • 255
0
votes
0 answers

Can I solve for a radix?

If I know that $$100=(5\text{A})_{18}=(6\text{A})_{15}$$ Can I solve for the (presumably non-integer) radix $r$ that satisfies the following? $$100=(7\text{A})_r$$