Digital Logic & Design

Dr. Waseem Ikram

Lecture 01

Analogue Quantities
Continuous Quantity  Intensity of Light  Temperature  Velocity

Digital Values

Discrete set of values

Continuous Signal
45 40 35 temperature 0C 30 25 20 15 10 5 0 1 2 3 4 5 6 7 8 time 9 10 11 12 13 14 15

Continuous Signal 45 40 35 temperature 0C 30 25 20 15 10 5 0 1 1 2 2 3 7 4 4 5 6 7 8 time 9 10 11 12 13 14 15 18 25 23 34 35 37 29 25 22 42 41 .

Digital Representation 45 40 35 temperature 0C 30 25 20 15 10 5 0 1 1 2 2 3 7 4 4 5 6 7 8 9 10 11 12 13 14 15 18 25 23 34 35 37 29 25 22 42 41 samples .

Under Sampling 45 40 35 temperature 0C 30 25 20 15 10 5 0 1 3 5 7 9 11 13 15 samples .

Electronic Processing    Analogue Systems Digital Systems Representing quantities in Digital Systems .

Representing Digital Values 39 0C ? 5 b1 Digital System 6 7 b2 b3 39mV 1mV = 1 a1 a2 a3 1 2 3 4 a4 0 Vcc 1 b4 8 GND 0 6.25 x 1015 V !! .25 x 10 1 8 ? 6.

Digital Systems   Two Voltage Levels Two States – On/Off – Black/White – Hot/Cold – Stationary/Moving .

Binary Number System    Binary Numbers Representing Multiple Values Combination of 0v & 5v .

Merits of Digital Systems       Efficient Processing & Data Storage Efficient & Reliable Transmission Detection and Correction of Errors Precise & Accurate Reproduction Easy Design and Implementation Occupy minimum space .

Information Processing      Numbers Text Formula and Equations Drawings and Pictures Sound and Music .

Logic Gates     Building Blocks AND. XOR and XNOR Gates Integrated Circuits (ICs) . OR and NOT Gates NAND. NOR.

Logic Gate Symbol and ICs AND Gate OR Gate NOT Gate NAND Gate NOR Gate XOR Gate XNOR Gate Vcc 13 12 11 10 9 8 7400 GND NAND Gate IC 4 5 1 2 3 6 .

Combinational Circuits   Combination of Logic Gates Adder Combinational Circuit .

Adder Combinational Circuit Sum Carry .

Functional Devices  Functional Devices – Adders – Comparators – Encoders/Decoders – Multiplexers/Demultiplexers .

Sequential Circuits     Memory Element Current & Previous State Flip-Flops Counters & Registers .

Block Diagram of a Sequential Circuit Input 1 a1 b1 5 Output 2 a2 Combinational Logic Circuit b2 6 1 a1 b1 5 Memory Element .

Programmable Logic Devices (PLDs)       Configurable Hardware Combinational Circuits Sequential Circuits Low chip count Lower Cost Short development time .

Memory    Storage RAM (Random Access Memory) – Read-Write – Volatile ROM (Read-Only Memory) – Read-Only – Non-Volatile .

A/D & D/A Converters    Processing of Continuous values Conversion – Analogue to Digital A/D – Digital to Analogue D/A Industrial Control Application .

Digital Industrial Control */* x1 u1 Digital x1 */* u1 Controller A/D D/A Converter Converter Thermocouple Reaction Vessel Heater Control .

Summary     Continuous Signals Digital Representation in Binary Information Processing Logic Gates .

Summary     Combinational & Sequential Circuits Programmable Logic Devices (PLDs) Memory (RAM & ROM) A/D & D/A Converters .

Number Systems and Codes      Decimal Number System Caveman Number System Binary Number System Hexadecimal Number System Octal Number System .

1. 100.9 Combination of digits Positional Number System 275 = 2 x 102 + 7 x 101 + 5 x 100 – Base or Radix 10 – Weight 1. 1000 ….. .Decimal Number System     Ten unique numbers 0. 10.

Representing Fractions  Fractions can be represented in decimal number system in a manner = 3 x 102 + 8 x 101 + 2 x 100 + 9 x 10-1 + 1 x 10-2 = 300 + 80 + 2 + 0.01 = 382.9 + 0.91 .

∆. Ω and ↑ Base – 5 Number System ∆Ω↑∑ = 220 .Caveman Number System    ∑. >.

Caveman Number System Decimal NumberCaveman NumberDecimal Number Caveman Number 0 1 2 3 4 5 6 7 8 9 ∑ ∆ > Ω ↑ ∆∑ ∆∆ ∆> ∆Ω ∆↑ 10 11 12 13 14 15 16 17 18 19 >∑ >∆ >> >Ω >↑ Ω∑ Ω∆ Ω> ΩΩ Ω↑ .

Caveman Number System  Mr. Thus the number ∆Ω↑∑ in decimal is = ∆ x 53 + Ω x 52 + ↑ x 51 + ∑ x 50 = ∆ x 125 + Ω x 25 + ↑ x 5 + ∑ x 1 = (1) x 125 + (3) x 25 + (4) x 5 + (0) x 1 = 125 + 75 + 20 + 0 = 220 . Caveman is using a base 5 number system.

Binary Number System     Two unique numbers 0 and 1 Base – 2 A binary digit is a bit Combination of bits to represent larger values .

Binary Number System Decimal NumberBinary Number 0 1 2 3 4 5 6 7 8 9 0 1 10 11 100 101 110 111 1000 1001 Decimal Number Binary Number 10 11 12 13 14 15 16 17 18 19 1010 1011 1100 1101 1110 1111 10000 10001 10010 10011 .

Combination of Binary Bits   Combination of Bits 100112 = 1910 = (1 x 24) + (0 x 23) + (0 x 22) + (1 x 21) + (1 x 20) = (1 x 16) + (0 x 8) + (0 x 4) + (1 x 2) + (1 x 1) = 16 + 0 + 0 + 2 + 1 = 19 .

625  Floating Point Notations .125 = 11.625 = (1 x 23) + (0 x 22) + (1 x 21) + (1 x 20) + (1 x 2-1) + (0 x 2-2) + (1 x 2-3) = (1 x 8) + (0 x 4) + (1 x 2) + (1 x 1) + (1 x 1/2) + (0 x 1/4) + (1 x 1/8) = 8 + 0 + 2 + 1 + 0.Fractions in Binary   Fractions in Binary 1011.5 + 0 + 0.1012 = 11.

Decimal-Binary Conversion   Binary to Decimal Conversion – Sum-of-Weights – Adding weights of non-zero terms Decimal to Binary Conversion – Sum-of-Weights (in reverse) – Repeated Division by 2 .

Decimal to binary conversion using Number 392 136 8 8 8 8 0 0 0 Weight Result after subtraction 256 128 54 32 16 8 4 2 1 8-8=0 392-256=136 136-128=8 Sum of weight Binary 1 1 0 0 0 1 0 0 0 .

2 and 1 19 .0.0.Decimal-Binary Conversion  Binary to Decimal Conversion – Sum-of-Weights – Adding weights of non-zero terms 100112 (1× 24 ) + (0 × 23 ) + (0 × 22 ) + (1× 21 ) +(1× 2 ) 0 Terms 16.

Decimal-Binary Conversion  Binary to Decimal Conversion – Sum-of-Weights – Adding weights of non-zero terms .

625 .1012 = 8 + 2 + 1 + 1 2 8 = 11 + 5 8 = 11.Decimal-Binary Conversion  Binary to Decimal Conversion – Sum-of-Weights – Adding weights of non-zero terms 100112 = 16 + 2 + 1 = 19 1011.

Lecture No. 1 Number Systems A Summary .