Author Topic: Boolean expressions to circuit  (Read 1218 times)

0 Members and 1 Guest are viewing this topic.

Offline gaminnTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
  • Country: 00
Boolean expressions to circuit
« on: August 26, 2019, 07:32:17 am »
Hi,
I have two boolean expressions:

Y1 = A
Y2 = (not A) and B

I have to select cheapest solution to realize this on my PCB (cheapest IC, only one IC prefered). Can you please give me an advise?

A and B are slowly changing signals so it will be great if the input gates have schmitt trigger. Vcc = 5 V. Switching speed is not important.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Boolean expressions to circuit
« Reply #1 on: August 26, 2019, 07:39:42 am »
They should be making 4x2bit PROMs in SOT23-6 for that kind of thing.
Also 8x3bit in DIP8/SO8 if we are at that.

You know, you can always use some SOT23 µC :popcorn:

edit
Alternatively, if PCB space isn't critical, a hex inverter with Schmitt-triggered inputs like 74HC14 could be used for input denoising and output drive plus two external diodes to implement AND.
« Last Edit: August 26, 2019, 08:28:00 am by magic »
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: gb
Re: Boolean expressions to circuit
« Reply #2 on: August 26, 2019, 10:53:01 am »
A 74HC132 costs pennies and gives you four 2 input NAND gates with schmitt triggers.

Two of these gates wired as inverters in series will give you /A and Y1.  Feed /A and B into another gate, the output is /Y2.  Use the final gate wired as an inverter to get Y2.
 
The following users thanked this post: sokoloff

Offline zzattack

  • Regular Contributor
  • *
  • Posts: 136
  • Country: nl
Re: Boolean expressions to circuit
« Reply #3 on: August 26, 2019, 11:08:33 am »
Well Y1 is simple, seems a copper trace will do.
For Y2 = (not A) and B you can try rewriting it to a combination or NAND or NOR gates and pick a 7400 ic.
Use the ideas that (not X) == (x nand x), not (x and y) == x nand y, and rewrite your expression by replacing all logical operators by their equivalent using only NAND operators.
I.e.,
Code: [Select]
1. Y2 = (not A) and B
==
2. (A nand A) and B
==
3. not not ( (A nand A) and B) )
==
4. not ( (A nand A) nand B)
==
5. ( (A nand A) nand B) nand ( (A nand A) nand B)

So a single 7400 would work. Equivalent using NOR gates is also possible, and mux ic's can very often be used just the same.
 

Offline gaminnTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
  • Country: 00
Re: Boolean expressions to circuit
« Reply #4 on: August 26, 2019, 12:23:24 pm »
Thanks for your advises guys.

I also came accross these multi-gate (configurable) ICs: 74LVC1G58 and similar. I will probably use them. Two of them do what I need.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Boolean expressions to circuit
« Reply #5 on: August 26, 2019, 02:07:41 pm »
A single IC with 4 NAND gates, as said above, which are ubiquitous, would do the trick.

As I got it, a single 74LVC1G58 should do it as well. I have a Nexperia datasheet which shows your configuration on figure 6 ( /B and C).
Cost will be similar to a 74LVC00 or 74HC00, but the 74LVC1G58 will be smaller if you're going for SOT/SOIC packages.

 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2331
  • Country: 00
Re: Boolean expressions to circuit
« Reply #6 on: August 27, 2019, 05:28:53 am »
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: gb
Re: Boolean expressions to circuit
« Reply #7 on: August 27, 2019, 09:38:50 am »
Well Y1 is simple, seems a copper trace will do.

OP wants Schmitt triggers to clean up slowly varying inputs, so a straight connection is not suitable.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf