3 Bit Multiplier Truth - Table !!top!!
# Convert the product to binary P_bin = bin(P_dec)[2:].zfill(6)
For example, if A = 101 (5 in decimal) and B = 110 (6 in decimal), the product P = 101 x 110 = 11110 (30 in decimal). In binary, P = 11110. 3 bit multiplier truth table
To convert the truth table into a working circuit, engineers typically use a combination of and Adders (Half Adders and Full Adders). # Convert the product to binary P_bin = bin(P_dec)[2:]
| 1 1 0 | 0 0 0 | 0 0 0 0 0 0 | 0 | | 1 1 0 | 0 0 1 | 0 0 0 1 1 0 | 6 | | 1 1 0 | 0 1 0 | 0 0 1 1 0 0 | 12 | | 1 1 0 | 0 1 1 | 0 1 0 0 1 0 | 18 | | 1 1 0 | 1 0 0 | 0 1 1 0 0 0 | 24 | | 1 1 0 | 1 0 1 | 0 1 1 1 1 0 | 30 | | 1 1 0 | 1 1 0 | 1 0 0 1 0 0 | 36 | | 1 1 0 | 1 1 1 | 1 0 1 0 1 0 | 42 | | 1 1 0 | 0 0 0
| A | B | P | | --- | --- | --- | | 000 | 000 | 000000 | | 000 | 001 | 000000 | | 000 | 010 | 000000 | | ... | ... | ... | | 111 | 111 | 111111 |
These are used to generate the partial products. For example, A0cap A sub 0 B0cap B sub 0 gives the first bit of the product ( P0cap P sub 0