#### Do you have a question? Post it now! No Registration Necessary

**posted on**

- Mike Turco

July 10, 2004, 9:12 pm

I want a truth table as follows, where A and B are inputs, X and Y are

Outputs:

ABXY

0001

0110

1011

1111

I would like to use one chip to decode, such as a 74x02 quad two-input nor

gate. I've found two solutions. One is five gates, as shown at

http://www.miketurco.com/cae/gate1.GIF , which is one gate too many. The

other solution is to use a 74x138. I consider the 74x138 to be a cheat!

In going through this, I'm starting to realize how rusty I'm getting at

doing this kind of stuff.

I imagine there's an easy to see, simple solution to this problem. Please

enlighten me, I think my brain needs a kick.

Thanks,

Mike

Outputs:

ABXY

0001

0110

1011

1111

I would like to use one chip to decode, such as a 74x02 quad two-input nor

gate. I've found two solutions. One is five gates, as shown at

http://www.miketurco.com/cae/gate1.GIF , which is one gate too many. The

other solution is to use a 74x138. I consider the 74x138 to be a cheat!

In going through this, I'm starting to realize how rusty I'm getting at

doing this kind of stuff.

I imagine there's an easy to see, simple solution to this problem. Please

enlighten me, I think my brain needs a kick.

Thanks,

Mike

Re: Basic logic problem

There used to be an CD4XXX chip that had an odd mix of gates inside. I

can't recall the number, have no idea if ot's still made, nor if the

mix of gates was right for this. I suppose you have no leftover gates

or inverters anywhere? Half a 7432 and a single inverter or transistor

would get it done.

Why? It is a decode function, after all...

--

Bill

Posted with XanaNews Version 1.16.3.1

Bill

Posted with XanaNews Version 1.16.3.1

Re: Basic logic problem

I think I can get it done with a single 7402 or 7404 and one transistor as

an inverter. Since the 74138 works & is only one chip, I guess I'll go with

that.

What concerns me, I think, is my having to think this through for hours and

still not remember the definitive way, e.g. using Boolean algebra, to solve

this problem. Maybe a five gate solution is the only answer, but how do I

know that for sure?

Re: Basic logic problem

oN 07/10/04, Mike Turco said:

With Boolean algebra, and an equation for each output term. For things

as simple as that one, it can be frustrating, when we're so accustomed

to high density components, but on the other hand, there's the cost of

the time it takes to be more clever about it. <g>

Of course, you could use diodes and resistors, too ;)

With Boolean algebra, and an equation for each output term. For things

as simple as that one, it can be frustrating, when we're so accustomed

to high density components, but on the other hand, there's the cost of

the time it takes to be more clever about it. <g>

Of course, you could use diodes and resistors, too ;)

--

Bill

Posted with XanaNews Version 1.16.3.1

Bill

Posted with XanaNews Version 1.16.3.1

Re: Basic logic problem

oN 07/10/04, Mike Turco said:

Wow, I am rustier than I thought! I just worked it through and realized

(and proved) that my first answer was correct.

X = (A OR B)

Y = (A or (NOT B))

Therefore, one inversion and two sections of a 74C32. So in the absence

of an unused inverter, I'd grap a transistor, a couple of resistors,

and the 'C32.

Wow, I am rustier than I thought! I just worked it through and realized

(and proved) that my first answer was correct.

X = (A OR B)

Y = (A or (NOT B))

Therefore, one inversion and two sections of a 74C32. So in the absence

of an unused inverter, I'd grap a transistor, a couple of resistors,

and the 'C32.

--

Bill

Posted with XanaNews Version 1.16.3.1

Bill

Posted with XanaNews Version 1.16.3.1

Re: Basic logic problem

nor

Please

OK, I more-or-less came to all of the above on my own, except that I used

NOR gates. (Boolean/logic is another area in which a custom font would come

in handy because I could throw in some negated letters, but that's another

thread.)

I haven't used Boolean it since George Boole & I used to drink poisonous ale

and make logic gates out of cat hairs, so please bare with me....

OK, I get that with three nand gates:

http://www.miketurco.com/cae/nandor.GIF .

I get two gates for that because you have to invert one of the inputs.

I get 5 gates again, except that you use NAND gates and I use NOR gates.

Mike

Re: Basic logic problem

The

cheat!

at

come

ale

You are missing the obvious. Both equations have a term in common which

is NOT A. So Y output can be realized using the NOT A term from X, and

one more gate, for a total of 4. Simply adding up the number of gates for

each equation will not yield the lowest number possible.

Hope this helps,

Mike Anton

Re: Basic logic problem

On Sat, 10 Jul 2004 14:12:29 -0700, "Mike Turco"

You could always use one inverter and four diodes!

Feed A through two diodes to X and Y

Feed B through one diode to X

Feed B through one inverter and a diode to Y

(with pull downs on X and Y of course)

Uses only 1/4 of a chip!

Alan

++++++++++++++++++++++++++++++++++++++++++

Jenal Communications

Manufacturers and Suppliers of HF Selcall

P O Box 1108, Morley, WA, 6943

Tel: +61 8 9370 5533 Fax +61 8 9467 6146

Web Site: http://www.jenal.com

e-mail: http://www.jenal.com/?p=1

++++++++++++++++++++++++++++++++++++++++++

You could always use one inverter and four diodes!

Feed A through two diodes to X and Y

Feed B through one diode to X

Feed B through one inverter and a diode to Y

(with pull downs on X and Y of course)

Uses only 1/4 of a chip!

Alan

++++++++++++++++++++++++++++++++++++++++++

Jenal Communications

Manufacturers and Suppliers of HF Selcall

P O Box 1108, Morley, WA, 6943

Tel: +61 8 9370 5533 Fax +61 8 9467 6146

Web Site: http://www.jenal.com

e-mail: http://www.jenal.com/?p=1

++++++++++++++++++++++++++++++++++++++++++

#### Site Timeline

- » Reverse current into a lithium battery
- — Next thread in » Embedded Programming

- » CMOS design rules
- — Previous thread in » Embedded Programming

- » Use of soft float?
- — Newest thread in » Embedded Programming

- » arm-gcc: avoid calling other system functions
- — Last Updated thread in » Embedded Programming

- » Software fuer Leiterbahn-Impedanz und anderes
- — The site's Newest Thread. Posted in » Electronics (German)

- » Domanda su cloni arduino
- — The site's Last Updated Thread. Posted in » Electronics Hobby (Italian)