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
1
vote
2 answers

Fractions in different bases

Express the fractions , for several small values of , in base 6. Determine which rational numbers have terminating expressions in base 6. I'm not really sure where to begin.
allie
  • 443
1
vote
1 answer

What number comes after 0.10? 0.2 or 0.11?

What number comes after 0.10? 0.2 or 0.11? Decimal realm is confusion for me, help:)
user104657
1
vote
1 answer

Prove that $j < n$, $k < n - j$ and $(n - j) - k = n - (j + k)$ if we know that $j + k < n$ in $\mathbb{N}$

Suppose $j + k < n$ in $\mathbb{N}$. Show that $j < n$ Show that $k < n - j$ Show that $(n - j) - k = n - (j + k)$ Thoughts for the Problems I'm not really good with proof, so I start to have some thoughts about it. I learned addition,…
NasuSama
  • 3,364
1
vote
1 answer

How would one prove that $\# (E \cup G) = \#(E) + \#(G)$?

For a set $E$ and $n \in \mathbb{N}$ we say $\# (E) = n$ if there is a bijection from $I_n$ to $E$, where $$I_n \overset{\text{def}}= \{k\in \mathbb{N}: k \leq n\}$$ Suppose that $\# (E) = n$, $\#(G) = k$ and $E \cap G = \varnothing$. Show…
NasuSama
  • 3,364
1
vote
1 answer

Using Fake Numerals to Make Real Decimal Numbers

The setup to this question is very simple: Take the numbers $\frac{1}{1}, \frac{21}{12}, \frac{321}{123},...,\frac{987654321}{123456789}$ and plot them versus the natural numbers, as seen here: https://i.stack.imgur.com/psgiz.png. Now, seeing that…
1
vote
2 answers

Reduce the base $11$ fraction $\dfrac{587}{749}$ to its lowest terms.

Reduce the base $11$ fraction $\dfrac{587}{749}$ to its lowest terms. $(\dfrac{587}{749})_{11}=\dfrac{5\times 11^2 + 8\times 11 + 7}{7\times 11^2 + 4\times 11 + 9}$ But $\dfrac{...+7}{...+9}$ can't be simplified any further, so I'm not sure how…
1
vote
4 answers

Transform $1001.12211$ from base $3$ to base $9$.

Transform $1001.12211$ from base $3$ to base $9$. Separately transform the integer and non-integer portion. The integer portion is divided by $9$: $$ \begin{array}{ r|cc } 9&1&0&0&1 \\ \hline &&&3&1 \\ \end{array} $$ Therefore $1001_3=31_9$. For…
1
vote
2 answers

Determine the number base $x$ if $(59.5)_{(x)} = (89.3125)_{(10)}.$

How can I determine the base number system $x$ of two decimal numbers using an equation?
KHAWAYA
  • 63
1
vote
1 answer

In number systems, we use remainders for conversion and how actually this thing work out?

Like for example, **PART 1** while converting a decimal number to octal number, we divide given decimal number by '8' until we get quotient equal to '0' and write remainders in reverse order to get corresponding octal…
1
vote
1 answer

Conversion between numeral systems.

I would like to know if there is a "standard" for converting a number of base N to a number of base N. For example, 117 decimal to 728 of "213 base". Any random base to any random base, not only decimal to binary, etc. I would like to know if there…
1
vote
2 answers

Number System , Bases. Need help understanding the solution for this question

$$121x+11y+z=567$$ What is $x+y+z$, given $x,y,z$ are digits of a $3$-digit number $(xyz$). I am stuck at this step: $$ (xyz)_{11}=(567)_{10} $$ Is the above step correct or is this correct: $(xyz)_{11}=(567)_{11}$? Also please explain the choice.
1
vote
2 answers

Algorithm to find the number of numbers which are both perfect square as well as perfect cube

I was teaching indices chapter to my brother when I got this idea to find the number of numbers which are perfect squares as well as perfect cubes. I was wondering whether there is an algorithm to find these numbers between a fixed range like…
0decimal0
  • 113
1
vote
2 answers

Logic behind base to number conversion

I am trying to understand and visualize the logic behind the base conversion method. By "base" I mean how many numbers in a number system: The decimal number system we use every day has 10 digits {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} and so it is Base…
1
vote
2 answers

Nos Systems Ten

How do I find $4$ digit $10$'s complement of $-456$ (withbase $10$)? I am able to do $4$ digit $10$'s complement of a positive number (base 10) using the formula $base^n - number$ where $n$ is the number of digits, in this case $4$. i.e. $4$ digit…
domster
  • 115
  • 6
1
vote
2 answers

Significant figures: Is the answer on this question correct?

A google form question So I got this question in a test and options 2, 3 and 4 were wrong, in my view. So I chose a random option and I got it wrong. Upon further enquiry, the teacher explained that the second and fourth option was actually correct…