# Generating a Boolean Cartesian product

1. Apr 16, 2013

### Bipolarity

I basically am looking for an efficient way to implement the following:
I have ten inputs, {A,B,C,D,E,V,W,X,Y,Z}. I have twenty-five outputs that I need to implement:
{AV,AW,AX,AY,AZ, BV,BW,BX,BY,BZ, CV,CW,CX,CY,CZ, DV,DW,DX,DY,DZ, EV,EW,EX,EY,EZ}.

Obviously, a brute force way to do this would be to just use 25 AND gates. That costs me about 7 chips. Perhaps there is a simpler method I am overlooking that someone can suggest? Maybe with multiplexers etc. ? Or maybe there is a specialized chip to perform this kind of "Cartesian product" ?

Any ideas guys? Really appreciate it!

Thanks!

BiP

2. Apr 16, 2013

### Staff: Mentor

You need 25 different outputs, this corresponds to at least 25 different logic gates or an IC with at least that amount of logic inside. AND gates are a natural choice, if you can implement other gates cheaper/easier a more complicated setup could be interesting.

3. Apr 16, 2013

### Bipolarity

Certainly there is no single chip I know of with 25 different outputs. But what if the problem was divided into 5 sub-problems, say one is just finding AV,AW,AX,AY,AZ ? Then is there a chip that takes as input A,V,W,X,Y,Z (six pins) and outputs AV,AW,AX,AY,AZ (5 pins). Surely some chip performs this function?

BiP

4. Apr 16, 2013

### jim hardy

There's any number of hex buffers/linedrivers with tristate output and enable pin that are mighty close to what you describe.
I'm having trouble finding datasheets - seems search engines only return that no-good pesky alldatasheets link anymore.
Try 74**368

and a one of several multiplexer like 74**451

sorry i cant get to datasheets anymore. Revolt of the machines, i guess.

5. Apr 17, 2013

### Staff: Mentor

If you want all signals available all of the time, and outputs to change whenever an input changes, I can't see any other way of doing it. You haven't indicated more lenient specs.