You are on page 1of 27

Digital Logic & Processors

Introduction
• Course code :20EC1101
• LTP 3-0-2-0

09/13/2022 Source: Confidential 2


Think & Answer
• List few examples of Digital Devices that you have
observed in real time.

• Give your answers in the chat window


Technology in our Daily Lives

09/13/2022 4
Analog System Versus Digital System
Analog and Digital Signals
• Analog system
– The physical quantities or signals may vary continuously
over a specified range.
• Digital system
– The physical quantities or signals can assume only
discrete values.
– Greater accuracy

Analog signal Digital signal


ANALOG DIGITAL
SIGNAL SIGNAL
Advantages of Digital Systems
• Digital signal can be encrypted so that only the intended
receiver can decode it .
• Accuracy of results
• More reliable than analog systems due to better
immunity to noise.
• Ease of design with Flexibility and functionality.
• Speed of operation
• Information storage can be easier in digital systems than
in analog ones

09/13/2022 8
Illustration of Analog to Digital conversion

09/13/2022 9
Illustration of Digital to Analog conversion

09/13/2022 10
Think & Answer
• Why Decimal Number system is not used
for internal processing in the electronic
systems?
• Which number system is used and
understandable to digital electronic
devices ?

09/13/2022 Source: Confidential 11


Computer System and Languages
Think & Answer
• How many number systems are there?

• What do you mean by Radix or Base?

• Give your answers in the chat window


Data Representation in computer
• A software program entered into the computer is converted into a
machine language program consisting of binary format (usually 1’s
and 0’s).
• Processing large amount of binary data is difficult.
• Hexa decimal, Decimal and octal are other number systems can be used.
NUMBER SYSTEMS
Decimal Number
Base (or) Radix 10; Digits
(0,1,2,3,4,5,6,7,8,9)

Binary Number
Base (or) Radix 2;
Digits (0,1)
Number
Systems
Octal Number
Base (or) Radix 8;
Digits (0,1,2,3,4,5,6,7)

Hexadecimal Number
Base (or) Radix 16;
Digits (0,1,2,3,4,5,6,7,8,9,A,
B, C, D, E, F)

09/13/2022 Source: Confidential 15


Decimal Number System

• Base (also called radix) = 10


– 10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } 2 1 0 -1 -2

• Digit Position 5 1 2 7 4
– Integer & fraction
100 10 1 0.1 0.01
• Digit Weight
– Weight = (Base) Position
• Magnitude 500 10 2 0.7 0.04

– Sum of “Digit x Weight” d2*B2+d1*B1+d0*B0+d-1*B-1+d-2*B-2

• Formal Notation (512.74)10


Binary Number System
• Base = 2
– 2 digits { 0, 1 }, called binary digits or “bits”
• Weights 4 2 1 1/2 1/4

– Weight = (Base) Position 1 0 1 0 1


• Magnitude 2 1 0 -1 -2
1 *22+0 *21+1 *20+0 *2-1+1 *2-2
– Sum of “Bit x Weight”
=(5.25)10
• Formal Notation
• Groups of bits (101.01)2
4 bits = Nibble
1011
8 bits = Byte
11000101
Octal Number System
• Base = 8
– 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 }
• Weights
64 8 1 1/8 1/64
Position
– Weight = (Base)
5 1 2 7 4
• Magnitude 2 1 0 -1 -2
– Sum of “Digit x Weight” 2 1 0
5 *8 +1 *8 +2 *8 +7 *8 +4 *8
-1 -2

• Formal Notation =(330.9375)10


(512.74)8
Octal Number System is one in which the base value is 8.
It uses 8 digits i.e. 0-7 for creation of Octal Numbers.
Octal Numbers can be converted to Decimal value by multiplying each
digit with the place value and then adding the result.
Here the place values are 80, 81, and 82.
Hexadecimal Number System
• Base = 16
– 16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D,
E, F } 256 16 1 1/16 1/256

• Weights 1 E 5 7 A
– Weight = (Base) Position 2 1 0 -1 -2

1 *162+14 *161+5 *160+7 *16-1+10 *16-2


• Magnitude
=(485.4765625)10
– Sum of “Digit x Weight”
• Formal Notation (1E5.7A)16
Number Base Conversions
Evaluate
Magnitude
Octal
(Base 8)

Evaluate
Magnitude
Decimal Binary
(Base 10) (Base 2)

Hexadecimal
(Base 16)
Evaluate
Magnitude
Decimal, Binary, Octal and Hexadecimal
Decimal Binary Octal Hex
00 0000 00 0
01 0001 01 1
02 0010 02 2
03 0011 03 3
04 0100 04 4
05 0101 05 5
06 0110 06 6
07 0111 07 7
08 1000 10 8
09 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Conversion of decimal to binary
• Step 1: Divide the Decimal Number with the base of
the number system to be converted to. Here the
conversion is to binary, hence the divisor will be 2. 
• Step 2: The remainder obtained from the division
will become the least significant digit of the new
number.
• Step 3: The quotient obtained from the division will
become the next dividend and will be divided by base
i.e. 2.
• Step 4: The remainder obtained will become the
second least significant digit i.e. it will be added in
the left of the previouslySource:
09/13/2022 obtained digit. Confidential 22
DECIMAL TO BINARY CONVERSION
 For Integer part, the number is divided by 2 and the
remainders are read in the direction of arrow from down to top
corresponding to MSB and LSB as shown
 Example: (98)10 = ( )2
98 2 LSB
2 49 0
2 24 1
2 12 0
2 6 (98)10 = (1100010)2
0
2 3 0
1 1
MSB
DECIMAL FRACTION TO BINARY

• Example2 : (0.8125)10 = ( )2

0.8125 X 2 = 1.6250 1 MSB

0.6250 X 2 = 1.250 1

0.250 X 2 = 0.50 0

0.50 X 2 = 1.00 1 LSB


(0.8125)10 = (0.1101)2
OCTAL TO BINARY CONVERSION
• It converts the given Octal number of radix 8 into Binary
number of radix 2.
=
Conversion
Integer Fraction
3 6 7 5 2

011 110 111 101 010

=
HEXADECIMAL TO BINARY CONVERSION
Convert each hexadecimal digit to a 4-bit equivalent binary representation
(2A3.45F) 16 = ( _________ ) 2
Integer Part Fractional Part
2 A 3 4 5 F

0010 1010 0011 0100 0101 1111

(2A3.45F) 16 = (001010100011.010001011111) 2
Think & Answer
• Give your answers in the chat window

• What is Radix of Binary Number System?

• How many bits are required for representing Hexa decimal


Number?

You might also like