#### 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 & LED 6**(top-left and bottom right) should be

**on**for the following values:

ABC:100 | ABC:101 | ABC:110 | ABC:111 |

**LED 1 & 6** should be **off** for the following values:

ABC:000 | ABC:001 | ABC:010 | ABC:011 |

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**:

**LED 2 & LED 5**(top-right and bottom left LED) should be

**on**for the following values:

ABC:010 | ABC:011 | ABC:100 | ABC:101 | ABC:110 | ABC:111 |

**LED 2 & LED 5** should be **off** for the following values:

ABC:000 | ABC:001 |

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**:

**Truth Table**and

**Karnaugh Map**of LED 3 and LED 4 which have the same truth table.

**LED 3 & LED 4** (middle-left and middle-right) should be **on** for the following values:

ABC:110 | ABC:111 |

**LED 3 & 4** should be **off** for the following values:

ABC:001 | ABC:010 | ABC:011 | ABC:100 | ABC:101 | ABC:000 |

**Truth Table**and

**Karnaugh Map**of LED 7 (LED in the middle of the dice).

**LED 7**(in the middle) should be

**on**for the following values:

ABC:001 | ABC:011 | ABC:101 | ABC:111 |

**LED 7** should be **off** for the following values:

ABC:100 | ABC:000 | ABC:010 | ABC:110 |

#### LED Dice: Boolean Expressions

The Karnaugh maps will help us define the Boolean Expressions associated with each of the 7 LEDs.

**Karnaugh Map:**

**Boolean Expression:**

**Karnaugh Map:**

**Boolean Expression:**

**Boolean Expression**of LED 3 & LED 4.

**Boolean Expression**of LED 7.

#### 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:**

**Logic Gates Diagram:**

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.

**Boolean Expression:**

**Logic Gates Diagram:**

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

**logic gates diagram**required to control LED 3 & LED 4.

**logic gates diagram**required to control LED 7.

#### 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