It compressors 4 inputs to 2 inputs. This is used to compress partial products inside multipliers
Follow the truth table of 4:2 compressor online with 4 inputs and carry_in bit and observe the 2 outputs and carry_out bit
| # | Input | Output |
|---|---|---|
| 0 | a1 is one of the 4 main input bits | o1 is the one of the 3 compressed output bits |
| 1 | a2 is one of the 4 main input bits | o2 is the one of the 3 compressed output bits |
| 2 | a3 is one of the 4 main input bits | cout is the carry_out bit |
| 3 | a4 is one of the 4 main input bits | |
| 4 | cin is the carry_in input bit | |
| 5 | ||
| 6 | ||
| 7 |