Dazed&Confused
- 190
- 3
Homework Statement
A particular logic gate takes two binary inputs [itex]A[/itex] and [itex]B[/itex] and has two binary outputs [itex]A'[/itex] and [itex]B'[/itex]. I won't reproduce the truth table. Suffice to say every combination of [itex]A[/itex] and [itex]B[/itex] is given. The output is produced by [itex]A' = \text{NOT} \ A[/itex] and [itex]B' = \text{NOT} \ B[/itex]. The input has Shannon entropy of 2 bits. Show that the output has a Shannon entropy of 2 bits.
A second logic has output produced by [itex]A' = A \ \text{OR} \ B[/itex] and [itex]B' = A \ \text{AND} \ B[/itex]. Show that the output now has an entropy of [itex]\frac32[/itex] bits.
Homework Equations
[tex]S = - \sum_{i} k P_i \log P_i[/tex]
The Attempt at a Solution
From what I (don't) understand, [itex]P = \frac12[/itex] in the first example for [itex]A, B, A',B'[/itex] so the total number of bits is the same for both input and output. For the second example, I would say [itex]P_{A'} = \frac34[/itex] and [itex]P_{B'} = \frac14[/itex], but that does not produce the correct number of bits.