Crosswords1 min ago
Building With Logic Gates - Beats Me...
6 Answers
Plenty of smart guys and gals out there. Can you help me out, please?
I'm signed up to a puzzle and logic site called Brilliant and I got stumped by this question in a section portentously calling itself "Propositional Logic":
"You are designing a calculator display with digits like the ones shown above.
Consider the logic gates leading to the portion of the display marked [shows the digit 2].
The inputs are binary four digit numbers represented by the digits A,B,C and D.
Which gates go in the red boxes?[shows logical diagram with two anonymous logic gates]".
What does the question mean?
The "solution" starts with this observation: "We want every digit except 1 and 4 to pass through with a 1". It then goes through the steps for excluding the digits 0100 and 0001, finally producing the solution NOT ((B XOR D) AND NOT (A OR C)).
What has any of this to do with the number 2?
PS: the site does say that "No one has gotten this right yet.".
:
I'm signed up to a puzzle and logic site called Brilliant and I got stumped by this question in a section portentously calling itself "Propositional Logic":
"You are designing a calculator display with digits like the ones shown above.
Consider the logic gates leading to the portion of the display marked [shows the digit 2].
The inputs are binary four digit numbers represented by the digits A,B,C and D.
Which gates go in the red boxes?[shows logical diagram with two anonymous logic gates]".
What does the question mean?
The "solution" starts with this observation: "We want every digit except 1 and 4 to pass through with a 1". It then goes through the steps for excluding the digits 0100 and 0001, finally producing the solution NOT ((B XOR D) AND NOT (A OR C)).
What has any of this to do with the number 2?
PS: the site does say that "No one has gotten this right yet.".
:
Answers
Best Answer
No best answer has yet been selected by vetuste_ennemi. Once a best answer has been selected, it will be shown here.
For more on marking an answer as the "Best Answer", please visit our FAQ.It is difficult to visualise the question without the pictures, but here goes:
If the solution is as you say, you need to understand Boolean logic to get that each gate returns 1 (true) or 0 (false). In the equation, A OR C is 1 if either A or C or both are 1. NOT(something) inverts 1 to 0 or 0 to 1. B XOR D is 1 if B and D are different and 0 if they are the same digit. AND returns 1 only if both the numbers it joins are 1, and 0 otherwise.
Assuming the 4-digit number is ABCD in binary, with A, B, C and D each being either 0 or 1, then there are sixteen possible numbers as follows.
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
If you use each of these numbers in the solution equation the result is as follows. For example, using 0000 (A=0, B=0, C=0, D=0), then the equations is
NOT ((0 XOR 0) AND NOT (0 OR 0))
=NOT ((0) AND NOT (0))
=NOT ((0) AND (1))
=NOT (0)
=1
For 0001 we have
NOT ((0 XOR 1) AND NOT (0 OR 0))
=NOT ((1) AND NOT (0))
=NOT ((1) AND (1))
=NOT (1)
=0
Applying this logic to all sixteen ABCD numbers, only 0001 and 0100 (=4 in decimal) result in the equation value of 0, with the others all 1.
Now to the figure "2" in the question. I presume the calculator display is a single number made up of 3 horizontal and 4 vertical short lines in a square-cornered figure of 8. If we number those lines 1 to seven, say starting top left and numbering round the edge clockwise and ending with 7 in the middle, then to create a "2" in the calculator display we need the backlight for lines 2, 3, 5, 6, and 7 to be on (1) and 1 and 4 to be off (0). Having an equation like the one shown results in 1 and 4 off and the rest on as required.
If the solution is as you say, you need to understand Boolean logic to get that each gate returns 1 (true) or 0 (false). In the equation, A OR C is 1 if either A or C or both are 1. NOT(something) inverts 1 to 0 or 0 to 1. B XOR D is 1 if B and D are different and 0 if they are the same digit. AND returns 1 only if both the numbers it joins are 1, and 0 otherwise.
Assuming the 4-digit number is ABCD in binary, with A, B, C and D each being either 0 or 1, then there are sixteen possible numbers as follows.
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
If you use each of these numbers in the solution equation the result is as follows. For example, using 0000 (A=0, B=0, C=0, D=0), then the equations is
NOT ((0 XOR 0) AND NOT (0 OR 0))
=NOT ((0) AND NOT (0))
=NOT ((0) AND (1))
=NOT (0)
=1
For 0001 we have
NOT ((0 XOR 1) AND NOT (0 OR 0))
=NOT ((1) AND NOT (0))
=NOT ((1) AND (1))
=NOT (1)
=0
Applying this logic to all sixteen ABCD numbers, only 0001 and 0100 (=4 in decimal) result in the equation value of 0, with the others all 1.
Now to the figure "2" in the question. I presume the calculator display is a single number made up of 3 horizontal and 4 vertical short lines in a square-cornered figure of 8. If we number those lines 1 to seven, say starting top left and numbering round the edge clockwise and ending with 7 in the middle, then to create a "2" in the calculator display we need the backlight for lines 2, 3, 5, 6, and 7 to be on (1) and 1 and 4 to be off (0). Having an equation like the one shown results in 1 and 4 off and the rest on as required.
Thanks very much for your reply, Salty.
I understood the Boolean logic bit, but not the relevance of the excluded values to the 2 as displayed on the calculator display. So it's an algorithm used to construction the digital image by not drawing the horizontal "lines" 1 and 4?
I think the question on the Brilliant site could have been formulated with more detil.
But thanks again for your explanation. Off to open a Muscadet . Will drink to you.
Will look up tinypic, Tuvok.
I understood the Boolean logic bit, but not the relevance of the excluded values to the 2 as displayed on the calculator display. So it's an algorithm used to construction the digital image by not drawing the horizontal "lines" 1 and 4?
I think the question on the Brilliant site could have been formulated with more detil.
But thanks again for your explanation. Off to open a Muscadet . Will drink to you.
Will look up tinypic, Tuvok.
Related Questions
Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.