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

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

Task

The camera app of a smartphone offers the flash settings Off, On and Auto. With Off, the flash never fires. With On, it fires for each photo. With Auto, it fires only if the scene is dark. In simplified form, the inputs and the output are:

  • and : the setting, with the weight 2, with the code words 0:0 for Off, 0:1 for On and 1:0 for Auto; the code word 1:1 never occurs
  • : the scene is dark
  • : the flash fires

Implement this function with standard components.

a) Set up the truth table of , and give the minterm list.

b) Implement with a 3-to-8 decoder and an OR gate. Which outputs of the decoder lead to the OR gate?

c) Implement with an 8-to-1 multiplexer. What do you connect to the data inputs to ?

d) Implement with a 4-to-1 multiplexer, with and at the select inputs. What do you connect to the data inputs to ? Draw the circuit according to the standard of the International Electrotechnical Commission (IEC), IEC 60617.

e) Why does none of the three solutions need a minimization?

f) Suppose a software update gives the code word 1:1 a meaning: a fourth setting, with which the flash fires only if the scene is not dark. What do you have to change in each of the three solutions?

◀️ Back to the task


Solution

Given

Given explicitly:

  • the inputs and for the setting, with the code words 0:0 (Off), 0:1 (On) and 1:0 (Auto), and for a dark scene
  • the output , and the rule: Off never fires, On always fires, Auto fires only if the scene is dark
  • the code word 1:1 never occurs
  • f) the fourth setting with the code word 1:1: the flash fires only if the scene is not dark

Known:

  • Don’t cares for input combinations that never occur (DET-03)
  • Minterm list (DET-03)
  • A decoder and an OR gate (DET-05)
  • A multiplexer with the truth table at its data inputs, and with one variable less at the select inputs (DET-05)

Required

a) the truth table and the minterm list of
b) the outputs of the decoder that lead to the OR gate
c) the values at the eight data inputs
d) the values at the four data inputs, and the circuit
e) why no solution needs a minimization
f) what changes in each solution for the fourth setting

a) Truth table

With Off, in rows 0 and 1, is 0; with On, in rows 2 and 3, is 1; with Auto, in rows 4 and 5, equals . The code word 1:1 never occurs, so rows 6 and 7 are don’t cares, marked X (DET-03, 4.4):

RowSetting
0000Off0
1001Off0
2010On1
3011On1
4100Auto0
5101Auto1
6110–X
7111–X

b) Decoder and OR gate

Each output of the 3-to-8 decoder is 1 for exactly one code word: it is a minterm of the inputs (DET-05, 6.1). With , and at the inputs, with the weight 4, an OR gate with three inputs over the outputs 2, 3 and 5 forms the canonical disjunctive normal form (DNF):

The outputs 6 and 7 stay unconnected: rows 6 and 7 never occur, so the don’t cares simply become zeros here. The expression needs no gates of its own, because the decoder already delivers each minterm.

Check with row 5, Auto and a dark scene: the decoder sets its output 5 to 1, and the OR gate delivers ✓

c) 8-to-1 multiplexer

, and go to the select inputs, and each data input is set to the output of its row of the truth table (DET-05, 6.2):

Data input
Value001101XX

The don’t cares need a defined level at the input, so each X becomes a fixed value, here 0.

d) 4-to-1 multiplexer

With one variable less at the select inputs, and select one of four data inputs, and each data input carries 0, 1, or (DET-05, 6.2). Compare the two rows that belong to each select combination:

Rows for and Data input
000 and 10 and 0
012 and 31 and 1
104 and 50 and 1
116 and 7X and X: any fixed value, here 0

The multiplexer does just what the description says: the setting selects what the flash does (figure). goes directly to ; no inverter is needed, because does not occur.

A 4-to-1 multiplexer according to IEC 60617 with the select inputs B and A, the data inputs 0, 1, C and 0, and the output Y
A 4-to-1 multiplexer according to IEC 60617 with the select inputs B and A, the data inputs 0, 1, C and 0, and the output Y

Check with Auto and a bright scene, row 4: and select , so , as in the truth table ✓

e) No minimization

Each of the three solutions takes the truth table as it is. The decoder delivers all minterms, and the OR gate only collects those that the function needs. The multiplexers do not form any terms at all: they select the values of the table, wired at their data inputs (DET-05, 6.2).

f) A fourth setting

The code word 1:1 now has a meaning: with the flash fires, and with it does not. Rows 6 and 7 are no longer don’t cares. For this new function , row 6 is 1 and row 7 is 0:

Row
00000
10010
20101
30111
41000
51011
61101
71110
  • Decoder and OR gate: lead the output 6 to the OR gate as well, which now has four inputs.
  • 8-to-1 multiplexer: connect and .
  • 4-to-1 multiplexer: connect , with an inverter for .

In all three solutions, only connections change; no expression has to be minimized again (DET-05, 6.2).

The simulation shows the three solutions of the original function side by side, all driven by the same inputs. Switch , and through the rows of the truth table: the three outputs always agree.

Simulation of the camera flash with three solutions from a 3-to-8 decoder with an OR gate, an 8-to-1 multiplexer and a 4-to-1 multiplexer, in which all inputs and all three outputs are low
Simulation of the camera flash with three solutions from a 3-to-8 decoder with an OR gate, an 8-to-1 multiplexer and a 4-to-1 multiplexer, in which all inputs and all three outputs are low

Open in the simulator