2

I'm a beginner to logic circuits and I'm trying to construct a truth table for a LED dice circuit.

I've got 7 outputs in my table, 1 for each LED, but I can't figure out how many inputs I need.

I've been told that the formula below gives the number of inputs, but I don't know what Y is. Can anyone confirm that the formula is correct, and tell me what Y is so I can work this out? Thanks

n = log(Y + 1) / log(2)

MendelumS
  • 91
  • 1
  • 8
  • `Y` is someting like number of states. As well as I understand, you have 7 states (but not because there are 7 LEDs). If inputs are toggle switches, then their number is `round(log2(Y))`, which is equal to `round(log10(Y)/log10(2))`. – Stanislav Kralin Nov 03 '18 at 17:14
  • BTW, I think you don't need a truth table for that circuit. I've created that circuit in logic.ly using quite natural considerations (and the curcuit is simple): https://i.stack.imgur.com/WcoMr.png I hope you understand how intermediate circuits were synthesed. However, the result for "7" is possibly not what you want :) – Stanislav Kralin Nov 03 '18 at 21:01

1 Answers1

0

There is no telling how many inputs you must have. You could have as many as you wish. But there is a minimum.

Every input line can be thought of as a digit in a binary number. So in order to identify 7 different numbers we would need at least three binary digits (000 to 111). So the formula would be the ceil(log2(Y)) where Y in the number of output lines.

A great example of such a circuit would be a demultiplexer. You will notice the number of selector bits in the DEMUX is ceil(log2(Y)) the number of output lines.

Mitch
  • 3,342
  • 2
  • 21
  • 31