Number Base Representation

When learning to count, we were taught the digits \( 0, 1, 2, 3, 4, 5, 6, 7, 8, \) and \(9\). We were told that the next number in the sequence is \(10\), which consists of the digit \(1\) written next to \(0\). This is the Hindu-Arabic numeral system, which represents a number using the place-value notation. The number \( 321\) is interpreted as \( 3 \times 10^2 + 2 \times 10^1 + 1 \times 10^0 \). These calculations are done in base 10, which is partially explained by having 10 fingers (including thumbs) which we use to count.

The use of place-value notation in base 10 is not standard throughout history. In fact, many of the great historical civilizations used their own form of number systems. For example, the Babylonains used a sexagesimal (base 60) numeral system, which allowed them to simply represent several fractions. Due to their influence, we now have 60 seconds in a minute, 60 minutes in an hour, and 360 degrees in a circle.

How does number base representation work? The base is the number of unique digits (including zero), which are used in the representation. In this post, (X)b (X)_b will denote the number XX in base bb. If a base is not given, it is assumed to be 10.

Suppose that Brilli the ant uses a base 6 system, as she has 6 legs for counting. What would the number (321)6 (321)_6 mean to us?

Working from the right, we see that there is 1 unit of 60=1 6^0 = 1 , and then 22 units of 61=66^1=6 , and finally 3 units of 62 6^2 . Hence, we can calculate that

(321)6=3×62+2×61+1×60=121. (321)_6 = 3 \times 6^2 + 2 \times 6^1 + 1 \times 6^0 = 121.

More generally, we can convert a number in base bb into our decimal system via

(bnbn1b1b0)b=bn×bn+bn1×bn1++b1×b1+b0×b0. (b_n b_{n-1} \dots b_1 b_0 )_b = b_n \times b^n + b_{n-1} \times b^{n-1} + \ldots + b_1 \times b^1 + b_0 \times b^0.

How do we reverse this process? What would our number (321)10 (321)_{10} mean to Brilli the ant? We need to find numbers bi b_i , each taking value 0,1,2,3,40, 1, 2, 3, 4 or 55. It can be tedious to guess and check, so we use the following algorithm. We start by performing division by bb, and record the remainder. We then take the dividend and divide that by bb again, and record the remainder. This process continues till the dividend is finally 0. We then read the remainders that have been obtained. As an explicit example, to calculate 321 321 in base 6, we perform the steps:

321321=53×6+35353=8×6+588=1×6+211=0×6+1 \begin{array}{l | lll} 321 & 321& = 53 \times 6 &+ 3\\ 53 & 53 &= 8 \times 6 &+ 5 \\ 8 & 8 &= 1 \times 6 &+ 2 \\ 1 & 1 &= 0 \times 6 &+ 1 \\ \end{array}

As such, the algorithm tells us that (1253)6=321 (1253)_6 = 321 .

Worked Example

1. Convert (123)9 (123)_9 into base 3.

Solution: We will work through base 10. First, we convert (12345)9(12345)_9 into base 10. From the above, we know that

(123)9=1×92+2×91+3×90=102. (123)_9 = 1 \times 9^2 + 2\times 9^1 + 3 \times 9^0 = 102.

Next, we use the algorithm to convert to base 3.

102102=34×3+03434=11×3+11111=3×3+233=1×3+011=0×3+1. \begin{array} {l | lll} 102 & 102 & = 34 \times 3 &+ 0 \\ 34 & 34 & = 11 \times 3& + 1\\ 11 & 11 & = 3 \times 3 &+ 2 \\ 3 & 3 & = 1\times 3 &+ 0 \\ 1 & 1 & = 0 \times 3 & + 1. \\ \end{array}

Hence (10210)3=102=(123)9 (10210)_3 = 102 = (123)_9 .

 

2. Why does this algorithm to convert into base bb work?

Solution: Suppose we want to convert a number NN into base bb. If N=(bnbn1b1b0)bN = (b_n b_{n-1} \ldots b_1 b_0 )_b, then we know that Nb0=b(bn×bn1+bn1×bn2++b1×b0) N - b_0 = b ( b_n \times b^{n-1} + b_{n-1} \times b^{n-2} + \ldots + b_1 \times b^0 ) is a multiple of bb. But since 0b0<b 0 \leq b_0 < b , this tells us that b0b_0 must be the remainder when NN is divided by bb.

We are now interested in Nb0b \frac{ N - b_0} { b} . Similarly, we obtain that b1 b_1 must be the remainder when Nb0b \frac{N-b_0} { b} is divided by bb. We repeat this process till we terminate at 00.

#NumberTheory #NumberBaseRepresentation #KeyTechniques #NumberThoery

Note by Arron Kau
7 years, 2 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

Cool note!!!

Yash Singhal - 6 years, 8 months ago

Awesome n cool note!!!

Opi Dipto - 6 years, 5 months ago
×

Problem Loading...

Note Loading...

Set Loading...