Lect - 1.ppt

33
Digital Electronics Lecture 1 (Overview)

description

Digital electronics

Transcript of Lect - 1.ppt

Page 1: Lect - 1.ppt

Digital Electronics

Lecture 1 (Overview)

Page 2: Lect - 1.ppt

Syllabus Introduction to Digital Systems, Number System,

Binary Codes and Boolean AlgebraDigital systems, Importance, Analog vs. digital world; Conversion of bases, Representation of negative numbers, 9’s and 1’s complement, 10’s and 2’s complement, Arithmetic using r’s complement; Hexadecimal code, weighted codes – BCD,BCD addition, Excess-3 code, Gray code and Alphanumeric code; Logic gates and Boolean algebra

Boolean Function Representation and Minimization TechniquesStandard and canonical representation of Boolean Functions, Two level implementation and minimization of Boolean expressions using Karnaugh Map, Quine-McCluskey method

Page 3: Lect - 1.ppt

Syllabus Combinational Logic Circuitsand Their Applications

Arithmetic Logic modules- Half adder, Full adder, Half subtractor, Full subtractor , Full adder using half adder, Decoders and Encoders, Multiplexers, Demultiplexers; Design examples; Look ahead carry adder, BCD adder, Parallel adder/subtractor, Magnitude comparator

Sequential Logic Circuits and Their Applications

Latches and flip-flops: SR, JK, Master slave JK, T and D; Excitation tables, Conversion of flip-flops; Synchronous and asynchronous counters, Design of counters using flip- flops, Registers, Shift registers, Counters using shift registers; State diagram design, Analysis of sequential circuits using flip-flops; State machine design approach- FSM of sequential circuits (Moore and Mealy machines); Applications and design examples.

Page 4: Lect - 1.ppt

Syllabus Programmable Logic Devices

PLAs, PALs and their applications Introduction to HDL Simulation

HDL concepts, Simulation using ModelSim, Types of modeling- Data flow, Behavioral and Structural; Combinational and sequential circuit examples

Digital Logic FamiliesParameters of Logic Families. Introduction to logic Families: DTL, RTL, TTL, CMOS.

Page 5: Lect - 1.ppt

Books recommended M. Morris Mano, “Digital Design”, 3rd Edition, PHI, 2002. M. Morris Mano, “Digital Logic and Computer Design”,

PHI, 2003. Ronald J. Tocci , Neal S. Widmar and Gregory L. Moss,

“Digital Systems Principles and Applications”, 10th

Edition, Pearson Education, 2009 J.Bhaskar, “A VHDL Primer”, 3rd Edition, Pearson

Education, 2000.

Page 6: Lect - 1.ppt

Analog Signals Time-varying signals

Take any value across a continuous range of voltage, current or whatever metric

Analog electronics represents information as a continuously variable voltage

v (t)= A sin (wt+ Φ) has information A, w, Φ

Page 7: Lect - 1.ppt

Fig.1. Analog Signal

Page 8: Lect - 1.ppt

Digital electronics represents information as a set of finite values.

or Digital electronics represents

information as a sequence of discrete voltage levels

if there are 2 levels we call this binary information

Digital Signals

Page 9: Lect - 1.ppt

Fig.2. Digital Signal

Page 10: Lect - 1.ppt

Analog versus Digital

103.5

Digital Voltage meter

About 100

Analog Voltage meter

Page 11: Lect - 1.ppt

Analog offers Continuous SpectrumDigital offer distinct Steps

Analog Spectrum Digital Spectrum

Page 12: Lect - 1.ppt

Analog has AmbiguityDigital has only one interpretation

1:56 pm

About 2:00

1:50

1:56

1:56

Analog Clock Digital Clock

Page 13: Lect - 1.ppt

Why Digital? Reproducibility of results Ease of design: digital design is logical

(logical design) Flexibility and Functionality Programmability Fast Economical Steadily Advancing Technology

Page 14: Lect - 1.ppt

Electronic Implementation of Logic

It is common to use positive logic implementation: TRUE (1) 5 Volts

FALSE (0) 0 Volts

If we measure the voltage at a point in a circuit, we can say whether the logical value at that point is TRUE or FALSE.

It is common to use Logic 1 for TRUE and Logic 0 for FALSE.

Page 15: Lect - 1.ppt

Number Systems

To talk about binary data, we must first talk about number systems

The decimal number system (base 10) you should be familiar with!

Positional number system

Page 16: Lect - 1.ppt

Positional Notation Value of number is determined by

multiplying each digit by a weight and then summing.

The weight of each digit is a POWER of the BASE and is determined by position.

Page 17: Lect - 1.ppt

Example 1 A Decimal Number such as 1234

Represent a quantity equal to one thousand

Plus two hundred

Plus 3 tens

Plus 4 units

Page 18: Lect - 1.ppt

Thousands, hundreds etc. are the powers of 10 implied by the position of the coefficients

To be more exact 1234 should be written as 1 * 103 + 2 * 102 + 3 * 101 + 4 * 100

In general, a number with decimal point is represented by a series of coefficients as follows

……..a5a4a3a2a1a0 . a-1a-2a-3…….

The coefficient aj are one of the ten digits (0-9)

The subscript value j give the place value and hence power of 10 by which the coefficient must be multiplied.

Page 19: Lect - 1.ppt

The decimal number system (base 10) you should be familiar with!

A digit in base 10 ranges from 0 to 9.

A digit in base 2 ranges from 0 to 1 (binary number system). A digit in base 2 is also called a “bit”.

A digit in base R can range from 0 to R-1

A digit in Base 16 can range from 0 to 16-1 (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). Use letters A-F to represent values 10 to 15. Base 16 is also called Hexadecimal or just “Hex”.

Page 20: Lect - 1.ppt

Base 10, Base 2, Base 16953.7810 = 9 x 102 + 5 x 101 + 3 x 100 + 7 x 10-1 + 8

x 10-2

= 900 + 50 + 3 + .7 + .08 = 953.78

1011.112 = 1x23 + 0x22 + 1x21 + 1x20 + 1x2-1 + 1x2-2

= 8 + 0 + 2 + 1 + 0.5 + 0.25 = 11.75

A2F16 = 10x162 + 2x161 + 15x160 = 10 x 256 + 2 x 16 + 15 x 1 = 2560 + 32 + 15 = 2607

Page 21: Lect - 1.ppt

Conversion of Any Base to DecimalConverting from ANY base to decimal is done by

multiplying each digit by its weight and summing.

Binary to Decimal

1011.112 = 1x23 + 0x22 + 1x21 + 1x20 + 1x2-1 + 1x2-

2

= 8 + 0 + 2 + 1 + 0.5 + 0.25 = 11.75

Hex to Decimal

A2F16 = 10x162 + 2x161 + 15x160 = 10 x 256 + 2 x 16 + 15 x 1 = 2560 + 32 + 15 = 2607

Page 22: Lect - 1.ppt

Conversion of Decimal Integer To Any Base

Divide Number N by base R until quotient is 0.

Remainder at EACH step is a digit in base R, from Least Significant digit to Most significant digit.

Page 23: Lect - 1.ppt

Conversion of Decimal Integer To ANY Base Example

Convert 53 to binary

53/2 = 26, rem = 1 26/2 = 13, rem = 0 13/2 = 6 , rem = 1 6 /2 = 3, rem = 0 3/2 = 1, rem = 1 1/2 = 0, rem = 1

5310 = 1101012

= 1x25 + 1x24 + 0x23 + 1x22 + 0x21 + 1x20

= 32 + 16 + 0 + 4 + 0 + 1 = 53

Least Significant Digit

Most Significant Digit

Page 24: Lect - 1.ppt

Conversion of Decimal fraction To Any Base Example

Decimal fraction to Binary It is accomplished by a method

similar to that used for integers.

Multiplication is used instead of division

Integers are accumulated instead of remainders

Page 25: Lect - 1.ppt

Example 1

Convert (0.6875)10 into binary

Integer Fraction Coefficient

0.6875 * 2 = 1 + 0.3750 a-1= 1

0.3750 * 2 = 0 + 0.7500 a-2= 0

0.7500 * 2 = 1 + 0.5000 a-3= 1

0.5000 * 2 = 1 + 0.0000 a-4= 1

Answer: (0.6875)10 = ( 0.a-1a-2a-3a-4)2= (0.1011)2

Page 26: Lect - 1.ppt

To Convert a decimal fraction to a number expressed in base r , a similar procedure is used.

Multiplication by r instead of 2

The coefficient found from the integers may range in values from 0 to r-1 instead of 0 and 1.

Page 27: Lect - 1.ppt

Example 2 Convert (0.513)10 into octal

Integer Fraction Coefficient

0.513 * 8 = 4 + 0.104 a-1= 4

0.104 * 8 = 0 + 0.832 a-2= 0

0.832 * 8 = 6 + 0.656 a-3= 6

0.656 * 8 = 5 + 0.248 a-4= 5

0.248 * 8 = 1 + 0.984 a-4= 1

0.984 * 8 = 7 + 0.872 a-4= 7

Answer: (0.513)10 = ( 0.a-1a-2a-3a-4a-5a-6….) 8

= ( 0.406517……)8

Page 28: Lect - 1.ppt

Direct conversion from binary to octal Binary numbers can be converted into equivalent

octal numbers by making groups of three bits starting from LSB and moving towards MSB for integer part of the number

Then replacing each group of three bits by its octal representation.

For fractional part, the groupings of three bits are made starting from the binary point.

If last group does not have 3 bits, then pad with zeros

Page 29: Lect - 1.ppt

Octal equivalent of 3 bit binary Number

Octal Digits to binary:08 = 0002

18 = 0012

28 = 0102

38 = 0112

48 = 1002

58 = 1012

68 = 1102

78 = 1112

Page 30: Lect - 1.ppt

Example: Convert (011001110001)2 into octal

Form the group of 3 bits starting from LSB and moving towards MSB

011 001 110 001

Write the octal equivalent of group of 3 bit binary number at their respective places

3 1 6 1

(011001110001)2 = ( 3161 )8

Page 31: Lect - 1.ppt

Example: Convert (1001110001.100)2 into octal

Grouping of 3-bits (LSB To MSB) for integer part

from binary point for fractional part 001 001 110 001 . 100

Padded with a zeros

• Write the octal equivalent of group of 3 bit binary number at their respective places

• 1 1 6 1 . 4

• ( 001 001 110 001 . 100 )2 = ( 1 1 6 1 . 4 )8

Page 32: Lect - 1.ppt

Direct conversion from binary to Hexa decimal(Hex) Binary numbers can be converted into

equivalent Hex numbers by making groups of four bits starting from LSB and moving towards MSB for integer part of the number

Then replacing each group of four bits by its Hex representation.

For fractional part, the groupings of four bits are made starting from the binary point.

If last group does not have 4 bits, then pad with zeros

Page 33: Lect - 1.ppt

Hex equivalent of 4 bit binary Number

Hex Digits to binary: 016 = 00002

116 = 00012

216 = 00102

316 = 00112

416 = 01002

516 = 01012

616 = 01102

716 = 01112

816 = 10002

Hex Digits to binary (cont):916 = 10012

A16 = 10102

B16 = 10112

C16 = 11002

D16 = 11012

E16 = 11102

F16 = 11112