Non-Integral Bases in Computer Science | CompSci Forum Discussion

  • Thread starter abhishek
  • Start date
  • Tags
    Bases
In summary, non-integral bases are a type of number which do not have a repeating decimal expansion. They can be thought of as bases which are not integers, and the same processes for understanding and converting integer bases apply to them. There are some applications of non-integral bases, but they are not well known and further information is needed.
  • #1
abhishek
40
0
Apologies if this is in the wrong forum. :smile:

In a discussion we're having on our compsci forums at uni, about binary numbers, someone brought up the notion of non-integral bases. I take it to mean numbers with bases that aren't integers. Is this right?

I've never encountered such a thing before, so I'm curious about it. I've only seen bases defined as integers - is it valid to think of non-integral bases? Do the same processes for understanding and converting integer bases apply to non-integers?

I have no specific questions, really. How does it work? How is it meaningful? What are some applications of it? Links to further information would be nice.

Searching the web turns up almost no information about this, so I wonder if it goes by any other names too.

Thanks to anyone who can shed some light on the matter. :smile:
 
Physics news on Phys.org
  • #2
No, I believe it's problematic. Imagine taking base [itex]\pi[/itex]. Then [itex]\pi[/itex] would have a finite [itex]\pi[/itex]-ary expansion. What's worse is that it doesn't make sense to use decimals in this case. When you have a base n, then the digits in your expansion can take values from {0, 1, .., n-1}. What if you have base [itex]\pi[/itex]? There's no reasonable choice.
 
  • #3
This can be done.
call our base b
1234(base b)=1*b^3+2*b^2+3*b+a
as usual digits are chosen as integers such that 0<=digit<=b
any positive real except one can be used as a base.
The two main problems that arise are
1) accuracy can become an issue and rational numbers have not reapeating decimal expansions.
2) non uniqueness. This has to do with algebraic bases.
2=10=1.01010101010101010101... (base sqrt(2))
4=10000=100=11.010000010010... (base sqrt(2))
here are some things in base pi
pi=10 (base pi)
e=2.2021201002111122001 (base pi)
17=120.2200211010202300
 
  • #4
AKG said:
No, I believe it's problematic. Imagine taking base [itex]\pi[/itex]. Then [itex]\pi[/itex] would have a finite [itex]\pi[/itex]-ary expansion. What's worse is that it doesn't make sense to use decimals in this case. When you have a base n, then the digits in your expansion can take values from {0, 1, .., n-1}. What if you have base [itex]\pi[/itex]? There's no reasonable choice.
pi=10 (base pi) is not a problem
Even though the base is nonintegral the digits are still integers.
 
  • #5
but the concept raises an interesting question : what can you say about a number which has a periodic development in base pi ?
such as a = 1.0101010101(base pi) = pi+pi^3+pi^5+...
it is tempting to name those numbers "rationals in base pi"
However, they look like p-adic numbers, because of the infinite right part.
They also look like elements of an hilbert space, or infinite polynomials in pi

what about addition, multiplication, ... of those numbers ? is there a closed operation ?
 

1. What are non-integral bases in computer science?

Non-integral bases in computer science refer to a number system where the base is not a whole number. This means that the digits used to represent numbers can include fractions or decimals, unlike the traditional base 10 system which only uses whole numbers (0-9). Examples of non-integral bases include binary, octal, and hexadecimal systems.

2. Why are non-integral bases important in computer science?

Non-integral bases are important in computer science because they allow for a more efficient representation of data. For example, binary (base 2) is commonly used in computer systems because it only requires two digits (0 and 1) to represent all numbers, making it easier for computers to process and store data.

3. How are non-integral bases used in programming?

Non-integral bases are used in programming for a variety of tasks, such as representing binary data, performing bitwise operations, and encoding characters and symbols. They are also used in data structures and algorithms, particularly in areas such as cryptography and data compression.

4. Are there any disadvantages to using non-integral bases in computer science?

One potential disadvantage of using non-integral bases is that they can be more difficult for humans to understand and work with compared to the traditional base 10 system. Additionally, converting between different non-integral bases can be complex and time-consuming.

5. What are some common non-integral bases used in computer science?

Some common non-integral bases used in computer science include binary (base 2), octal (base 8), and hexadecimal (base 16). Other less commonly used bases include ternary (base 3), quaternary (base 4), and base 12. Each of these bases has its own advantages and use cases in computer science.

Similar threads

  • STEM Academic Advising
Replies
6
Views
3K
Replies
2
Views
48
  • Feedback and Announcements
Replies
25
Views
2K
Replies
2
Views
854
Replies
1
Views
793
Replies
10
Views
2K
  • Programming and Computer Science
Replies
32
Views
3K
Replies
6
Views
756
  • Linear and Abstract Algebra
Replies
4
Views
3K
Replies
2
Views
1K
Back
Top