0% found this document useful (0 votes)
8 views12 pages

LC3 Logic

The document provides an overview of digital logic circuits, including definitions and truth tables for various logic gates such as OR, AND, NOT, NOR, NAND, XOR, and XNOR. It explains how these gates operate based on binary inputs and presents Boolean expressions for each gate. Additionally, it discusses the implementation of circuits from Boolean expressions and the evaluation of these expressions using specific rules.

Uploaded by

Mohammed Fakry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views12 pages

LC3 Logic

The document provides an overview of digital logic circuits, including definitions and truth tables for various logic gates such as OR, AND, NOT, NOR, NAND, XOR, and XNOR. It explains how these gates operate based on binary inputs and presents Boolean expressions for each gate. Additionally, it discusses the implementation of circuits from Boolean expressions and the evaluation of these expressions using specific rules.

Uploaded by

Mohammed Fakry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

29 LOGIC

Digital logic circuit:


In an electronic circuit that deal with signals that have only two states 0 and 1

The states 1 and 0 are also commonly referred to as:

On and Off

High and Low

True and False

+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

A plus (+) is used to show OR operation

Note: the truth table shows all input-output

Possibilities for a logic circuits.


30 LOGIC

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

A plus (.) is used to show AND operation Time diagram

NOT Gate:
Is an electronic circuit that produces an inverted version of the input at its

output. Also is known as an inverter


Truth table
Logic expression
A Y
0 1
1 0

Boolean expression
Time diagram
Y = 𝐴̅

If the input is A, the inverted output is A with

a bar over the top


31 LOGIC

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

Note: the total number of possible combinations of binary inputs to a gate is

determined by N= 2n

N is number of input combination, n is number of input variable

Two variable n=2 , N=22=4 combination

Three variable n=3 , N=23=8 combination

Four variable n=4 , N=24=16 combination

Three – input OR gate:


Truth table
Logic expression
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
Boolean expression
1 0 0 1
Y= A + B + C 1 0 1 1
1 1 0 1
1 1 1 1
Three – input AND gate:
Logic expression
Truth table

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 = 𝐴̅+𝐵̅

Note: the negative – OR is equivalent operation of NAND Gate

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 = 𝐴̅.𝐵̅

Note: the negative – AND is equivalent operation of NOR Gate


34 LOGIC

Exclusive OR Gate ( XOR ):


Logic expression Truth table

A B Y
0 0 0
0 1 1
1 0 1
1 1 0

Note: like binary addition and we

Boolean expression disregard carries the output is obtain.


Y = 𝐴⊕𝐵
Y= 𝐴̅𝐵 + 𝐴𝐵̅

Three – input XOR gate :


Logic expression
Truth table

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

Note: the output of XOR can be obtained by :

1- If we have an even number of ones the output =0, if we have an odd number

of ones the output = 1.


35 LOGIC

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.

Exclusive NOR Gate ( XNOR ):


Logic expression

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:

Show the output waveform:

1-

2-
37 LOGIC

3-

Describing logic circuit output algebraically:


Any logic cct. no matter how complex may be completely described using Boolean

expression previously defined because the OR , AND , NOT are the basic building

block of a digital system.

ex: write the output Boolean expression of the cct. bellow:

Sol: X= ( A . B ) + C

ex: write the output expression

Sol: X=𝐴̅ + 𝐵

ex: write the output expression

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

Implementing circuits from Boolean expression:


ex: construct a logic cct. Whose output :
𝑌 = 𝐴 ∙ 𝐶 + 𝐵 ∙ 𝐶̅ + 𝐴̅ ∙ 𝐵 ∙ 𝐶
Sol:

ex: 𝑋 = 𝐴𝐵 + 𝐵̅𝐶 draw the cct. Diagram that implements this expression and

write truth table.

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,

determine the output level A = B = D = 1 and C = 0

Sol: 𝑌 = 𝐴 ∙ 𝐵 + 𝐶 ∙ (𝐶̅ + 𝐷)

Output level y= 1 .1 + 0 . (1+1) = 1+ 0 = 1

Note: the following rules must always be followed when evaluating a Boolean

expression

1- Perform all operation with parentheses

2- Perform an AND operation before an OR operation unless parentheses

indicate otherwise

3- If an expression has a bar over it performs the operation of the expression

first and then inverts the result.

You might also like