I'm trying to figure out how to multiply by a binary number by 0.8 if you can only add numbers to it and shift it left or right once at a time.
Multipy by 0.8 with only add and shift
Started by tman_ndsu08, Jan 25 2007 07:50 PM
3 replies to this topic
#1
Posted 25 January 2007 - 07:50 PM
|
|
|
#2
Posted 25 January 2007 - 08:06 PM
Nevermind, my instructor is a complete tool.
His solution is that .8 is approx. equal to .75 so we should divide the number by 2 and divide it by 4, then add those together.
His solution is that .8 is approx. equal to .75 so we should divide the number by 2 and divide it by 4, then add those together.
#3
Posted 26 January 2007 - 06:33 AM
That doesn't make a lot of sense to me. .8 = .75? How is that possible? 3/4 = .75 but not .8.
#4
Posted 28 January 2007 - 11:10 AM
It's approximately equal, according to him.
I don't think it's possible to multiply by .8 if you can only shift right (divide by 2), shift left (multiply by 2), and add.
Just fyi, I'm using a PIC so there is no floating point operation.
I don't think it's possible to multiply by .8 if you can only shift right (divide by 2), shift left (multiply by 2), and add.
Just fyi, I'm using a PIC so there is no floating point operation.


Sign In
Create Account

Back to top









