What is an easy way to multiply a binary number by 255?

Status
Not open for further replies.

vijayiyer

Junior Member level 1
Joined
May 16, 2007
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,373
Hi All,

Can you help me out with this problem.

Question: What is an easy way to multiply a binary number by 255?


Thank you
 

Re: Help Required!

x*255 = x*256 - x*1
= Shift by 8 - x

Hope this helps..
 

Re: Help Required!

left shift by 8 times is the better way....
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…