Chapter 1

Download as odp, pdf, or txt
Download as odp, pdf, or txt
You are on page 1of 60

Chapter-1

Number Systems, Digital Logic


Families and Logic Gates
(Marks 16)
CO-Course Outcomes
a. Test the Digital Systems, Logic Families and Logic
Gates.
b. Construct Combinational Logical Circuit.
c. Construct Sequential Logical Circuit.
d. Use registers and instructions of 8086.
e. Develop assembly language programs using 8086.
Basic Terms used:
1. Bit : The smallest unit of data in a computer is
called Bit (Binary Digit). A bit has a single binary
value, either 0 or 1.

2. Byte :- A collection of 8 bits.

3. Nibble :- A collection of 4 bits.


Number Systems:
1. Binary Number System

2. Decimal Number System

3. Octal Number System

4. Hexadecimal Number System


1. Binary Number System
•.
The number system with base 2 is called
as binary number system.

•.
It uses only 2 symbols i.e. 0 and 1.

•.
Also called base 2 number system.

Example
Binary Number: (10101)2
2. Decimal Number System

The number system that we use in our
day-to-day life is the decimal number
system.


The number system with base 10 is called
as decimal number system.


It uses 10 symbols i.e. 0,1,2,3,4,5,6,7,8,9
Example
Decimal Number: (123)10
3. Octal Number System
•.
The number system with base 8 is called
as octal number system.
•.

•.
Also called base 8 number system.
•.

•.
It uses 8 symbols i.e. 0,1,2,3,4,5,6,7

Example
Octal Number: (12035)8
4. Hexadecimal Number System

The number system with base 16 is called
as hexadecimal number system.

The number system uses 10
digits(0,1,2,3,4,5,6,7,8,9)and 6
letters(A,B,C,D,E,F)

A = 10, B = 11, C = 12, D = 13, E = 14,
F = 15.

Also called base 16 number system.

Example
Hexadecimal Number: (19F5)16
Number Conversions:
1. Decimal to Binary
2. Decimal to Octal
3. Decimal to Hexadecimal

Decimal to Binary Number System
Example :-Convert (2910) to binary form.

Step Operation Result/Quotient Remainder


Step 1 29 / 2 14 1
Step 2 14 / 2 7 0
Step 3 7/2 3 1
Step 4 3/2 1 1
Step 5 1/2 0 1

Read Remainder column from bottom to top for final


result i.e. 11101

Decimal Number − 2910 = Binary Number − (11101)2.


Example :-Convert (0.65625)10 to binary form.

Step Operation Result


Step 1 0.65625* 2 1.31250 1
Step 2 0.31250*2 0.62500 0
Step 3 0.62500*2 1.25000 1
Step 4 0.25000*2 0.50000 0
Step 5 0.50000*2 1.00000 1

(0.65625)10 =(0.10101)2
Example :-Convert (25.50)10 to binary form.
a) Consider Integer part i.e. 25

Step Operation Result/Quotient Remainder


Step 1 25 / 2 12 1
Step 2 12 / 2 6 0
Step 3 6/2 3 0
Step 4 3/2 1 1
Step 5 1/2 0 1

(25)10 =(11001)2
b) Consider Fractional part i.e. 0.50

Step Operation Result


Step 1 0.50* 2 1.0 1

(0.50)10 =(0.1)2
Therefore, (25.50)10 = ((11001.1)
2

Decimal to Octal Number System
Example :-Convert (29)10 to it’s octal form.
Step Operation Result/Quotient Remainder
Step 1 29 / 8 3 5
Step 2 3/8 0 3

Read Remainder column from bottom to top for final


result i.e. 35

Decimal Number − 2910 = Octal Number − (35)8


Number Conversion
● Binary to decimal
● Octal to decimal
● Hexadecimal to decimal

Binary to Decimal Number System
Example :- Convert (11101)2 to it’s decimal
form.
Step Binary Decimal Number
Number

Step 1 1 1 1 0 1 ((1 × 24) + (1 × 23) + (1 × 22) + (0 × 21) + (1 × 20))

Step 2 1 1 1 0 1 (16 + 8 + 4 + 0 + 1)
Step 3 1 1 1 0 1 (29)10

Binary Number (11101)2 = Decimal Number(29)10



Binary to Decimal Number System
Example :- Convert (111.01)2 to it’s decimal
form.
Step Binary Decimal Number
Number

Step 1 1 1 1. 0 1 (1 × 22) + (1 × 21) + (1 × 20)+(0x2-1)+(1x2-2)

Step 2 1 1 1. 0 1 (4 + 2 + 1+0+1/4)
Step 3 1 1 1. 0 1 (7+0.25)10

Binary Number (111.01)2 = Decimal Number(7.25)10



Octal to Decimal Number System
Example :- Convert (25)8 to it’s decimal form.

Step Octal Decimal Number


Number
Step 1 (25)8 ((2 × 81) + (5 × 80))
Step 2 (25)8 (16 + 5 )
Step 3 (25)8 (21)10

Octal Number (25)8 = Decimal Number(21)10



Octal to Decimal Number System
Example :- Convert (25.12)8 to it’s decimal
form.
Step Octal Decimal Number
Number
Step 1 (25.12)8 (2 × 81) + (5 × 80)+(1x8-1)+(2x8-2)
Step 2 (25.12)8 (16 + 5+1/8+2/64 )
Step 3 (25.12)8 (21.156)10

Octal Number (25.12)8 = Decimal Number(21.156)10


Codes:-

1. BCD
2. Gray
3. ASCII
4. EBCDIC
1. BCD(Binary Coded Decimal)

This code is also called as 8-4-2-1 code.

8,4,2,1 are the weights of four digits of each
decimal number.
Decimal Number BCD Binary
0 0000 0000
1 0001 0001
2 0010 0010
3 0011 0011
4 0100 0100
5 0101 0101
6 0110 0110
7 0111 0111
8 1000 1000
9 1001 1001
Decimal Number Binary Number BCD Number
What is the difference between binary and
bcd number?
● In a Binary Code, we convert the whole Decimal
number into its binary form.
● In BCD, each of the digit of the decimal number is
represented by its binary form in 4 bits.
● Let us take an Example:
Suppose a number 123
● Its Binary Form will be 01111011
● Its BCD will be 0001 0010 0011
2. Gray Code:
● It is also known as the reflected binary code
(RBC)
● It is an ordering of the binary number system
such that two successive values differ in only
one bit (binary digit).
Decimal Binary Gray
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000
3. ASCII Code :
● ASCII stands for the "American Standard Code for
Information Interchange".
● It was designed in the early 60's, as a standard
character set for computers and electronic devices.
● ASCII is a 7-bit character set containing 128
characters.
● It contains the numbers from 0-9, the upper and
lower case English letters from A to Z, and some
special characters.
4. EBCDIC (Extended Binary Coded Decimal
Interchange Code )
● It is a binary code for alphabetic and numeric
characters that IBM developed for its larger
operating systems.
● EBCDIC uses 8 bits per character while the
original ASCII standard only used 7 bits per
character.
Binary Arithmetic
1. Complements(1's Complement and 2's
Complement)
● 1’s complement of a binary number is another
binary number obtained by toggling all bits in
it, i.e., transforming the 0 bit to 1 and the 1 bit
to 0.
Examples:
1's complement of "0111" is "1000"
1's complement of "1100" is "0011"
● 2’s complement of a binary number is 1 added
to the 1’s complement of the binary number.
Examples:
Find 2's Complement of the following
numbers
1. 01001110
2. 00110101
1.Ans:- 1's Complement of 01001110 is
10110001
● 2's Complement is obtained by adding 1 to 1's
Complement i.e.
10110001
+ 1


10110010
Binary Addition :The rules for binary addition are:
● e.g. 1011 and 1100
I/p Sum Carry Result
0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 0 1 10

Binary Subtraction: The rules for binary subtraction

are:
e.g. 1011 and 0110(Ans: 0101)

I/p Difference Borrow


0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Binary Multiplication
● e.g. Multiply 1001 by 1101 (Ans: 1110101)
Binary Division
● e.g. Divide 1110101 by 1001(Ans: 1101)


Logic Gates :Digital systems are said to be
constructed by using logic gates such as Basic
gates, Universal gates and Derived gates.
● Basic Gates :
1. NOT Gate 2. AND Gate 3. OR Gate
● Universal Gates :
1. NAND 2.NOR
● Derived Gates:
1.EX-OR 2. EX-NOR
Basic Gates :
1. NOT Gate : The NOT gate or inverter is a
logic gate having only one input(A) and one
output(Y).
● Logical Symbol:

● Boolean Expression:The expression relating


the input(A) and output(Y) of a gate is called as
boolean expression.

Y= A
Basic Gates :
1. NOT Gate : The NOT gate or inverter is a
logic gate having only one input(A) and one
output(Y).
● Logical Symbol:

● Boolean Expression:The expression relating


the input(A) and output(Y) of a gate is called as
boolean expression.

Y= A
Truth Table:-

Input(A) Output(Y)
0 1
1 0
2. AND Gate:-
● It is a logic gate that performs the logical
multiplication on its inputs.
● The output is high(Y=1) if and only if all the
inputs to the AND gate are high i.e.1
● The output is low(Y=0) if any one or more
inputs are low(0)
● AND gate have two or more inputs and only
one output.
Logical Symbol:-


2. AND Gate:-
Boolean Expression:-
Y= A.B

Truth Table:-
Inputs Output
0 0 0
0 1 0
1 0 0
1 1 1
3. OR Gate:-

It is a logic gate that performs the logical
addition on its inputs.

The output is high(Y=1) if any one or both the inputs are high
i.e.1

The output is low(Y=0) if and only if both the inputs are low(0)

OR gate have two or more inputs and only one output.
3. OR Gate:-

Logical Symbol :-

● Boolean Expression:-
Y= A+B
● Truth Table:-

Inputs Output
0 0 0
0 1 1
1 0 1
1 1 1
Universal Gate:- 1. NAND Gate 2. NOR Gate
1. NAND Gate:-
● The term NAND can be split as NOT-AND which means
that the NAND operation can be implemented with the
combination of an AND gate and NOT gate.
● Thus NAND gate is equivalent to an AND gate followed by
NOT gate.
● NAND gate is called as “Universal Gate”because we can
construct AND,OR,NOT gates using only NAND gates.
a)Logical Symbol:-
b)Equivalent Circuit:-

● Truth Table:- Inputs Output


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

● Boolean Expression:-
Y= A.B
Universal Gate:-
2. NOR Gate:-
● The term NOR can be split as NOT-OR which means that
the NOR operation can be implemented with the
combination of an OR gate and NOT gate.
● Thus NOR gate is equivalent to an OR gate followed by
NOT gate.
● NOR gate is called as “Universal Gate”because we can
construct AND,OR,NOT gates using only NAND gates.
a)Logical Symbol:-
2)Equivalent Circuit:-

● Truth Table:- Inputs Output


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

● Boolean Expression:-
Y= A+B
Derived Gates:- 1. EX-OR Gate 2. EX-NOR Gate
1. EX-OR Gate:-
● It is called as derived as.
● It is a special type of gate.
● It can be used for applications such as half adder, full
adder and subtractor.

a)Logical Symbol:-
● Truth Table:- Same input output 0 otherwise 1
Inputs Output
0 0 0
0 1 1
1 0 1
1 1 0

● Boolean Expression:- The boolean expression


for two input EX-OR gate is

Y= A B
Boolean Algebra :

Boolean algebra is a division of mathematics which deals
with operations on logical values(binary values) and
contains binary variables.

Boolean algebra is used to analyze and simplify the digital
circuits.

As it uses only binary numbers such as 0 and 1, it is calso
alled as “Binary Algebra” or “Logical Algebra”.
● Rules in boolean algebra are:
1. Variables used can have only two values. Binary 1 for
HIGH and binary 0 for LOW.
2. Complement of a variable is represented by a overbar(-).
Thus complement of variable A is represented as A.
3.ORing of variables is represented by a plus(+) sign
between them. e.g. ORing of A, B, C is represented as
A+B+C
4. ANDing of the two or more variables is represented by
writing dot between them such as A.B.C

● Boolean Laws:-
1. Commutative Law
2. Associative Law
3. Distributive Law
4. AND Law
5. OR Law
6. INVERSION Law
● Boolean Laws:-
1. Commutative Law:
● A . B = B . A ;The order in which two variables are AND’ed
makes no difference.
● A + B = B + A ;The order in which two variables are OR’ed
makes no difference.
● Thus the commutative law states that we can change the
sequence of the variables without having any effect on the
output of a logic circuit
● Boolean Laws:-
2. Associative Law:
● This law states that the order in which the logic operations are
performed is not at all important ultimate outcome is the same.
● A + (B + C) = (A + B) + C = A + B + C (OR Associate Law)
● A(B.C) = (A.B)C = A . B . C (AND Associate Law)

3. Distributive Law:


A(B + C) = A.B + A.C (OR Distributive Law)

A + (B.C) = (A + B).(A + C) (AND Distributive Law)
● Boolean Laws:-
4. AND Law :-
● A.0 = 0
● A.1 = A
● A.A = A
● A.A = 0
5. OR Law :-
● A+0 = A
● A+1 = 1
● A+A = A
● A+A = 1
● Boolean Laws:-
6. INVERSION Law :-
● This law states that if a variable is subjected to a double
inversion then it will result in the original variable itself.
● i.e. A = A
● Truth Table:-

A B AB A B A+B
0 0 1 1 1 1
0 1 1 1 0 1
1 0 1 0 1 1
1 1 0 0 0 0
● De-Morgan's Theorem :- The two theorems suggested by
De-Morgan are as follows:
Theorem 2 : A + B = A . B : NOR = Bubbled AND

This theorem states that complement of addition is


equal to product of the complements.
● Logic Families- A group of compatible
ICs with same logic levels and supply
voltages.
1. TTL(Transistor Transistor Logic):-Standard
logic family; used for the longest time.
2.CMOS(Complementary Metal Oxide
Semiconductor Logic):-suitable for systems
with low power consumption (VLSI circuits)
3.ECL(Emitter Coupled Logic):-suitable for
systems requiring high-speed operations
● Characteristics of Digital ICs:-
● Characteristics of Digital ICs:-
● Characteristics of Digital ICs:-
● Comparision of TTL, ECL and CMOS
Parameters TTL CMOS ECL

Propagation Delay 10ns 70ns 750ps

Power Dissipation 10mW 0.01mW 5mW

Fan In 12-14 >10 >10

Fan Out 10 50 25

You might also like