Maker Pro
Maker Pro

Truth Table for Any Logic

Can anyone tell me the proper way to represent an ANY two or ANY three
in a truth table?

Example

10 inputs. Any five inputs high equals output 5.

Is it useful to employ K maps on something like this?

Thanks in advance.
 
D

DJ Delorie

Jan 1, 1970
0
JeffM said:
My first thought was *analog solution*:

My first thought was a CPLD/ROM or an MCU, but then again, I'm getting
lazy like that.
 
S

stan

Jan 1, 1970
0
John said:
Do you mean exactly 5 high? What does "output 5" mean?

That said, I don't know of a static truth table convention other than
1, 0, X (don't care for inputs) and Z (tristate outputs).



K maps are seldom useful. I've never used one, as I recall. Classic
logic minimization is not often called for these days.

Nowadays they are built in to many tools, but that doesn't mean
something somewhere is minimizing the logic. I'm not sure I understand.
Are you saying that it's not needed at all or just that it need not be
performed manually anymore?

It's not clear what the OP wants but is sounds like some kind of
decoder. I would suggest either find something that already works or if
you need to develop this on your own you should look into
quine-mckluskey because it sounds like you may be trying to minimize
multiple outputs.

I strongly suggest that the op provide more info if you want real help.
 
W

whit3rd

Jan 1, 1970
0
Can anyone tell me the proper way to represent an ANY two or ANY three
in a truth table?

Example

10 inputs.  Any five inputs high equals output 5.

This is similar to 'majority logic'; a typical implementation
is done in analog summing of current sources switched
by the logic inputs... you thus are using the information
that all the inputs have identical weight. If you want
to count the inputs, you can use adders to do it, of course.

The truth table, general though it is, hides the simplifying
principle rather than illuminating it.
 
S

stan

Jan 1, 1970
0
John said:
If you're designing in a cpld or an fpga, it's best to express the
logic for maximum clarity of function, and let the software minimize
it. Once it's minimized, it may mot be easily recognizable any more.
LUTs are a lot different from AND gates.

Discrete glue-logic type design is usually fairly simple, and uses
available gate types, and may need speed minimization, so isn't well
suited to K-map minimization. Usually this sort of design is done by
inspection and juggling.

We're on the same page. I thougt you might be saying something different
and i was curious.
2^10 is a big decoder.

Yeah, looks like nano tech got here just in time :)

Actually it sounds almost like he may want something like an m of n
decoder. I googled that and hit a patent as the first hit :O
 
Do you mean exactly 5 high? What does "output 5" mean?

That said, I don't know of a static truth table convention other than
1, 0, X (don't care for inputs) and Z (tristate outputs).




K maps are seldom useful. I've never used one, as I recall. Classic
logic minimization is not often called for these days.

John

Thanks for the reply. Have an assignment to make a digital bowling
pin counter. Have the circuit working. Not sure how to express the
logic for the assignment. For example, a 3 can be pins 1,3,5 or
2,3,5. It really does not seem like this lends itself to a truth
table. I will keep looking. Most of the truth tables we covered were
conventional and simple.
 
V

Varactor

Jan 1, 1970
0
Thanks for the reply.  Have an assignment to make a digital bowling
pin counter.  Have the circuit working.  Not sure how to express the
logic for the assignment.  For example, a 3 can be pins 1,3,5 or
2,3,5.  It really does not seem like this lends itself to a truth
table.  I will keep looking.  Most of the truth tables we covered were
conventional and simple.- Hide quoted text -

I'd say this is not a truth table problem but a counting problem.
Generate 10 sequentially adressed lines (say a 10 pulse generator into
a 10 stage shift register) and AND them with each pin state. OR the 10
anded lines. Now you have generated n pulses equal to the number TRUE
pin states. Now count the pulses. OK? This is a problem where analog
is mcuh simpler.

Good luck
 
Thanks for the reply. Have an assignment to make a digital bowling
pin counter. Have the circuit working. Not sure how to express the
logic for the assignment. For example, a 3 can be pins 1,3,5 or
2,3,5. It really does not seem like this lends itself to a truth
table. I will keep looking. Most of the truth tables we covered were
conventional and simple.

Do you really want any 5 from 10 or do you want a more manageable any
3 from 5?

Any 5 from 10 can be fairly "simply" done using 252 five input AND
gates and one 252 input OR gate.

If you want exactly 5 from 10 then you need 252 ten input AND gates,
1260 NOT gates and one 252 input OR gate.

3 from 5 is more manageable in practice needing 10 three input AND
gates and one 10 input OR gate. Make that 10 five input AND gates, 20
NOT gates and one 10 input OR gate for exactly 3 from 5.

In general for M from N you'll need
X M input AND gates and one X input OR gate
or
X N input AND gates, X*(N-M) NOT gates and one X input OR gate

where
N!
X= --------
(N-M)!N!

Of course, you can express those AND gates as combinations of two
input AND gates and those OR gates as combinations of two input OR
gates and then optimize. (I'd recommend writing or finding a program
to do this!)

Tim.
 
If you have to have a truth table, a table of 2^10 (1024) entries would
cover all possible combinations of 10 pins.  In algorithmic form, a 10-
step FOR loop and a counter to accumulate the total would be quicker to
type, and that's probably how your hardware works.

Thank you everyone for the help. The assignment requires kmaps and
truth table. With my design, they did not seem reasonable. Just
wanted to be sure there wasn't another way of expressing any logic.
 
Top