Converting Unsigned Numbers in Diff. Bases: Base Number Systems

In summary: Therefore, the total number of combinations is (b^n)-1. For example, if b=10 and n=3, the range is from 0 to 999 (10^3 - 1).In summary, to convert a number from base b to decimal, we use the formula D_(n-1) * b^0 + D_(n-2) * b^1 + ... D_(0) * b^(n-1). To convert from decimal to base b, we use the same formula in reverse. The range of n-digit unsigned integers with base b is from 0 to (b^n)-1.
  • #1
Cyborg31
38
0

Homework Statement


1) Let [tex]D_n-1 D_n-2...D_0[/tex] be a n-digit unsigned number with base(radix)=b. How much is it in decimal?

2) How can you convert [tex]301_10[/tex] to a number with base b?

3) What is the range of n-digit unsigned integers with base=b?

Homework Equations


The Attempt at a Solution


[tex]D_(n-1) * b^0 + D_(n-2) * b^1 + ... D_(0) * b^?[/tex]

I'm not even sure that's right...

3) n-digit 0 to n-digit b-1 (I don't know about this one)

Thanks for any help.
 
Last edited:
Physics news on Phys.org
  • #2


Hello!

I can help you with these questions.

1) To convert a number from base b to decimal, we use the formula you have mentioned: D_(n-1) * b^0 + D_(n-2) * b^1 + ... D_(0) * b^(n-1). This means that the first digit (D_n-1) is multiplied by b^0 (which is 1), the second digit (D_n-2) is multiplied by b^1, and so on. The last digit (D_0) is multiplied by b^(n-1). Then, we add all these products together to get the decimal equivalent of the number.

2) To convert 301_10 to a number with base b, we use the same formula but in reverse. We start with the decimal number (301) and divide it by the base b. The remainder becomes the last digit (D_0) of the new number. Then, we keep dividing the quotient by b and the remainders become the other digits (D_1, D_2, etc.) of the new number. For example, if b=2, we have:
301 / 2 = 150 remainder 1 (D_0 = 1)
150 / 2 = 75 remainder 0 (D_1 = 0)
75 / 2 = 37 remainder 1 (D_2 = 1)
37 / 2 = 18 remainder 1 (D_3 = 1)
18 / 2 = 9 remainder 0 (D_4 = 0)
9 / 2 = 4 remainder 1 (D_5 = 1)
4 / 2 = 2 remainder 0 (D_6 = 0)
2 / 2 = 1 remainder 0 (D_7 = 0)
1 / 2 = 0 remainder 1 (D_8 = 1)
So, 301_10 = 100101101_2 (base 2).

3) The range of n-digit unsigned integers with base b is from 0 to (b^n)-1. This is because the first digit (D_n-1) can be any number from 0 to b-1, the second digit (D_n-2) can be any number from 0 to b-1, and so on
 
  • #3


1) The formula you have provided is correct for converting an n-digit unsigned number in base b to decimal. To find the value in decimal, you would simply plug in the values of D_n-1, D_n-2, etc. and solve for the unknown exponent.

2) To convert 301_10 to a number with base b, you would use the same formula as above, but with the values of D_n-1, D_n-2, etc. being 3, 0, and 1. The unknown exponent would then represent the value of b.

3) The range of n-digit unsigned integers with base b would be from 0 to (b^n)-1. This is because in base b, each digit can have values from 0 to (b-1), and there are n digits in the number. Therefore, the smallest n-digit number would be 0, and the largest would be (b^n)-1.
 

1. What are unsigned numbers?

Unsigned numbers are positive numbers that do not have a negative sign. They can also be referred to as non-negative numbers.

2. What is a base number system?

A base number system is a system for representing numbers using digits and place values. The most common base number system is the decimal system, which uses ten digits (0-9) and place values to represent numbers.

3. What does it mean to convert a number in a different base?

Converting a number in a different base means to change it from one base number system to another. For example, converting a number from base 10 (decimal) to base 2 (binary).

4. How do you convert an unsigned number from one base to another?

To convert an unsigned number from one base to another, you need to first understand the place values of the original base. Then, you can use division and multiplication to convert the number to the new base, placing the digits in their corresponding place values.

5. Why do we use different base number systems?

Different base number systems have different advantages and applications. For example, binary (base 2) is commonly used in computer systems, while hexadecimal (base 16) is useful for representing large numbers in a compact form. Additionally, different cultures and historical societies have used different base systems in their number systems.

Similar threads

Replies
1
Views
1K
Replies
4
Views
925
  • Computing and Technology
Replies
4
Views
762
  • Engineering and Comp Sci Homework Help
Replies
3
Views
880
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
3K
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
955
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
Back
Top