Show that in any base b2, the sum of any three single-digit numbers is at most two digits long.

Short Answer

Expert verified

Sum of any three single digit number is not as long as of a two-digit number.

Step by step solution

01

Find equation of sum of digits

Let’s assume p,q,r be the single digit numbers in base b.

Let sum of these number besumgiven as:

sum=p+q+r

Given that:

Value of p,q,rlies in range b2

Here, p,q,ris at most b1. For example: in base 10 maximum single digit is 9.

02

Calculate the value of sum

sum=p+q+r=(b1)+(b1)+(b1)=3(b1)

For b=2,

sum=3(21)=3×1=3

Here, sum is a single digit number.

For b=3,

sum=3(31)=3×2=6

Here, sum is a single digit number.

For b=9,

sum=3(91)=3×8=24

Here, sum is a two-digit number.

Thus, the sum is less than b2 and b2 in any base, sum is less than b2 that is represented in two digits.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

If p is prime, how many elements of{0,1,...pn-1} have an inverse modulopn ?

Determine necessary and sufficient conditions on xandc so that the following holds: for anya,b, if axbxmodc, thenabmodc .

The grade-school algorithm for multiplying two n-bit binary numbers x and y consist of addingtogethern copies of r, each appropriately left-shifted. Each copy, when shifted, is at most 2n bits long.
In this problem, we will examine a scheme for adding n binary numbers, each m bits long, using a circuit or a parallel architecture. The main parameter of interest in this question is therefore the depth of the circuit or the longest path from the input to the output of the circuit. This determines the total time taken for computing the function.
To add two m-bit binary numbers naively, we must wait for the carry bit from position i-1before we can figure out the ith bit of the answer. This leads to a circuit of depthΟ(m). However, carry-lookahead circuits (see
wikipedia.comif you want to know more about this) can add inΟ(logn)depth.

  1. Assuming you have carry-lookahead circuits for addition, show how to add n numbers eachm bits long using a circuit of depth Ο(lognlogm).
  2. When adding three m-bit binary numbers x+y+z, there is a trick we can use to parallelize the process. Instead of carrying out the addition completely, we can re-express the result as the sum of just two binary numbersr+s, such that the ith bits of r and s can be computedindependently of the other bits. Show how this can be done. (Hint: One of the numbers represents carry bits.)
  3. Show how to use the trick from the previous part to design a circuit of depthΟ(logn)for multiplying two n-bit numbers.

Calculate 2125mod127using any method you choose. (Hint: 127 is prime.)

How many integers modulo113 have inverses?(Note:113=1331)

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free