Prove that the grade-school multiplication algorithm (page 24), when applied to binary numbers, always gives the right answer.

Short Answer

Expert verified

Grade school multiplication can be defined as finding the multiplication by multiplying the elements in parts.

Step by step solution

01

Introduction

An algorithm (or method) for multiplying two integers is known as a multiplication algorithm. Many alternative algorithms are employed, depending on the magnitude of the numbers. Since the introduction of the decimal system, efficient multiplication algorithms have been available.

02

Calculation

Let’s take an example of binary of 143.

1101×10111101(1101times1)1101(1101times1,shiftedonce)0000(1101times0,shiftedtwice)+1101(1101times1,shiftedthrice)10001111

03

Final Answer

So, the multiplication of the binary number 1101and1011is10001111i.e.143.

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

On page 38, we claimed that since about a 1nfraction of n-bit numbers are prime, on average it is sufficient to draw O(n)random n -bit numbers before hitting a prime. We now justify this rigorously. Suppose a particular coin has a probability p of coming up heads. How many times must you toss it, on average, before it comes up heads? (Hint: Method 1: start by showing that the correct expression isi=1i(1-p)i-1p . Method 2: if E is the average number of coin tosses, show that E=1+(1-p)E).

Unlike a decreasing geometric series, the sum of the1,12,13,14,15,..... diverges; that is,i=1n1i=

It turns out that, for large n , the sum of the first n terms of this series can be well approximated as

i=1n1iInn+y

where is natural logarithm (log base e=2.718...) and y is a particular constant 0.57721...... Show that

i=1n1i=θ(logn)

(Hint: To show an upper bound, decrease each denominator to the next power of two. For a lower bound, increase each denominator to the next power of 2 .)

What is 222006(mod3)?

Is the difference of 530,000and6123,456a multiple of31 ?

Quadratic residues. Fix a positive integer N. We say that a is a quadratic residue modulo N ifthere exists a such that ax2modN.
(a) Let N be an odd prime and be a non-zero quadratic residue modulo N. Show that there are exactly two values in{0,1,....,N-1} satisfying x2amodN.
(b) Show that if N is an odd prime, there are exactly(N+1)2 quadratic residues in {0,1,...,N-1}.
(c) Give an example of positive integers a and N such thatx2amodNhas more than two solutions in {0,1,...,N-1}.

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