LED Dice
Our aim is to create an LED Dice using a breadboard and 7 LEDs disposed as follows:

We will then use three buttons/switches to control the 7 LEDs of the dice to recreate the following patterns:
Octal Number System
The octal numeral system, or oct for short, is the base-8 number system. It uses 8 digits from 0 to 7. Octal numerals can be converted into binary using 3 binary digits and the following conversion table.
We will use three input buttons A,B,C representing the 3 binary digits to generate 8 binary patterns representing the 8 octal digits from 0 to 7.
We will then use logic gates circuits to control each of the 7 LED based on the three inputs:
LED Dice: Truth Tables & Karnaugh Maps
We will use three inputs A,B and C to represent the three digits as ABC (A is the most significant digit, C is the least significant digit). When creating the electronic circuit we will use 3 switches to represent these 3 inputs.
We will need 7 outputs one for each LED. So let’s investigate each LED one at a time.
![]() |
![]() |
![]() |
![]() |
LED 1 & 6 should be off for the following values:
![]() |
![]() |
![]() |
![]() |
Hence the Truth Table for LED 1 & LED 6 is as follows:
Inputs | Output | ||
A | B | C | LED 1 |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 1 |
1 | 1 | 0 | 1 |
1 | 1 | 1 | 1 |
This Truth table can be represented using a Karnaugh Map:

Karnaugh Map for LED 1 & LED 6
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
LED 2 & LED 5 should be off for the following values:
![]() |
![]() |
Hence the Truth Table for LED 2 & LED 5 is as follows:
Inputs | Output | ||
A | B | C | LED 2 |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 1 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 1 |
1 | 1 | 0 | 1 |
1 | 1 | 1 | 1 |
This Truth table can be represented using a Karnaugh Map:

Karnaugh Map for LED 2 and LED 5
LED 3 & LED 4 (middle-left and middle-right) should be on for the following values:
![]() |
![]() |
LED 3 & 4 should be off for the following values:
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
LED 7 (in the middle) should be on for the following values:
![]() |
![]() |
![]() |
![]() |
LED 7 should be off for the following values:
![]() |
![]() |
![]() |
![]() |
LED Dice: Boolean Expressions
The Karnaugh maps will help us define the Boolean Expressions associated with each of the 7 LEDs.

Karnaugh Map for LED 1 & LED 6

Boolean Expression for LED1 & LED 6

Karnaugh Map for LED 2 & LED 5

Boolean expression for LED 2 & LED 5
LED Dice: Logic Gates Diagrams
We can now convert each Boolean expression into a Logic Gates circuit to link our 3 inputs (switches) to our 7 LEDs display using a range of logic gates.

Boolean Expression for LED1 & LED 6
In this case, the Boolean expression being so basic, there is no need for any logic gates to control LED 1. The LED is directly connected to input A.

Logic Gates Diagram for LED 1 & LED 6

Boolean expression for LED 2 & LED 5
In this case, the Boolean expression being so basic, only one OR gate is needed using input A and input B.

Logic Gates Diagrams for LED 2 & LED 5
Testing
You can now recreate your logic gates circuit using our logic gates circuit simulator to test if it behaves as expected for all 8 entries.

You can also recreate the electronic circuit using bread boards, LEDs, resistors and logic gates or create your electronic cricuit online using tinkercad.

Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area