9.4 Simplifying bit expressions
When we compose gates, we can often rearrange and simplify the
combinations. If x
and y
are bits, then
- not not
x
=x
x
and 1 = 1x
andx
=x
- 0(
x
) =x
and (notx
) = 0 x
andy
=y
andx
x
or 0 =x
x
orx
=x
- 1(
x
) =x
or (notx
) = 1 x
ory
=y
orx
- not (
x
andy
) = (notx
) or (noty
) - not (
x
ory
) = (notx
) and (noty
)
The last two are known as De Morgan’s Laws after British
mathematician Augustus De Morgan. With a third
bit z
we also have:
x
and (y
andz
) = (x
andy
) andz
x
or (y
orz
) = (x
ory
) orz
x
and (y
orz
) = (x
andy
) or (x
andz
)x
or (y
andz
) = (x
ory
) and (x
orz
)
Exercise 9.19
Which of these relationships hold for xor, nand, nor, xnor, and their...