LC3 Logic
LC3 Logic
On and Off
+5V and 0V
Logic gate:
Is an elementary building block of a digital circuit, it has one output and one or
more inputs .
OR Gate:
Is an electronic circuit that gives a high output (1) if one or more of its input are
high (1) .
Truth table
Logic expression
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
Boolean expression
Time diagram
Y=A+B
AND Gate:
Is an electronic circuit that gives a high output (1) only if all its inputs are high (1)
Logic expression
Truth table
A B Y
0 0 0
0 1 0
1 0 0
Boolean expression 1 1 1
Y=A.B
NOT Gate:
Is an electronic circuit that produces an inverted version of the input at its
Boolean expression
Time diagram
Y = 𝐴̅
NOR Gate:
NOT – OR gate its equal to an OR gate followed by a NOT gate
Logic expression
Truth table
A B A+B Y=𝑨
̅̅̅̅̅̅̅̅
+𝑩
0 0 0 1
0 1 1 0
Boolean expression 1 0 1 0
Y = ̅̅̅̅̅̅̅̅
𝐴+𝐵 1 1 1 0
The output of NOR gate are low (0) if any of input are high (1)
NAND Gate:
NOT – AND gate its equal to an AND gate followed by a NOT gate
Logic expression
Truth table
A B A.B Y=𝑨.
̅̅̅̅̅
𝑩
0 0 0 1
0 1 0 1
Boolean expression
1 0 0 1
Y = 𝐴.
̅̅̅̅̅
𝐵 1 1 1 0
32 LOGIC
determined by N= 2n
A B C Y
0 0 0 0
0 0 1 0
Boolean expression
0 1 0 0
Y= A . B . C 0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
33 LOGIC
Negative-OR:
Logic expression
Truth table
A B ̅
𝐀 ̅
𝐁 Y = 𝐀
̅ +𝐁
̅
0 0 1 1 1
0 1 1 0 1
1 0 0 1 1
1 1 0 0 0
Boolean expression
Y = 𝐴̅+𝐵̅
Negative-AND :
Logic expression
Truth table
A B ̅
𝐀 ̅
𝐁 Y = 𝐀
̅ .𝐁
̅
0 0 1 1 1
0 1 1 0 0
1 0 0 1 0
1 1 0 0 0
Boolean expression
Y = 𝐴̅.𝐵̅
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
Boolean expression 0 1 1 0
Y= A ⨁ B ⨁ C 1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
1- If we have an even number of ones the output =0, if we have an odd number
2- The result can be obtained from a binary addition with disregard carries.
3- Taking XOR with the first two inputs and the result will be XOR with third
one.
Truth table
A B A⨁B Y=𝑨
̅̅̅̅̅̅̅̅̅
⊕𝑩
0 0 0 1
0 1 1 0
1 0 1 0
1 1 0 1
Boolean expression
Y=𝐴̅̅̅̅̅̅̅̅
⊕𝐵
ex: show the output waveform for the 2-input AND gate bellow:
36 LOGIC
ex: show the output waveform for the 2-input OR gate bellow:
ex: show the output waveform for the XOR gate and XNOR gate
H.W:
1-
2-
37 LOGIC
3-
expression previously defined because the OR , AND , NOT are the basic building
Sol: X= ( A . B ) + C
Sol: X=𝐴̅ + 𝐵
Sol: X= 𝐴
̅̅̅̅̅̅̅̅
+𝐵
38 LOGIC
ex: write the output expression and the truth table of the cct. Bellow:
Sol: X= (𝐴̅ ∙ 𝐵 ∙ 𝐶) ∙ (𝐴
̅̅̅̅̅̅̅̅
+ 𝐷)
ABCD 𝐴̅ 𝐴̅ ∙ 𝐵 ∙ 𝐶 𝐴+𝐷 ̅̅̅̅̅̅̅̅
𝐴+𝐷 X= (𝐴̅ ∙ 𝐵 ∙ 𝐶) ∙ (𝐴
̅̅̅̅̅̅̅̅
+ 𝐷)
0000 1 0 0 1 0
0001 1 0 1 0 0
0010 1 0 0 1 0
0011 1 0 1 0 0
0100 1 0 0 1 0
0101 1 0 1 0 0
0110 1 1 0 1 1
0111 1 1 1 0 0
1000 0 0 1 0 0
1001 0 0 1 0 0
1010 0 0 1 0 0
1011 0 0 1 0 0
1100 0 0 1 0 0
1101 0 0 1 0 0
1110 0 0 1 0 0
1111 0 0 1 0 0
39 LOGIC
ex: 𝑋 = 𝐴𝐵 + 𝐵̅𝐶 draw the cct. Diagram that implements this expression and
Sol:
ABC 𝐵̅ 𝐴∙𝐵 𝐵̅ ∙ 𝐶 𝑋 = 𝐴 ∙ 𝐵 + 𝐵̅ ∙ 𝐶
000 1 0 0 0
001 1 0 1 1
010 0 0 0 0
011 0 0 0 0
100 1 0 0 0
101 1 0 1 1
110 0 1 0 1
111 0 1 0 1
40 LOGIC
ex: write the Boolean expression for the output of the logic cct. Shown,
Sol: 𝑌 = 𝐴 ∙ 𝐵 + 𝐶 ∙ (𝐶̅ + 𝐷)
Note: the following rules must always be followed when evaluating a Boolean
expression
indicate otherwise