I'm just getting to grips with boolean algebra and I've found a

problem I can't solve. I'm told I should be able to use Demorgan's

theorem to convert (A+B).(A+C) into a form using 3 NAND gates and 2

INVERTERS, but I can't seem to manage it! I should say that this is

quite new to me so if anyone here can point me in the right direction

I'd appreciate it, thanks.

Does it have to be (3) NANDs and (2) inverters? Is it okay to use (2) NANDs and

(1) inverter? (Could use the full complement, but it's not necessary.)

I'll use / to indicate NOT, + for OR and * for AND:

(a + b) * (a + c)

= a * (a + c) + b * (a + c)

= a*a + a*c + b*a + b*c

= a*a + a*c + a*b + b*c

= a*(a + c + b) + b*c

= a*(1 + c + b) + b*c

= a*(1) + b*c

= a + b*c

Once this is arrived at, try a double NOT to convert the + to an *:

= //(a + b*C)

= / ( /a * /(b*c) )

Rewrite this in function form:

= /*( /a, /*(b, c) )

So:

c -----|\

| >o----|\

b -----|/ | >o---->

,----|/

a --|>o---'

For three NANDs and two inverters (if you just have to have the exact number)

you could just slap them on, like:

c -----|\

| >o----|\ ,--|\

b -----|/ | >o---+ | >o---|>o---->

,----|/ '--|/

a --|>o---'

Or you could take a different route:

(a + b) * (a + c)

= / ( / ( (a + b) * (a + c) ) )

= / ( ( /(a + b) + /(a + c) ) )

= / ( ( (/a * /b) + (/a * /c) ) )

= / ( (/a * /b) + (/a * /c) )

= /(/a * /b) * /(/a * /c)

= /*(/a,/b) * /*(/a,/c)

And wind up with something like this:

b --|>o----|\

| >o--,

,-|/ |

| '-|\

a --|>o--+ | >o---|>o---->

| ,-|/

'-|\ |

| >o--'

c --|>o----|/

Of course, that's (3) NANDs and (4) inverters.

Jon