Continue to Site

# How to do 255*X without a multiplier?

Status
Not open for further replies.

#### anantha_09

##### Member level 4
Without using a multiplier how could we perform 255*X?

Re: question

If it is digital, then you can shift left 8 times to for multiply by 256 then subtract by x. So mathematically this is x*256 - x = x*(256 - 1) = x*255 .

Re: question

true.

there is an official name for this kind of logic alled "canonical signed digit".

that is, for this kind of "constant * variable", you can pretty much convert this form into a series of adder and substractor instead of using an multiplier. For certain types of constants, it will save a lot of areas. The optimal form is called "cononical signed digit".

Just like what heyheyhey replied, his form is cononical.

Re: question

let me confirm onething

if a number is shifted left it is multiplied

and if shifted right it is divided

is this rite?

any material on this kind of stuff would be of great help

Re: question

why don't you shift a number on paper, and find out for yourself?

just convert a decimal number to binary ... left shift it once ... and reconvert it back to decimal... what do you get??

do the same for right shifts...

question

Shift to the left X eigth bit 8 and retrive X

Status
Not open for further replies.