Upload
dulwich-physics
View
213
Download
0
Embed Size (px)
Citation preview
7/30/2019 Extension questions week 1
1/4
Logic Gate Puzzle
The digital display for a single digit (0 - 9) consists of seven segments, lit in combinations todisplay the digit. The number is stored in the calculator as a 4 - bit binary code. For instance,3 = 0011, 5 = 0101, 8 = 1000, etc. The four inputs corresponding to these binary "bits" areconnected to each of the seven segments by a combination of gates, so that each segmentlights up only on combinations of inputs corresponding to those numbers for which it isrequired.
One of the seven-segment displays in your calculator has become totally disconnected, andyou open up your calculator. Inside, you can identify the four inputs A, B, C, D, correspondingto the four binary bits, and seven loose leads, a - g, each of which should be connected toone of the segments of the display. For all but one of the leads, you know the pattern of logicgates between the inputs, and the output at the lead.
Your task is to work out, for each lead, which binary combinations will result in an output of'logic 1' at the lead,and so which segment of the display it should be attached to. Finally, youwill be left with one lead to attach to the last segment, for which you do not know the patternof logic gates. Can you work out a pattern of gates that would make this lead's segment lightup with the right binary combinations?
Here is the seven - segment display, with its segments lettered p -v.For each segment, work out which decimal digits 0 - 9 it is lit for, and which digits it is unlit for.The first one is done for an example.
00
10
Number in Decimal
Number in Binary:
Inputs: ABCD
0 1 2 3 4 5 6 7 8 9
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
00
00
00
01
00
11
01
00
01
01
01
10
01
11
10
00
10
01
SEGMENT LIT FOR: UNLIT FOR:
pq
rstuv
0, 2, 3, 5, 6, 7, 8, 9. 1, 4.p
q r
s
t u
v
7/30/2019 Extension questions week 1
2/4
The logic gate patterns for the six leads a - f are shown, togetherwith the 10 combinations ofinputs A - D, representing each digit. For each lead, work out which binary combinationsresult in an output of "1", and which give an output of "0". Compare this with the table you willhave completed above, and work out which segment p - v it should be connected to.Finally, try to construct a pattern of gates that will light the last segment correctly with the lastlead.
Remember:
A
BA
B
A
B
A
BA B
0 0
0 1
1 0
1 1
0
0
0
1
1
1
1
0
0
1
1
1
1
0
0
0
AF
A F
0 1
1 0
AND NAND OR NOR
A
B
C
D
Lead "a" Segment:..............0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 1
A B C D Output0123456789
Digit
A
B
C
D
Lead "b" Segment:..............
0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 1
0 1 1 00 1 1 11 0 0 01 0 0 1
A B C D Output
012345
6789
Digit
7/30/2019 Extension questions week 1
3/4
A
B
C
D
Lead "c"Segment:..............
A
B
C
D
Lead "d"Segment:..............
Lead "e"
A
B
C
D
Segment:..............
0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 1
A B C D Output
0123456789
Digit
0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 0
0 1 0 10 1 1 00 1 1 11 0 0 01 0 0 1
A B C D Output
01234
56789
Digit
0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 1
0 1 1 00 1 1 11 0 0 01 0 0 1
A B C D Output
012345
6789
Digit
7/30/2019 Extension questions week 1
4/4
A
B
C
D
Lead "f" Segment:..............
0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 0
0 1 1 11 0 0 01 0 0 1
A B C D Output
0123456
789
Digit
0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 1
A B C D Outpu
0123456789
Digit
Lead "g"
A
B
C
D
g
Segment:..............