Login  Register

Re: Using De Morgans to reduce a boolean expression

Posted by ouverson on Aug 09, 2021; 1:23pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Using-De-Morgans-to-reduce-a-boolean-expression-tp4036177p4036253.html

I'm able to eliminate the Or operators, but now I'm left with an expression that is quite long and (for me) quite difficult to solve.

// DNF of the Or function:
(Not(x) And y) Or (x And (Not(y)) Or (x And y)

// Assign variables to
a = Not(x) And y
b = x And Not(y)
c = x And y

// Solve a Or b using de Morgans
a Or b = Not(Not(a) And Not(b))

// Eliminate the final c using de Morgans
d = Not(Not(a) And Not(b))
d Or c = Not(Not(d) And Not(c))

// Now plug in d
Not(Not(Not(Not(a) And Not(b))) And Not(c))

// Now plug in a, b, and c
Not(Not(Not(Not(Not(x) And y) And Not(x And Not(y)))) And Not(x And y))

// Now start reducing
...

This is as far as I got.