You are on page 1of 14

The First lesson on Digital Logic

Rachaen Huq.
Dept. of EEE, BRACU

Rachaen M. Huq 1
Binary LOGIC, Boolean variables
A practical example • “A”, “B”, and “Lamp” are Binary
Variables, i.e. can take values only 1
and 0 (only two states)
• See the table for ALL Possible
combinations of A, B, and Lamp
• A B Lamp
0 0 0
0 1 0
1 0 0
1 1 1
Its called a Binary AND Logic
Rachaen M. Huq 2
Representation of AND • Note the symbol of an AND
Logic, a.k.a. AND Gate. There
are other symbols for other
kind of logics.
• Its called a GATE because the
This logical inputs are given to the “gates”
relationship of the MOSFETS.
table is called a • Hence, the logic gate symbols
truth table
exist in reality as a
combination of MOSFETS.
Expressed as: • The inputs are either a Low,
Output = A.B (0V or -5V) or High(5V).
The expression is a Boolean algebraic • Low =0, High = 1.
equation, driven by Boolean variables
“output”, “B” and “B”. Rachaen M. Huq 3
Inside an AND GATE
Apply 5V in Both A and B,
you will get 5V in “Out”
directly from Vdd biasing
(5V).

Any of them is 0V, the line


disconnects, but below,
one line is activated which
makes OUT to be
connected to Vss- (0V).

Rachaen M. Huq 4
Practical Example of an OR Gate

Expressed as:
Output = A + B
Rachaen M. Huq 5
NOT gate (inverter)

Note that a NOT gate can


have only ONE input and
only ONE output

Expressed as:
C = A’
Rachaen M. Huq 6
Summary of Basic gates

AND/OR Gates may have more than two inputs…


Depending one How many MOSFETS are in series/parallel! Guess
the truth tables
Rachaen M. Huq 7
Other gates

Output = ??
Output = ??

Rachaen M. Huq 8
C
NAND
A Negative OR A
Out Invert First Out
B Then OR B

A B C Out = C’ A A’ B B’ Out

Rachaen M. Huq 9
Do the same for NOR and Neg. AND
• You will find that they eventually lead to Boolean algebraic identities.

• (A+B)’ = A’. B’
• (AB)’ = A’ + B’

• Its called De Morgan’s Law.


• This is just an identity which applies in Boolean Algebra, just like the
(a+b)^2 identity applies in traditional algebra.

Rachaen M. Huq 10
Exclusive (X-__) gates

Symbol?

Output = A__?__B
Symbol?

Output = A__?__B

Rachaen M. Huq 11
A summary of all the gates are
available at Section 2-7 Morris Mano
• Page 57

Rachaen M. Huq 12
Boolean Equations
• A Boolean variable (which can have the values of 0 or 1 only),
represented as a result of (multiple) Boolean operations.

• Boolean variables: a,b,c,x,y,z, just like any variable.


• Booleans operations: AND, OR, NOT

• Examples:

Rachaen M. Huq 13
Connected logic gates, more
complex functions
• See blackboard for examples.

Rachaen M. Huq 14

You might also like