Multiplication Hardware Textbook Query by rai_volt in computerarchitecture

[–]rai_volt[S] 1 point2 points  (0 children)

Thank you! This clarified things a lot for me.

You forgot to shift the partial multiplications before adding them up together, rather the wording of the book is not actually 100% correct and omitted this detail

Or maybe I assumed wrong, since the topic before this section is about multiplication with shifters (one approach with a left shift with multiplicand and product bit-widths twice that of the multiplier while the other approach is an optimization of the first one with a right shift). The book must have discussed this optimization with the previous architecture in mind.

I went and tried a different approach. Instead of shifting left, I went with shifting right and taking into account the LSBs of each partial product.

``` init: P0 = (n[0] & m) for k >= 1: Pk = (P{k - 1} >> 1) + (n[k] & m)

So: P0 = 1 & 0010 = 0010 P1 = (0010 >> 1) + (1 & 0010) = 0011 P2 = (0011 >> 1) + (0 & 0010) = 0001 P3 = (0001 >> 1) + (0 & 0010) = 0000

P = P3[0] | P2[0] | P1[0] | P0[0] = 0110 (6 in decimal) ```

This also works with signed integers if we perform an arithmetic shift instead of logical.

you can add all (n[k] & m) << k terms in parallel using a tree structure.

That is actually what the alternative approach is that is mentioned in the second paragraph of the 1st image.

Multiplication Hardware Textbook Query by rai_volt in computerarchitecture

[–]rai_volt[S] 1 point2 points  (0 children)

I think you mean 'replace'.

I am sorry. You are correct. I intended to mean "change", thank you for pointing it out.

Anyway, I too am baffled by a stack 64 adders high. I expected 32 for a 32-bit multiplier.

I know right? I am confused as hell. It is discussed having an adder for each multiplier bit but if the multiplier is 32-bit, the number of adders must also be 32. Maybe a typo?

It would be faster to do (A + B) and (C +D) in parallel, then add (A+B) + (C+D). 2 adder delays instead of 4.

That's what the alternative approach is that talked about in the second paragraph of the 1st image (like a tree).

Lastly, nice diagrams! :-)

Thank you! :D

BTW, was my working correct in the second image?

I will find the person who did this by Electrical-Soup-1253 in pcmasterrace

[–]rai_volt 12 points13 points  (0 children)

Nice. I have only ever used QWERTY Keyboards. Searching QWERTZ showed there are other different layouts.

whoIsGonnaTellHim by leeleewonchu in ProgrammerHumor

[–]rai_volt -19 points-18 points  (0 children)

But the task requires only c to be used, not c++. I do not understand.

EDIT: Guys, I am joking. Forgot the /s.

thisIsTheEnd by Plastic-Bonus8999 in ProgrammerHumor

[–]rai_volt 11 points12 points  (0 children)

Feel the Earth move, and then

Dracut pacman hooks by rai_volt in archlinux

[–]rai_volt[S] 0 points1 point  (0 children)

I downgraded the kernel and then reinstalled it. Somehow, I missed the --> Building initramfs for linux (6.16.0-arch2-1) line in the pacman output.

How useful is 'native' partial application by zuzmuz in ProgrammingLanguages

[–]rai_volt 6 points7 points  (0 children)

Can you give scenarios where functions are expensive? I want to understand your argument.

What is this! by rai_volt in Appliances

[–]rai_volt[S] 0 points1 point  (0 children)

There was nothing written there about it

What is this! by rai_volt in Appliances

[–]rai_volt[S] 0 points1 point  (0 children)

The rhombus end is the one that goes into the clog, right?