Prof. Dr. Thorsten Jungmann (last updated 2026-11-02)

Relates to DET-05 Codes, code converters and standard components

Task

The cabin of a lift shows the floor on a 7-segment display. In a building with the floors 0 to 7, the controller of the lift delivers the floor as a binary code word with the bits , and , with the weight 4. A code converter turns this code word into the seven segment signals to ; each of them is 1 when its segment lights up. The figure shows which segments form which digit, and the truth table gives the same code as bits.

A 7-segment display with the segments a to g, next to the digits 0 to 7 with their lit segments highlighted
A 7-segment display with the segments a to g, next to the digits 0 to 7 with their lit segments highlighted

Floor
00001111110
10010110000
20101101101
30111111001
41000110011
51011011011
61101011111
71111110000

a) Minimize with a Karnaugh map.

b) Minimize with a Karnaugh map.

c) Minimize with a Karnaugh map. Is your result unique?

The other four segments are minimized in the same way, with these results:

d) Which product terms occur in the results of more than one segment? How many AND gates does the code converter need if it shares these terms between its segments, and how many if it does not?

e) Draw the part of the circuit that forms and according to the standard of the International Electrotechnical Commission (IEC), IEC 60617, with shared AND gates.

f) Check your results for floor 5: which segments light up, and does the digit agree with the truth table?

◀️ Back to the task


Solution

Given

Given explicitly:

  • the inputs , and , the binary code word of the floor, with the weight 4
  • the outputs to , one for each segment, 1 when the segment lights up
  • the truth table of the 7-segment code for the floors 0 to 7
  • the minimized expressions of , , and

Known:

  • The six steps of the synthesis (DET-03)
  • The 7-segment display and its code (DET-05)
  • Karnaugh map with loops of ones (DET-03); minimizing the segments and sharing product terms between them (DET-05)
  • From the expression to the circuit (DET-03); checking the circuit against the description (DET-03)

Required

a) to c) the minimal disjunctive normal form (DNF) of , and ; in c) also whether it is unique
d) the product terms that several segments share, and the number of AND gates with and without sharing
e) the part of the circuit for and
f) the check for floor 5

a) Segment a

The truth table is already there: steps 1 and 2 of the synthesis are done (DET-03, 1.1). Steps 3 and 4 follow for each segment on its own, as for the 7-segment display decoder of the lesson (DET-05, 3.4). From the column , read the floors with a 1:

Put these ones into the map (figure) and draw the largest possible loops (DET-03, 4.2). The first and the last column are neighbours, so a loop may run across the edge.

Karnaugh map of segment a with ones for the floors 0, 2, 3, 5, 6 and 7 and the loops of its minimal disjunctive normal form
Karnaugh map of segment a with ones for the floors 0, 2, 3, 5, 6 and 7 and the loops of its minimal disjunctive normal form

The loops: covers the floors 2, 3, 6 and 7, covers the floors 5 and 7 and , across the left and right edge, covers the floors 0 and 2:

b) Segment d

The column has a 1 on the floors 0, 2, 3, 5 and 6:

Karnaugh map of segment d with ones for the floors 0, 2, 3, 5 and 6 and the loops of its minimal disjunctive normal form
Karnaugh map of segment d with ones for the floors 0, 2, 3, 5 and 6 and the loops of its minimal disjunctive normal form

The loops: covers the floors 2 and 3, , across the left and right edge, covers the floors 0 and 2, covers the floors 2 and 6 and covers floor 5:

c) Segment g

The column has a 1 on the floors 2, 3, 4, 5 and 6:

Karnaugh map of segment g with ones for the floors 2, 3, 4, 5 and 6 and the loops of its minimal disjunctive normal form
Karnaugh map of segment g with ones for the floors 2, 3, 4, 5 and 6 and the loops of its minimal disjunctive normal form

The loops: covers the floors 2 and 3, covers the floors 4 and 5 and covers the floors 2 and 6:

The ones of the floors 3 and 5 each lie in only one loop, so and are essential. The one of floor 6 remains, and two loops of equal size can take it: with floor 2 or with floor 4. So the result is not unique. The other minimal DNF is:

The solution goes on with , which and need as well.

The maps of the other four segments

The task gives these four results. Their maps show where they come from.

Segment b

The column has a 1 on the floors 0, 1, 2, 3, 4 and 7:

Karnaugh map of segment b with ones for the floors 0, 1, 2, 3, 4 and 7 and the loops of its minimal disjunctive normal form
Karnaugh map of segment b with ones for the floors 0, 1, 2, 3, 4 and 7 and the loops of its minimal disjunctive normal form

The loops: covers the floors 0, 1, 2 and 3, covers the floors 3 and 7 and covers the floors 0 and 4:

Segment c

The column has a 1 on the floors 0, 1, 3, 4, 5, 6 and 7:

Karnaugh map of segment c with ones for the floors 0, 1, 3, 4, 5, 6 and 7 and the loops of its minimal disjunctive normal form
Karnaugh map of segment c with ones for the floors 0, 1, 3, 4, 5, 6 and 7 and the loops of its minimal disjunctive normal form

The loops: covers the floors 4, 5, 6 and 7, covers the floors 0, 1, 4 and 5 and covers the floors 1, 3, 5 and 7:

This segment is dark on floor 2 only. Three single inputs need no AND gate at all.

Segment e

The column has a 1 on the floors 0, 2 and 6:

Karnaugh map of segment e with ones for the floors 0, 2 and 6 and the loops of its minimal disjunctive normal form
Karnaugh map of segment e with ones for the floors 0, 2 and 6 and the loops of its minimal disjunctive normal form

The loops: , across the left and right edge, covers the floors 0 and 2 and covers the floors 2 and 6:

Segment f

The column has a 1 on the floors 0, 4, 5 and 6:

Karnaugh map of segment f with ones for the floors 0, 4, 5 and 6 and the loops of its minimal disjunctive normal form
Karnaugh map of segment f with ones for the floors 0, 4, 5 and 6 and the loops of its minimal disjunctive normal form

The loops: covers the floors 4 and 5, , across the left and right edge, covers the floors 4 and 6 and covers the floors 0 and 4:

d) Sharing product terms

A single input, such as in , needs no AND gate. The other product terms need one AND gate each, unless two segments use the same term; then one gate can serve both (DET-05, 3.4):

Product termUsed by the segmentsNumber of uses
a1
a, d and e3
b1
b and f2
d and g2
d, e and g3
d1
f and g2
f1

The terms that occur in more than one segment are , , , and . With shared terms, the code converter needs one AND gate for each row of the table, 9 in all. Without sharing, each segment builds its own terms. Segments a to g need:

So sharing saves AND gates. With the other minimal form of , both numbers stay the same: exists anyway for , and for and . Only the list of shared terms grows: and then share as well.

e) Circuit for two segments

Step 5 of the synthesis turns the expressions into gates (DET-03, 5.1). needs an OR gate with four inputs over four AND gates. needs an OR gate with two inputs and no AND gate of its own, because its terms and already exist for (figure). The inverters for , and serve all gates.

Part of the code converter according to IEC 60617: three inverters, four AND gates and two OR gates that form Y d and Y e, sharing the AND gates for A bar C bar and B C bar
Part of the code converter according to IEC 60617: three inverters, four AND gates and two OR gates that form Y d and Y e, sharing the AND gates for A bar C bar and B C bar

f) Check for floor 5

Step 6 compares the circuit with the description, here the truth table (DET-03, 5.3). Floor 5 is the code word 101. For , and :

The segments a, c, d, f and g light up. These are the ones in the row of floor 5 of the truth table, and in the figure they form the digit 5 ✓

The simulation shows the whole code converter with its nine AND gates and seven OR gates (DET-05, 3.5). Switch the three inputs through all eight code words and compare the logic outputs and the digit with each row of the truth table.

Simulation of the code converter of the floor indicator from inverters, nine AND gates and seven OR gates: the inputs 1, 0 and 1 make the 7-segment display show the digit five
Simulation of the code converter of the floor indicator from inverters, nine AND gates and seven OR gates: the inputs 1, 0 and 1 make the 7-segment display show the digit five

Open in the simulator