Hi all.
I have been trying to get my head around the Booth Algorithm and I'm having some trouble working figuring out how it works. In particular I am having trouble trying to work out one of the examples given on that site, and how they have done it:
The bolded line is the one I am having difficulty with. How did they get to that line by doing a 'subtract and shift'?Code:M A Q Qprev 01001 00000 01110 0 Load 01001 00000 00111 0 Shift only 01001 11011 10011 1 Subtract and shift 01001 11101 11001 1 Shift only 01001 11110 11100 1 Shift only 01001 00011 11110 0 Add and shift
When I subtract 01001 from 00111 I get a series of 1s depending on the size of the variable, ending in 10.
I suppose I must have understood it wrong, so could someone please explain this to me?




Reply With Quote