r/learnmath • New User • 1d ago

How do I transform boolean function (BC+A)(B'C)' to a function that solely relies on NOR gates?

In my task it is told that I need to use De Morgan theorem, but I could not come up with the solution as I can not get rid of variable complements such as for example (B'+C')'

Thank you in advance for the help

3 Upvotes

7 comments sorted by

1

u/KniazheVash New User 1d ago

The task I was talking about

2

u/robertodeltoro New User 1d ago

Here are the definitions you need to do it: Let X and Y be boolean formulas.

AND in terms of OR and NOT:

  1. X AND Y ⇔ NOT(NOT(X) OR NOT(Y))

NOT in terms of NOR (Pierce Arrow):

2) NOT(X) ⇔ X NOR X

OR in terms of NOR:

3) X OR Y ⇔ (X XOR Y) XOR (X XOR Y)

This is enough to do the problem. To do it, we start with your formula:

𝜙: ((B AND C) OR A) AND NOT(NOT(B) AND C)

  1. Apply Definition 1 until every AND is gone from formula 𝜙.
  2. Apply Definition 2 until every NOT is gone.
  3. Apply Definition 3 until every OR is gone.

1

u/rhodiumtoad 0⁰=1, just deal with it 1d ago edited 1d ago

Remember that C' is just (C+C)'

Edit: fwiw, I have a solution in 4 2-input NOR gates in 3 layers, I don't know for sure if this is optimal but I believe it probably is.

1

u/Dazzling_Music_2411 Quite an old user. actually... 1d ago

Sorry, I'm a bit unfamiliar with your notation, coming more from a computery than a mathy background.

But if I've understood correctly, your problem is:

f(A,B,C) = ((B ^ C) v A) ^ ~(~B ^ C)

Let me know if I've understood that correctly.
If so, I can see one or two NAND gates already, 'm sure the rest would simplify quite easily...

f(A,B,C) = ((B ^ C) v A) ^ NAND(~B, C) =>
f(A,B,C) = ((B ^ C) v A) ^ NAND(NAND(B,B),C) =>
f(A,B,C) = ~(~(B ^ C) ^ ~A) ^ NAND(NAND(B,B),C) By de Morgan =>
f(A,B,C) => NAND( ~(B ^ C), A) ^ NAND(NAND(B,B),C) =>
f(A,B,C) => NAND(NAND(B,C), A) ^ NAND(NAND(B,B),C) =>

etc, etc...

After that you can start to optimize... 😄

=====

PS. Oooops, sorry, I used NAND gates instead of NOR gets as you asked, but the idea is the same