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.

886 questions
-2
votes
1 answer

Find digits of n number integer with a mathematical formula.

Consider a number abcde. Here, we have 5 digits in that number. Let, say this abcde = n. Then I want a single mathematical function which tells how much digits are there in n. They could be 3 or 100. In programming it's easy but it requires more…
umair mughal
  • 9
  • 1
  • 4
-2
votes
1 answer

How do I expand $\sqrt{8}$ in base $\frac{1}{2}$

Instead of binary, I need the base $b=0.5$ There is an online tool or an easy software that does change of base to non integer bases?
Cito Ejoy
  • 37
  • 4
-2
votes
2 answers

What is the total number of bases (base 2, base 10, etc)available in our number system?

As we have different numeral bases in number system such as base 2(binary), base 10(decimal) etc. As binary (base 2) is smallest among all, is there a base value that is maximum?I was trying to search the total number of bases available in our…
mrsan22
  • 101
  • 1
-2
votes
1 answer

why octal number system jumping from 7 to 10 instead 8?

I know the question is really confusing but I have a questin about Octal number system. I am reading a book and on the counting in octal as shown 0,1,2,3,4,5,6,7,10,11,....,16,17,20 ? why does the number is not followed by 8,18,19 and so on?…
yeahcool
  • 1
  • 1
  • 2
-3
votes
1 answer

Can there be a numbersystem in which π is rational?

π is in our decimal numberssystem an irrational number, witch means that it cannot be produced as a fraction: π ∉ {x | x = $\frac{x}{y}$, x, y ε ℕ} My question is, wheather if there is a numbersystem in witch π isn’t irrational. I mean,…
Maron
  • 1
  • 1
-3
votes
1 answer

Is there any way to finitely represent all the information in pi?

Of course, we can represent it as 10 in base pi but that won't be much useful. Think of pi as a length from 0 to some unique point on the real line. A length which cannot be finitely expressed in any integer base system because integer base systems…
Ryder Rude
  • 1,233
  • 7
  • 18
-3
votes
3 answers

Why do factorials of big numbers have so many trailing zeros?

For example 999! = 402387260077093773543702433923003985719374864210714632543799910429 9385123986290205920442084869694048004799886101971960586316668729948085589 0132382966994459099742450408707375991882362772718873251977950595099527612 …
Murad
  • 351
  • 2
  • 12
-3
votes
1 answer

Why do 4 digit binary numbers have 16 solutions, and 3 digits 8?

If I have a 4 digit binary number, how come there are 16 possible "numbers", and similarly, if I have a 4 digit binary number, how come there are 8 possible "numbers?"
Ms.Simpson
  • 13
  • 2
-3
votes
1 answer

How many ordered pairs (x, y) exist which satisfy the following equation? Both x and y are whole numbers.

$x \cdot\ y=2^2\cdot\ 3^4 \cdot\ 5^7 \cdot(x+y)$ I have tried rearranging the equation to different formats but not getting anywhere.
Kalpit
  • 37
  • 7
-3
votes
1 answer

Base Number Arithmetic

I got no idea how to solve that problem. What I have done so far is I have randomly guessed numbers. I wanted to know a faster way to solve it in the future, just in case of some even more complex cases.
Houdineo
  • 213
  • 1
  • 10
-4
votes
1 answer

Multiplicative inverse of a non-zero element "a" belongs to integers

Multiplicative inverse of a non-zero element a ∈ Z is _______. 1 -a 1/a Not defined I have search about this and found two references Reference 1 and Reference 2 and their answers are 3 and 4 respectively. I am just confused which one is correct…
-4
votes
2 answers

base 13 12 11 10 HELP

Convert the last four digits 122917 number to base 13, where A, B, and C correspond to 10, 11 and 12 does anyone know how would i start this ?
-4
votes
2 answers

A number system uses $7$ as its base. In such system, $2^{10} =$?

Basically, the question asks what is: $(2^{10})_7 = x_7$ Where x is an integer. Now I have two questions: Is there a property wherein $(A^x)_y = (A^y)_x$? If so, then please explain how that's possible ? Had this question been $(2^8)_7 = x_7$,…
Raghu
  • 47
  • 4
-4
votes
1 answer

Representation of Number in hexal system

A number written as 213 in quadral system (number system with base 4) will be represented in hexal system (number system with base 6) as (A) 23 (B) 39 (C) 103 (D) 303
-5
votes
1 answer

Why $0.999$... isn't the largest number before 1?

Why doesn't it called like that? It seems fair, $1$ called $1$ while $0.999$... being the largest number before $1$, and not called $1$ while not look like it is. Let's say it isn't, how would that number look like?
KugBuBu
  • 123
  • 6
1 2 3
59
60