Design a system which generates a 1 if (and only if) an odd number of buttons (ie 1 or 3) are being pressed.
Attempt (refer to attachment):
I dont understand why my attempt isnt right. I mean if you press both button 1 and 3 a '1' is produced and the unpressed button 2, produces a '1', as its '0' is inverted. As a result the AND-gate produces a logic 1.
I dont understand why my attempt isnt right. I mean if you press both button 1 and 3 a '1' is produced and the unpressed button 2, produces a '1', as its '0' is inverted. As a result the AND-gate produces a logic 1.
Why haven't you produced a truth table and evaluated it with a K-map? If you did, you would see that it is a 3-input XOR gate. A XOR is called a odd function because it has a output only when a odd number of bits are set. See the attachment for the correct way to work the problem.
Ratch
P.S. Notice how the top AND gate in the "correct" answer is connected wrong.
You're confusing the button symbols with the number of buttons pressed. Relable the buttons A, B & C and then redoo the question. Now an odd number of buttons pressed is still 1 or 3.
It doesn't matter what it is called. If you make a truth table and K-map it, then you come up with with 4 minterms in a sum of products (SOP) expression. The 4 minterm expression is easily implemented with 4 AND gates, 1 OR gate, and some inverters.