Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Computer multiplication. One way to multiply two integers A times B is to add A to itself B times. But this is rather inefficient for

Computer multiplication. One way to multiply two integers A times B is to add A to itself
B times. But this is rather inefficient for a large number, since, for example, to multiply
by 100 could require 100 separate additions. However, when expressed in binary, 100 takes
only 7 bits (01100100). By using bit shifting (RLF or RRF) operations along with addition,
the number of iterations can be reduced, depending on the maximum sizes of the numbers
allowed in a memory unit.
The largest number one can store on our PIC16F88 is 255(all 8 bits set to 1). With this
in mind, consider multiplying two 4-bit numbers together and putting the result into an 8-
bit register by using shifting and adding. The table below shows a multiplication of 3\times 13
following such an algorithm where the shifts rotate through carry (car below). Each row
shows the contents of C, B and A at the end of each iteration, along with the operations
performed:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions