You are on page 1of 4

Logic Gate Puzzle

The digital display for a single digit (0 - 9) consists of seven segments, lit in combinations to display 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" are connected to each of the seven segments by a combination of gates, so that each segment lights up only on combinations of inputs corresponding to those numbers for which it is required.

One of the seven-segment displays in your calculator has become totally disconnected, and you open up your calculator. Inside, you can identify the four inputs A, B, C, D, corresponding to the four binary bits, and seven loose leads, a - g, each of which should be connected to one of the segments of the display. For all but one of the leads, you know the pattern of logic gates 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, you will be left with one lead to attach to the last segment, for which you do not know the pattern of logic gates. Can you work out a pattern of gates that would make this lead's segment light up with the right binary combinations?
Number in Decimal Number in Binary: Inputs: A B C D 0 1 2 3 4 5 6 7 8 9

0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1

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.

SEGMENT

p q r s t u v

UNLIT FOR: 1, 4. 0, 2, 3, 5, 6, 7, 8, 9.

LIT FOR:

p q s t v u r

The logic gate patterns for the six leads a - f are shown, togetherwith the 10 combinations of inputs A - D, representing each digit. For each lead, work out which binary combinations result in an output of "1", and which give an output of "0". Compare this with the table you will have 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 last lead.

Remember: A B
A B
AND

A B

NAND

A B

OR

A B

NOR

0 0 1 1

0 1 0 1
Lead "a"

0 0 0 1

1 1 1 0

0 1 1 1
Digit 0 1 2 3 4 5 6 7 8 9

1 0 0 0
A 0 0 0 0 0 0 0 0 1 1 B 0 0 0 0 1 1 1 1 0 0 C 0 0 1 1 0 0 1 1 0 0 D 0 1 0 1 0 1 0 1 0 1 Output

A F 0 1 1 0

Segment:..............

A B C D

Lead "b" A B C D

Segment:..............

Digit 0 1 2 3 4 5 6 7 8 9

A 0 0 0 0 0 0 0 0 1 1

B 0 0 0 0 1 1 1 1 0 0

C 0 0 1 1 0 0 1 1 0 0

D 0 1 0 1 0 1 0 1 0 1

Output

Lead "c" A

Segment:..............

B C D

Digit 0 1 2 3 4 5 6 7 8 9

A 0 0 0 0 0 0 0 0 1 1

B 0 0 0 0 1 1 1 1 0 0

C 0 0 1 1 0 0 1 1 0 0

D 0 1 0 1 0 1 0 1 0 1

Output

Lead "d" A B C D

Segment:..............

Digit 0 1 2 3 4 5 6 7 8 9

A 0 0 0 0 0 0 0 0 1 1

B 0 0 0 0 1 1 1 1 0 0

C 0 0 1 1 0 0 1 1 0 0

D 0 1 0 1 0 1 0 1 0 1

Output

Lead "e" A B C D

Segment:..............

Digit 0 1 2 3 4 5 6 7 8 9

A 0 0 0 0 0 0 0 0 1 1

B 0 0 0 0 1 1 1 1 0 0

C 0 0 1 1 0 0 1 1 0 0

D 0 1 0 1 0 1 0 1 0 1

Output

Lead "f" A B C D

Segment:..............

Digit 0 1 2 3 4 5 6 7 8 9

A 0 0 0 0 0 0 0 0 1 1

B 0 0 0 0 1 1 1 1 0 0

C 0 0 1 1 0 0 1 1 0 0

D 0 1 0 1 0 1 0 1 0 1

Output

Lead "g" A B C D

Segment:..............
Digit 0 1 2 3 4 5 6 7 8 9 A 0 0 0 0 0 0 0 0 1 1 B 0 0 0 0 1 1 1 1 0 0 C 0 0 1 1 0 0 1 1 0 0 D 0 1 0 1 0 1 0 1 0 1 Output

You might also like