Lucky Resistor
Menu
  • Home
  • Learn
    • Learn C++
    • Product Photography for Electronics
      • Required Equipment and Software
    • Soldering for Show
  • Projects
  • Libraries
  • Applications
  • Shop
  • About
    • About Me
    • Contact
    • Stay Informed
  •  
Menu

Logic Gates Puzzle 11

Posted on 2021-05-032023-01-24 by Lucky Resistor

The shown logic circuit performs a well-known function; can you discover what it is?

The circuit was not optimised for functionality but to create a symmetric artwork.

If you need to know the logic gate symbols’ meaning, look at this Wikipedia page. Also, there are great videos from Ben Eater on how to build real digital logic circuits.

If you get stuck, check the hints below.

Hints

Hint 1

There are three input bits A0, A1 and A2, but eight output bits X0-X7.

Hint 2

Create a truth table with all input combinations and outputs. Do you see the pattern now?

Solution

This digital circuit is a binary decoder, more specific a 3-to-8 line decoder or one-hot binary decoder. For each binary input number, it will set exactly one output to high, while all other outputs stay low.

See these Wikipedia pages for details: Binary Decoder, One-Hot.

It has many uses:

  • As multiplexer: E.g. one of eight memory chips is enabled, based on the highest three bits.
  • As display: The binary value is displayed by lighting up one LED in a bar or ring.
  • As display multiplexing support: Eight 7-segment displays are controlled with just 10 lines from the microcontroller.

About this Specific Design

Because only one output is high at a time, you can create a design like this by creating a set of boolean expressions:

# inputs
a0 = ...
a1 = ...
a2 = ...

# outputs
x0 = ...
x1 = ...
x2 = ...
...
x7 = ...

If you look at the table of input values, you see a simple pattern:

abc  ab bc ca
000  00 00 00  ab = 0, bc = 0
100  10 00 01  bc = 0, a = 1
010  01 10 00  ca = 0, b = 1
110  11 10 01  ab = 1, c = 0
001  00 01 10  ab = 0, c = 1
101  10 01 11  ca = 1, b = 0
011  01 11 10  bc = 1, a = 0
111  11 11 11  ab = 1, bc = 1

So, you have this ab, bc and ca combinations you want to check for 11 or 00. This is easily done with a NOR for 00 and AND for the 11 state.

# inputs
a0 = ...
a1 = ...
a2 = ...

a01on = a0 and a1
a12on = a1 and a2
a02on = a0 and a2

a01off = not (a0 or a1)
a12off = not (a1 or a2)
a02off = not (a0 or a2)

# outputs
x0 = a01off and a12off
x1 = a12off and a0
x2 = a02off and a1
x3 = a01on and not a2
x4 = a01off and a2
x5 = a02on and not a1
x6 = a12on and not a0
x7 = a01on and a12on

Now, if you compare this to the logic circuit, you can see why all the AND gates line up with the outputs, and why there are three additional AND and NOR gates directly at the inputs.

More Challenges

  • Rearrange the logic circuit: Use only three NOT and eight 3-input AND gates.
  • Reverse it: Create the logic circuit to encode a binary number from eight inputs.

Conclusion

I hope you enjoyed this straightforward logic circuit puzzle. I already published it previously on Twitter, but without hints and solutions. Let me know if you like to see more puzzles like this.

If you have any questions, missed information, or want to provide feedback, feel free to comment below. 😄

 

More Puzzles

Logic Gates Puzzle 101

Logic Gates Puzzle 101

The message you got does not make any sense. Can you decypher it with the following logic puzzle? The circuit ...
Read More
Logic Gates Puzzle 100

Logic Gates Puzzle 100

Assume, while digging out an ancient site from 450 AD, you found a mysterious stone with a digital display. Your ...
Read More
Logic Gates Puzzle 11

Logic Gates Puzzle 11

The shown logic circuit performs a well-known function; can you discover what it is? The circuit was not optimised for ...
Read More
Logic Gates Puzzle 10

Logic Gates Puzzle 10

The shown logic circuit performs a handy function; can you discover what it is? The circuit was not optimised for ...
Read More
Logic Gates Puzzle 1

Logic Gates Puzzle 1

What kind of logic circuit do you see here? This logic circuit was optimised for symmetry and art. Can you ...
Read More

More Posts

The 3D Printed Modular Lantern

The 3D Printed Modular Lantern

I designed a very modular 19th-century-style lantern. You can print it in its simplest form as a simple candlelight to put on a table or a shelf. By printing additional elements, you create a wonderful ...
Read More
Update to the Storage Boxes System

Update to the Storage Boxes System

Last week I sent all subscribers a small update to my storage boxes system. There are new split boxes for the tall boxes (LR2052-300C-S) and a new extensive PDF catalogue with a great overview, but ...
Read More
Build a Sustainable Refillable Active Coal Filter

Build a Sustainable Refillable Active Coal Filter

If you ever used air filters to keep smells, fumes and dust at a low level in your workshop, you for sure came in contact with these expensive throwaway active coal filters. While throwing-away the ...
Read More
Rail Grid Alternatives and More Interesting Updates

Rail Grid Alternatives and More Interesting Updates

I published another large update to the storage boxes project in the last two weeks. All buyers who subscribed to update emails already got a summary of the changes. If you read the email, you ...
Read More
Large Update to the Circle Pattern Generator

Large Update to the Circle Pattern Generator

Today I published a significant update to the circle pattern generator. Version 1.4.1 of the application is available for macOS and Windows for download. This new version adds various shapes, rotations, colours and a generator ...
Read More
The Importance of Wall Profiles in 3D Printing

The Importance of Wall Profiles in 3D Printing

In this post, I write about wall profiles in 3D printing, and I will explain why they are essential to creating stable parts with minimal filament use. Also, I will show common mistakes that result ...
Read More

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay Updated

Join me on Mastodon!

Top Posts & Pages

  • Storage Boxes System for 3D Print
  • Use Enum with More Class!
  • Simple Box with Lid for 3D-Print
  • Fan Controller
  • Shop
  • Real Time Counter and Integer Overflow
  • How and Why to use Namespaces
  • The Hinges and its Secrets for Perfect PETG Print
  • Extreme Integers – Doom from Below
  • Build a 3D Printer Enclosure

Latest Posts

  • The Importance of Wall Profiles in 3D Printing2023-02-12
  • The Hinges and its Secrets for Perfect PETG Print2023-02-07
  • Better Bridging with Slicer Guides2023-02-04
  • Stronger 3D Printed Parts with Vertical Perimeter Linking2023-02-02
  • Logic Gates Puzzle 1012023-02-02
  • Candlelight Emulation – Complexity with Layering2023-02-01
  • Three Ways to Integrate LED Light Into the Modular Lantern2023-01-29
  • The 3D Printed Modular Lantern2023-01-17

Categories

  • 3D Printing
  • Build
  • Common
  • Fail
  • Fun
  • Learn
  • Projects
  • Puzzle
  • Recommendations
  • Request for Comments
  • Review
  • Software
Copyright (c)2022 by Lucky Resistor. All rights reserved.
 

Loading Comments...