When it comes to the Decimal system, the addition of zero after a number is the result when that number is multiplied by ten. For instance, when you add a zero to the end of the number ‘4’, it becomes ‘40’, which is 4 times 10. As a means of expanding this, the addition of two or three zeros is the same as multiplying the number by 100 or 1000 respectively.
THE SHIFT REGISTER
Computers make use of the binary system and here, one can multiply by 2, simply by putting a zero after the number. If that is the case, then 110 (2+4=6 decimal) now turns to 1100 (4+8=12 decimal). More zeros can subsequently be added and it can be multiplied by 4,8,16 and so on (decimal). This process of multiplication is known as ‘shifting’, as one or zero is moved to the succeeding bit position, the first-bit position is occupied by a zero.
When it comes to multiplication with logic elements, various techniques are implemented. These elements usually, are expressed in a logic diagram as a ‘black box’ identified as the multiplier. More complex logic diagrams will see these and other ‘black boxes’ like square roots, adders and so on, combined into one large ‘black box’ known as Arithmetic Logical Unit (ALU).
At first, these boxes were huge and predominantly made up of vacuum tubes, but modern times have seen them miniaturized so they can even fit on a chip, while still working based on the same principle.
If one were to really think about it, multiplication is based on a concept of repetition – something computers happen to excel at. For instance, 2X4 is simply 2 in 4 places. Added up, one has 2+2+2+2 and the result will be 8. For a multiplier to be made for a computer, an adder and a means of counting have to be utilized as well.
Let’s take the same example from above, 2X4. The multiplier is going to have a single input taken from 2 – in binary 10 – which will then go to the 4-bit adder. Our second adder input will be formed by looping around the result from the initial adder.
The next number for multiplication, 4 – binary 100 – will set a flip-flop counter which will begin counting from 4 down to 1, with a single count pulse each time an addition is made. As a condition in order for the output of the adder to be routed to the adder’s input, the counter has to be ‘more than 1’. The first add, 10+10 binary – 2+2 decimal – will give a 100 binary, which is then taken back to the input which is restricted by the ‘more than 1’ counter, so it can be added back to 10 to result in 110 binary. Another 110+10 add is carried out, to result in 1000.
By now, the adder input is blocked as a result of the fact that the counter has counted down to one. The adder result output is allowed to be the result of the multiplier.
In order to apply this basic knowledge to the more complex multiplication of multi-bit numbers, one would need a larger number of adders controlled by some logic gates. Some timing can be applied as well so things don’t get jumbled up.