For those who like multiplying

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

For those who like multiplying

Koen_Be3840
MLU.jpg

Adding a multiplying unit to your hack

111accccccdddjjj is used to send a command to the Hack ALU

100accccccdddjjj could be used to send a command to a MLU

a=0/1 acts as in ALU to calculate D*M or D*A in MLU

the first c=0/1 can be used to store the lower 16-bit array of the result or the high 16-bit array

101 110 for other hardware parts?

The multiplier respects signed numbers, so no need to correct.

Koen
Reply | Threaded
Open this post in threaded view
|

Re: For those who like multiplying

cadet1620
Administrator
Koen_Be3840 wrote
the first c=0/1 can be used to store the lower 16-bit array of the result or the high 16-bit array
To get the upper 16 bits will require a full 16x16 multiplier generating a 32-bit product. For unsigned multiplication, this has the obvious structure

        AAAA
        BBBB
    --------
        NNNN
       NNNN
      NNNN
     NNNN
    --------
    XXXXXXXX

This structure is a bit more complicated for 2's compliment multiplication. Note that 's' is a sign extension bit—a copy of the partial product's sign bit. Also note that the final partial product is subtracted.

        AAAA
        BBBB
    --------
    ssssNNNN
  + sssNNNN
  + ssNNNN
  -(sNNNN   )
    --------
    XXXXXXXX

With some not so obvious manipulation, most of the extra adders can be eliminated. 'Ñ' is ~N.

        AAAA
        BBBB
    --------
       1ÑNNN
       ÑNNN
      ÑNNN
    1NÑÑÑ   
    --------
    XXXXXXXX

--Mark

Reply | Threaded
Open this post in threaded view
|

Re: For those who like multiplying

Koen_Be3840
Like this : MLU.pdf