Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Assignment 01

Vinay Bharadwaj DS (2147326)

01. Show that NOR gate is a universal gate.

Answer: A NOR gate is logically an inverted OR gate (Q = A + B). It is


represented as follows:

A
Q
B

Its Truth table is


Input A Input B Output Q
0 0 1
0 1 0
1 0 0
1 1 0

A Universal gate is a gate which can implement any Boolean function without need
to use any other gate type. Now let us show that NOR is a Universal gate

(i) Implementing OR using only NOR gates:

An OR gate can be replaced by NOR gates as shown in the figure (The OR is replaced
by a NOR gate with its output complemented by a NOR gate inverter)

A A+B A+B A
=⇒ A+B
B B

1
(ii) Implementing AND using only NOR gates:

An AND gate can be replaced by NOR gates as shown in the figure (The AND
gate is replaced by a NOR gate with all its inputs complemented by NOR gate in-
verters)

A A

A·B A
=⇒ A·B
B

B B

(iii) Implementing NOT using only NOR gate:

This is made by joining the inputs of a NOR gate. As a NOR gate is equivalent
to an OR gate leading to NOT gate, joining the inputs makes the output of the
”OR” part of the NOR gate the same as the input, eliminating it from consideration
and leaving only the NOT part.

A A
=⇒ A A

(iv) Implementing NAND using only NOR gates:

A NAND gate is made by inverting the output of an AND gate. The word NAND
means that it is NOT-AND. As the name suggests, it will give 0 when both the inputs
are 1.

A A

A·B A·B A
=⇒ A·B
B

B B

2
(v) Implementing XOR using only NOR gates:

An XOR gate is made by considering the conjunctive normal form (A + B) · (A +


B), noting from de Morgan’s Law that a NOR gate is an inverted-input AND gate.

A A

A·B

B B
A⊕B A
=⇒ A⊕B
B

A ⊕ B = (A + B) · (A + B)

(vi) Implementing XNOR using only NOR gates:

An XNOR gate is made by connecting four NOR gates as shown below.

A B A
=⇒ A B
B

A B = (A + B) · (A + B) = A · B + A · B

Thus, NOR gate is a Universal gate.

3
02. Verify DE Morgan’s theorem for 3 variable input with Truth table

Answer: DeMorgan’s Theorems are basically two sets of rules or laws devel-
oped from the Boolean expressions for AND, OR and NOT using two input variables,
A and B. These two rules or theorems allow the input variables to be negated and
converted from one form of a Boolean function into an opposite form.

DeMorgan’s First theorem proves that when two (or more) input variables are AND’ed
and negated, they are equivalent to the OR of the complements of the individual vari-
ables i.e.,

(A · B · C) = A + B + C

DeMorgan’s Second theorem proves that when two (or more) input variables are OR’ed
and negated, they are equivalent to the AND of the complements of the individual
variables. i.e.,

(A + B + C) = A · B · C

(i) Verification of DeMorgan’s First theorem using Truth table with 3 in-
puts

A B C (A · B · C) (A · B · C) A B C A+B+C

0 0 0 0 1 1 1 1 1
0 0 1 0 1 1 1 0 1
0 1 0 0 1 1 0 1 1
0 1 1 0 1 1 0 0 1
1 0 0 0 1 0 1 1 1
1 0 1 0 1 0 1 0 1
1 1 0 0 1 0 0 1 1
1 1 1 1 0 0 0 0 0

Table 1: DeMorgan’s First theorem using Truth table with 3 inputs

4
(ii) Verification of DeMorgan’s Second theorem using Truth table with 3
inputs

A B C (A + B + C) (A + B + C) A B C A·B·C

0 0 0 0 1 1 1 1 1
0 0 1 1 0 1 1 0 0
0 1 0 1 0 1 0 1 0
0 1 1 1 0 1 0 0 0
1 0 0 1 0 0 1 1 0
1 0 1 1 0 0 1 0 0
1 1 0 1 0 0 0 1 0
1 1 1 1 0 0 0 0 0

Table 2: DeMorgan’s Second theorem using Truth table with 3 inputs

References:

1. https://www.electronics-tutorials.ws/boolean/demorgan.html

2. https://www.sciencedirect.com/topics/computer-science/de-morgans-theorem

3. https://de-iitr.vlabs.ac.in/exp/realization-of-logic-functions/theory.html

You might also like