Seven Segment Display

The interface below allows you to simulate the controlling circuits for a seven segment LED display.

Supplementary question: how many different configurations can a seven segment display be programmed to show?

The purpose of the exercise is to enter the correct logical expressions in the text boxes to get the Actual display to match the Target display:

Input Bits ExpressionsDisplay
abcd
0000
Seg 0 = 0 Actual
Seg 1 = 0
Seg 2 = 0
Seg 3 = 0
Seg 4 = 0 Target
Seg 5 = 0
Seg 6 = 0
 

Instructions

You can use the up and down arrows in the Input box to scroll through the inputs, or type a hexadecimal digit directly into the box. The corresponding character will be shown in the Target display and, depending on the logical expressions entered for each, the Actual display will show an illumination pattern. When the actual segment pattern matches the target display, a green tick will display, otherwise a red cross is shown.

The Export Logic button will write a new page with the contents of the expressions so you can save your working. You can cut and paste the expressions back into the box to restore the state of the simulation.

The Complexity Report button will write a new page displaying how complex your solution is in terms of the total number of logical operators involved in the expressions. This is useful once you have a complete solution to compare different answers.

REx: Work out all the expressions to get the Actual display correct for every input.

The syntax for the expressions uses the same notation as that described earlier with expressions defined over the four variables a, b, c and d. So, for example, the expression ~(c&d) would turn a segment on when at least one of the c and d bits were 0. (Expressions are case sensitive.) Expect the expressions to get reasonably complex as you work through all the required input/output mappings. When you can scroll through all the inputs and get the correct outputs, you have completed the problem.

Background

There are two basic approaches to solving this problem... next

How It's Built

Some helpful discussion to ease you into the source code... next