ELL201 L2 12aug21 1628683376190

Download as pdf or txt
Download as pdf or txt
You are on page 1of 87

Please note all course content is exclusively for registered IIT-D ELL-201 students(S2101).

It
is your responsibility to ensure no unauthorized circulation of the course contents/materials
takes place.

ELL 201: Digital Electronics

Lecture 2

Prof. Manan Suri (EE)


manansuri@ee.iitd.ac.in
http://web.iitd.ac.in/~manansuri/

M. Suri, ELL-201, IITD, (copyright-2021) 1


Recap: Course Logistics: ELL 201 – Core Course
Theory Component (100% of Total Course Grade – 3 credits)
Lab Component (1.5 credits → will be online as well)

1. Instructor: Prof. Manan Suri (manansuri@ee.iitd.ac.in), manansuri2002@gmail.com


2. Attendance: No enforcement policy due to Online Lecture Mode → expect to attend live
sessions
3. Minor: 30 %, Major : 40%, Assignment(s)/ Quiz(s): 30% (flexible)
4. All exams → digital/online mode. Exams may involve a viva component on phone-
call/web-meet
5. Re-minors/Re-majors: only as per applicable institute policy. Only for genuine cases.
6. Text-Book : Digital Design, Morris Mano & Ciletti – Pearson – 5th Edn.
7. Resources: Class notes/slides/videos/audio files
8. Tools: Moodle, Impartus, MS Teams
9. Lectures: Mix of recorded + Live sessions. Live sessions have bandwidth issues at times.
(don’t worry, recordings and slides will be shared on Impartus)
Slot A: 8:00 – 9:30 am → exact time matters for live sessions & exams/evaluations

M. Suri, ELL-201_IITD, (copyright-2021) 2


Recap: How to reach out to us?
- Email to course TA + Keep me in cc → please wait 48-72 hours for a response!
- In subject line write: <<ELL201-Aug-2021 Sem>> <<Name>><<entryID>>
- Always write from your official IIT-D email IDs
- Always write your full name and IIT-D entry ID at the end of your message
- Always enter the MS Teams live lectures from your official IIT-D email IDs
- A 201 TA channel has been created in Teams group

Requests not following above rules will not be entertained


TAs:

1. Ranajay Medya: ee1180491@ee.iitd.ac.in


2. Supriya Chakraborty: eez178167@ee.iitd.ac.in
3. Sai Sukruth Bezugam: eey197521@ee.iitd.ac.in

As we move further we will add more TAs to help you all apart from the above 3

Plagiarism/Copy/Misconduct/Unethical practices : Straight F

M. Suri, ELL-201_IITD, (copyright-2021) 3


Recap: Tentative Course Outline
(Note: timeline may change during the semester without any prior notice → details are only of indicative nature)

Lec. No Date Content


1 9-Aug-2021 Intro + Logistics + Course Policy + Motivation etc
2 12-Aug-2021 Why digital, Number Systems + Conversions etc.
3 16-Aug-2021 Fractional, Complements, Addn, Subtraction
4 21-Aug-2021 Logic Gates, Boolean Algebra, Minterm, Maxterm, SOP, POS
5 23-Aug-2021
KMaps, Minimization, Logic Gates
6 26-Aug-2021
7 2-Sept-2021
Adders (half/full) + Parity bit circuits + 4-bit adder + subtraction + overflow detection
8 4-Sept-2021
+ BCD adder, Ripple Carry, CLA, 4-bit, 16-bit, 64-bit, Timing Analysis, etc.
9 6-Sept-2021
10 9-Sept-2021
Mux + Decoder + Encoder-1
11 13-Sept-2021
12 16-Sept-2021 PB Set/Assignment or as per need
Minor week (19th Sept to 23 Sept)
13 27-Sept-2021
14 30-Sept-2021
Sequential Logic - Latches. Flip flops, varieties, counters, registers, digital CMOS,
15 4-Oct-2021
Verilog intro
16 7-Oct-2021
17 11-Oct-2021
18 14-Oct-2021 PB Set/Assignment or as per need
Mid Sem Break (16 Oct- 19 Oct)
19 21-Oct-2021
20 25-Oct-2021 FSM intro, Moore, Mealy, Examples, Conversions etc.
21 28-Oct-2021
22 1-Nov-2021
Memory, Advanced topics, etc.
23 8-Nov-2021
24 11-Nov-2021 Extra/Buffer/Cover-up class/As per need
Major Exam Week - 15th Nov to 24th Nov

M. Suri, ELL-201_IITD, (copyright-2021) 4


Recap: What is Digital?
(few Interactive responses from participants)
discreteness
which stores data in two states only
like 1
0 and 1 binary system
like 1 surprised 1
sir , is it necessary to have "2 states only"?
like 2
Something that is not continuous but
descrete in details
like 2 we have digital clocks too...
like 1

discontinuous states

System with discrete numbers

- Adopt a “discrete” and “quantized” representation of information and


manipulation of information

- Utilize only limited states or limited values for representation

M. Suri, ELL-201, IITD, (copyright-2021) 5


Recap: Why Digital?
storage of information is easy (few Interactive responses from participants)
Easier transportation of information

storage of information is easy since quantities are limited, its easier to manipulate, store and count
and access information

Easier transportation of information Only finite levels in digital so communication of information is easy

With a limited amount of states we can store large everything is encrypted in discrete values
information like 1

analysis of information is easy Digital circuits are easier to design than analog

Efficiency
it is easier to depict stuff in the form of a set of discrete known values
less chances of noise during transportation than it is in the form of a continuous range

Digital interpretation and accessing \of data becomes much handier

Simplified circuit design

M. Suri, ELL-201, IITD, (copyright-2021) 6


Recap: Why Digital?
• Simplify Real World/Ease of Design

• Immunity to Noise/Variability Tolerance

• Portability & Compatibility of Design

• Mass Reproduction

M. Suri, ELL-201, IITD, (copyright-2021) 7


Immunity to Noise/Variability Tolerance?

USer

Application/
Software

OS Input
V – voltages
I - currents
Firmware Architectures

Circuits
Hardware
Output
Devices

Materials

M. Suri, ELL-201, IITD, (copyright-2021) 8


Immunity to Noise/Variability Tolerance?

Apple A 12 Bionic
10 Billion Transistors
Silicon Wafer with 100s
7nm Technology Node
of dies
[ref-wiki]
[ref- blog.semi.org]

M. Suri, ELL-201, IITD, (copyright-2021) 9


Examples of Digital?

M. Suri, ELL-201, IITD, (copyright-2021) 10


Basics

M. Suri, ELL-201, IITD, (copyright-2021) 11


Number Systems - Digits

• Decimal, Roman, Binary, Octal, Hex

– Building blocks (underlying bricks)

– System changes depending on the Base

– Impacts computation and resources

– Basically encoding/representing/manipulation of
Information
M. Suri, ELL-201, IITD, (copyright-2021) 12
Significance (Most & Least)
• For any number system (integer)
• Right most: Least significant digit/bit (LSB)
• Left most: Most significant digit/bit (MSB)

Decimal: 4153231

Binary: 1010001

Hex: AE143

M. Suri, ELL-201, IITD, (copyright-2021) 13


Significance (Most & Least)
• For any number system (integer)
• Right most: Least significant digit/bit (LSB)
• Left most: Most significant digit/bit (MSB)

Decimal: 4153231

Binary: 1010001 LSB

Hex: AE143

M. Suri, ELL-201, IITD, (copyright-2021) 14


Significance (Most & Least)
• For any number system (integer)
• Right most: Least significant digit/bit (LSB)
• Left most: Most significant digit/bit (MSB)

Decimal: 4153231

Binary: MSB 1010001 LSB

Hex: AE143

M. Suri, ELL-201, IITD, (copyright-2021) 15


Decimal – Base 10

• The system used in our day-to day life


• Uses 10 different digits : 0 - 9
• Position based representation
• Each digit corresponds to a power of 10
• Right to Left the powers of 10 increase from 0 → n

Example: 2164

M. Suri, ELL-201, IITD, (copyright-2021) 16


Decimal – Base 10

• The system used in our day-to day life


• Uses 10 different digits : 0 - 9
• Position based representation
• Each digit corresponds to a power of 10
• Right to Left the powers of 10 increase from 0 → n

Example: 2164 = 2 * 103 + 1 * 102 + 6 * 101 + 4 * 100

M. Suri, ELL-201, IITD, (copyright-2021) 17


Decimal – Base 10

• The system used in our day-to day life


• Uses 10 different digits : 0 - 9
• Position based representation
• Each digit corresponds to a power of 10
• Right to Left the powers of 10 increase from 0 → n

Example: 2164 = 2 * 103 + 1 * 102 + 6 * 101 + 4 * 100

M. Suri, ELL-201, IITD, (copyright-2021) 18


Decimal – Base 10

• The system used in our day-to day life


• Uses 10 different digits : 0 - 9
• Position based representation
• Each digit corresponds to a power of 10
• Right to Left the powers of 10 increase from 0 → n

Example: 2164 = 2 * 103 + 1 * 102 + 6 * 101 + 4 * 100

M. Suri, ELL-201, IITD, (copyright-2021) 19


Decimal – Base 10

• The system used in our day-to day life


• Uses 10 different digits : 0 - 9
• Position based representation
• Each digit corresponds to a power of 10
• Right to Left the powers of 10 increase from 0 → n

Example: 2164 = 2 * 103 + 1 * 102 + 6 * 101 + 4 * 100

M. Suri, ELL-201, IITD, (copyright-2021) 20


Binary – Base 2

• The lifeline of digital electronics and computers


• Uses only 2 different digits : 0 and 1
• Position based representation
• Each digit corresponds to a power of 2
• Right to Left the powers of 2 increase from 0 → n

Example: 1011

M. Suri, ELL-201, IITD, (copyright-2021) 21


Binary – Base 2

• The lifeline of digital electronics and computers


• Uses only 2 different digits : 0 and 1
• Position based representation
• Each digit corresponds to a power of 2
• Right to Left the powers of 2 increase from 0 → n

Example: 1011 = 1 * 23 + 0 * 22 + 1 * 21 + 1 * 20

M. Suri, ELL-201, IITD, (copyright-2021) 22


Binary – Base 2

• The lifeline of digital electronics and computers


• Uses only 2 different digits : 0 and 1
• Position based representation
• Each digit corresponds to a power of 2
• Right to Left the powers of 2 increase from 0 → n

Example: 1011 = 1 * 23 + 0 * 22 + 1 * 21 + 1 * 20

M. Suri, ELL-201, IITD, (copyright-2021) 23


Binary – Base 2

• The lifeline of digital electronics and computers


• Uses only 2 different digits : 0 and 1
• Position based representation
• Each digit corresponds to a power of 2
• Right to Left the powers of 2 increase from 0 → n

Example: 1011 = 1 * 23 + 0 * 22 + 1 * 21 + 1 * 20

M. Suri, ELL-201, IITD, (copyright-2021) 24


Binary – Base 2

• The lifeline of digital electronics and computers


• Uses only 2 different digits : 0 and 1
• Position based representation
• Each digit corresponds to a power of 2
• Right to Left the powers of 2 increase from 0 → n

Example: 1011 = 1 * 23 + 0 * 22 + 1 * 21 + 1 * 20

M. Suri, ELL-201, IITD, (copyright-2021) 25


Binary – Base 2

• The lifeline of digital electronics and computers


• Uses only 2 different digits : 0 and 1
• Position based representation
• Each digit corresponds to a power of 2
• Right to Left the powers of 2 increase from 0 → n

Example: 1011 = 1 * 23 + 0 * 22 + 1 * 21 + 1 * 20
= 8 + 2 + 1 = 11 (in base 10)

M. Suri, ELL-201, IITD, (copyright-2021) 26


Binary – Base 2

• For quick manipulation in Binary – decimal system :


It helps to know powers of 2

M. Suri, ELL-201, IITD, (copyright-2021) 27


Octal – Base 8

• Uses 8 different digits : 0,1,2,3,4,5,6 and 7


• Position based representation
• Each digit corresponds to a power of 8
• Right to Left the powers of 8 increase from 0 → n

Example: 1638 = 1 * 82 + 9 * 81 + 3 * 80

M. Suri, ELL-201, IITD, (copyright-2021) 28


Octal – Base 8

• Uses 8 different digits : 0,1,2,3,4,5,6 and 7


• Position based representation
• Each digit corresponds to a power of 8
• Right to Left the powers of 8 increase from 0 → n

Example: 1638 = 1 * 82 + 9 * 81 + 3 * 80

M. Suri, ELL-201, IITD, (copyright-2021) 29


Octal – Base 8

• Uses 8 different digits : 0,1,2,3,4,5,6 and 7


• Position based representation
• Each digit corresponds to a power of 8
• Right to Left the powers of 8 increase from 0 → n

Example: 1638 = 1 * 82 + 6 * 81 + 3 * 80

M. Suri, ELL-201, IITD, (copyright-2021) 30


Octal – Base 8

• Uses 8 different digits : 0,1,2,3,4,5,6 and 7


• Position based representation
• Each digit corresponds to a power of 8
• Right to Left the powers of 8 increase from 0 → n

Example: 1638 = 1 * 82 + 6 * 81 + 3 * 80

M. Suri, ELL-201, IITD, (copyright-2021) 31


Octal – Base 8

• Uses 8 different digits : 0,1,2,3,4,5,6 and 7


• Position based representation
• Each digit corresponds to a power of 8
• Right to Left the powers of 8 increase from 0 → n

Example: 1638 = 1 * 82 + 6 * 81 + 3 * 80
= 64 + 48 + 3 =

M. Suri, ELL-201, IITD, (copyright-2021) 32


Octal – Base 8

• Uses 8 different digits : 0,1,2,3,4,5,6 and 7


• Position based representation
• Each digit corresponds to a power of 8
• Right to Left the powers of 8 increase from 0 → n

Example: 1638 = 1 * 82 + 6 * 81 + 3 * 80
= 64 + 48 + 3 = 115
(in base 10)

M. Suri, ELL-201, IITD, (copyright-2021) 33


Octal – Base 8

• Uses 8 different digits : 0,1,2,3,4,5,6 and 7


• Position based representation
• Each digit corresponds to a power of 8
• Right to Left the powers of 8 increase from 0 → n

Example: 1638 = 1 * 82 + 6 * 81 + 3 * 80
= 64 + 48 + 3 = 115
(in base 10)

Did you notice the change in magnitude?

M. Suri, ELL-201, IITD, (copyright-2021) 34


Hex – Base 16

• Uses 16 different digits : 0 – 9 and A,B,C,D,E,F


• Position based representation
• Each digit corresponds to a power of 16
• Usually precedes with ‘0x’
• Right to Left the powers of 16 increase from 0 → n

Example: B9216 = 11 * 162 + 9 * 161 + 2 * 160


= 2816+ 144 + 2 = 2962
(in base 10)

M. Suri, ELL-201, IITD, (copyright-2021) 35


Hex – Base 16

• Uses 16 different digits : 0 – 9 and A,B,C,D,E,F


• Position based representation
• Each digit corresponds to a power of 16
• Usually precedes with ‘0x’
• Right to Left the powers of 16 increase from 0 → n

Example: B9216 = 11 * 162 + 9 * 161 + 2 * 160


= 2816+ 144 + 2 = 2962 (in
10)

M. Suri, ELL-201, IITD, (copyright-2021) 36


Hex – Base 16

• Uses 16 different digits : 0 – 9 and A,B,C,D,E,F


• Position based representation
• Each digit corresponds to a power of 16
• Usually precedes with ‘0x’
• Right to Left the powers of 16 increase from 0 → n

Example: B9216 = 11 * 162 + 9 * 161 + 2 * 160


= 2816+ 144 + 2 = 2962 (in
10)

Did you notice the reverse compression?

M. Suri, ELL-201, IITD, (copyright-2021) 37


Hex – Base 16

• Uses 16 different digits : 0 – 9 and A,B,C,D,E,F


• Position based representation
• Each digit corresponds to a power of 16
• Usually precedes with ‘0x’
• Right to Left the powers of 16 increase from 0 → n

Example: B9216 = 11 * 162 + 9 * 161 + 2 * 160


= 2816+ 144 + 2 = 2962 (in
10)

Did you notice the reverse compression?

M. Suri, ELL-201, IITD, (copyright-2021) 38


Hex – Base 16

• Uses 16 different digits : 0 – 9 and A,B,C,D,E,F


• Position based representation
• Each digit corresponds to a power of 16
• Usually precedes with ‘0x’
• Right to Left the powers of 16 increase from 0 → n

Example: B9216 = 11 * 162 + 9 * 161 + 2 * 160


= 2816+ 144 + 2 =

M. Suri, ELL-201, IITD, (copyright-2021) 39


Hex – Base 16

• Uses 16 different digits : 0 – 9 and A,B,C,D,E,F


• Position based representation
• Each digit corresponds to a power of 16
• Usually precedes with ‘0x’
• Right to Left the powers of 16 increase from 0 → n

Example: B9216 = 11 * 162 + 9 * 161 + 2 * 160


= 2816+ 144 + 2 = 2962
(in base 10)

Did you notice the change in magnitude?

M. Suri, ELL-201, IITD, (copyright-2021) 40


Counting Chart Dec Bin Oct Hex Dec Bin Oct Hex
0 00000 16 10000
1 00001 17 10001
2 00010 18 10010
3 00011 19 10011
4 00100 20 10100
5 00101
6 00110
7 00111
8 01000
9 01001
10 01010
11 01011
12 01100
13 01101
14 01110
15 01111
M. Suri, ELL-201, IITD, (copyright-2021) 41
Counting Chart Dec Bin Oct Hex Dec Bin Oct Hex
0 00000 0 16 10000 20
1 00001 1 17 10001 21
2 00010 2 18 10010 22
3 00011 3 19 10011 23
4 00100 4 20 10100 24
5 00101 5
6 00110 6
7 00111 7
8 01000 10
9 01001 11
10 01010 12
11 01011 13
12 01100 14
13 01101 15
14 01110 16
15 01111 17
M. Suri, ELL-201, IITD, (copyright-2021) 42
Counting Chart Dec Bin Oct Hex Dec Bin Oct Hex
0 00000 0 0 16 10000 20 10
1 00001 1 1 17 10001 21 11
2 00010 2 2 18 10010 22 12
3 00011 3 3 19 10011 23 13
4 00100 4 4 20 10100 24 14
5 00101 5 5
6 00110 6 6
7 00111 7 7
8 01000 10 8

9 01001 11 9
10 01010 12 A
11 01011 13 B
12 01100 14 C
13 01101 15 D
14 01110 16 E
15 01111 17 F
M. Suri, ELL-201, IITD, (copyright-2021) 43
Counting Chart Dec Bin Oct Hex Dec Bin Oct Hex
0 00000 0 0 16 10000 20 10
1 00001 1 1 17 10001 21 11
2 00010 2 2 18 10010 22 12
3 00011 3 3 19 10011 23 13
4 00100 4 4 20 10100 24 14
5 00101 5 5
6 00110 6 6
7 00111 7 7
8 01000 10 8

9 01001 11 9
10 01010 12 A
11 01011 13 B
12 01100 14 C
13 01101 15 D
14 01110 16 E
15 01111 17 F
M. Suri, ELL-201, IITD, (copyright-2021) 44
Fractional Numbers
After the point: Left to Right negative powers of N increase from:
-1 → - n

M. Suri, ELL-201, IITD, (copyright-2021) 45


Fractional Numbers
After the point: Left to Right negative powers of N increase from:
-1 → - n

M. Suri, ELL-201, IITD, (copyright-2021) 46


Fractional Numbers
After the point: Left to Right negative powers of N increase from:
-1 → - n

M. Suri, ELL-201, IITD, (copyright-2021) 47


Fractional Numbers
After the point: Left to Right negative powers of N increase from:
-1 → - n

M. Suri, ELL-201, IITD, (copyright-2021) 48


Conversions:
Base N ➔ Decimal
1. Multiply each bit of the Base N number by its
corresponding weighting factor
2. Sum all the products to get the decimal number

M. Suri, ELL-201, IITD, (copyright-2021) 49


Conversions:
Base N ➔ Decimal
1. Multiply each bit of the Base N number by its
corresponding weighting factor
2. Sum all the products to get the decimal number

Examples:

• Bin to Dec: 1011 = 1 * 23 + 0 * 22 + 1 * 21 + 1 * 20


= 8 + 2 + 1 = 11
• Octal to Dec: 1638 = 1 * 82 + 6 * 81 + 3 * 80
= 64 + 48 + 3 = 115
• Hex to Dec: B9216 = 11 * 162 + 9 * 161 + 2 * 160
= 2816+ 144 + 2 = 2962

M. Suri, ELL-201, IITD, (copyright-2021) 50


Conversions:
Decimal ➔ Base N
1. Divide the decimal number by N; Reminder is LSB
2. If quotient = 0, conversion complete. Else, repeat
step 1 using quotient as new decimal number, new
reminder is the next MSB
Examples: Successive Division Method
• Dec to Bin: 55 ->

M. Suri, ELL-201, IITD, (copyright-2021) 51


Conversions:
Decimal ➔ Base N
1. Divide the decimal number by N; Reminder is LSB
2. If quotient = 0, conversion complete. Else, repeat
step 1 using quotient as new decimal number, new
reminder is the next MSB
Examples: Successive Division Method
• Dec to Bin: 55 ->
55/2 → (Q = 27, Rem = 1) LSB

M. Suri, ELL-201, IITD, (copyright-2021) 52


Conversions: (Decimal ➔ Base N)
Decimal ➔ Base N
1. Divide the decimal number by N; Reminder is LSB
2. If quotient = 0, conversion complete. Else, repeat
step 1 using quotient as new decimal number, new
reminder is the next MSB
Examples: Successive Division Method
• Dec to Bin: 55 ->
55/2 → (Q = 27, Rem = 1) LSB
27/2 → (Q = 13, Rem = 1)

M. Suri, ELL-201, IITD, (copyright-2021) 53


Conversions: (Decimal ➔ Base N)
Decimal ➔ Base N
1. Divide the decimal number by N; Reminder is LSB
2. If quotient = 0, conversion complete. Else, repeat
step 1 using quotient as new decimal number, new
reminder is the next MSB
Examples: Successive Division Method
• Dec to Bin: 55 ->
55/2 → (Q = 27, Rem = 1) LSB
27/2 → (Q = 13, Rem = 1)
13/2 → (Q = 6, Rem = 1)

M. Suri, ELL-201, IITD, (copyright-2021) 54


Conversions: (Decimal ➔ Base N)
Decimal ➔ Base N
1. Divide the decimal number by N; Reminder is LSB
2. If quotient = 0, conversion complete. Else, repeat
step 1 using quotient as new decimal number, new
reminder is the next MSB
Examples: Successive Division Method
• Dec to Bin: 55 ->
55/2 → (Q = 27, Rem = 1) LSB
27/2 → (Q = 13, Rem = 1)
13/2 → (Q = 6, Rem = 1)
6/2 → (Q = 3, Rem = 0)

M. Suri, ELL-201, IITD, (copyright-2021) 55


Conversions: (Decimal ➔ Base N)
Decimal ➔ Base N
1. Divide the decimal number by N; Reminder is LSB
2. If quotient = 0, conversion complete. Else, repeat
step 1 using quotient as new decimal number, new
reminder is the next MSB
Examples: Successive Division Method
• Dec to Bin: 55 ->
55/2 → (Q = 27, Rem = 1) LSB
27/2 → (Q = 13, Rem = 1)
13/2 → (Q = 6, Rem = 1)
6/2 → (Q = 3, Rem = 0)
3/2 → (Q = 1, Rem = 1)

M. Suri, ELL-201, IITD, (copyright-2021) 56


Conversions: (Decimal ➔ Base N)
Decimal ➔ Base N
1. Divide the decimal number by N; Reminder is LSB
2. If quotient = 0, conversion complete. Else, repeat
step 1 using quotient as new decimal number, new
reminder is the next MSB
Examples: Successive Division Method
• Dec to Bin: 55 ->
55/2 → (Q = 27, Rem = 1) LSB
27/2 → (Q = 13, Rem = 1)
13/2 → (Q = 6, Rem = 1)
6/2 → (Q = 3, Rem = 0)
3/2 → (Q = 1, Rem = 1)
1/2 → (Q = 0, Rem = 1) MSB

M. Suri, ELL-201, IITD, (copyright-2021) 57


Conversions: (Decimal ➔ Base N)
Decimal ➔ Base N
1. Divide the decimal number by N; Reminder is LSB
2. If quotient = 0, conversion complete. Else, repeat
step 1 using quotient as new decimal number, new
reminder is the next MSB
Examples: Successive Division Method
• Dec to Bin: 55 ->
55/2 → (Q = 27, Rem = 1) LSB
27/2 → (Q = 13, Rem = 1)
13/2 → (Q = 6, Rem = 1)
6/2 → (Q = 3, Rem = 0)
5510 = 1101112
3/2 → (Q = 1, Rem = 1)
1/2 → (Q = 0, Rem = 1) MSB

M. Suri, ELL-201, IITD, (copyright-2021) 58


Conversions: (Decimal ➔ Octal)
Examples: Successive Division Method
• Dec to Oct: 55 ->
55/8 → (Q = 6, Rem = 7) LSB
6/8 → (Q = 0, Rem = 6) MSB

5510 = 678

M. Suri, ELL-201, IITD, (copyright-2021) 59


Conversions: (Decimal ➔ Octal)
Examples: Successive Division Method
• Dec to Oct: 55 ->
55/8 → (Q = 6, Rem = 7) LSB
6/8 → (Q = 0, Rem = 6) MSB

5510 = 678

M. Suri, ELL-201, IITD, (copyright-2021) 60


Conversions: (Decimal ➔ Octal)
Examples: Successive Division Method
• Dec to Oct: 55 ->
55/8 → (Q = 6, Rem = 7) LSB
6/8 → (Q = 0, Rem = 6) MSB

5510 = 678

M. Suri, ELL-201, IITD, (copyright-2021) 61


Conversions: (Decimal ➔ Octal)
Examples: Successive Division Method
• Dec to Oct: 55 ->
55/8 → (Q = 6, Rem = 7) LSB
6/8 → (Q = 0, Rem = 6) MSB

5510 = 678

M. Suri, ELL-201, IITD, (copyright-2021) 62


Conversions: (Decimal ➔ Hex)
Examples: Successive Division Method
• Dec to Hex: 55 ->
55/16 → (Q = 3, Rem = 7) LSB
3/16 → (Q = 0, Rem = 3) MSB

5510 = 3716

M. Suri, ELL-201, IITD, (copyright-2021) 63


Conversions: (Decimal ➔ Hex)
Examples: Successive Division Method
• Dec to Hex: 55 ->
55/16 → (Q = 3, Rem = 7) LSB
3/16 → (Q = 0, Rem = 3) MSB

5510 = 3716

M. Suri, ELL-201, IITD, (copyright-2021) 64


Conversions: (Decimal ➔ Hex)
Examples: Successive Division Method
• Dec to Hex: 55 ->
55/16 → (Q = 3, Rem = 7) LSB
3/16 → (Q = 0, Rem = 3) MSB

5510 = 3716

M. Suri, ELL-201, IITD, (copyright-2021) 65


Conversions: (Decimal ➔ Hex)
Examples: Successive Division Method
• Dec to Hex: 55 ->
55/16 → (Q = 3, Rem = 7) LSB
3/16 → (Q = 0, Rem = 3) MSB

5510 = 3716

M. Suri, ELL-201, IITD, (copyright-2021) 66


Conversions: (Oct ➔ Hex ➔Bin)
• Regular method: Use Intermediate stop as Decimal

• Ex: 678 = (??)16 == (??) 2

• Step 1: Using position-based summing → 678 = 5510


• 5510 can now be converted to any system through successive
division method

Shortcuts Methods:
Binary → Octal :
1. Make Groups of 3 starting from LSB
2. For each group write it’s Octal equivalent
Binary → Hex : Groups of 4 instead of 3

M. Suri, ELL-201, IITD, (copyright-2021) 67


Shortcut Substitution Method

Convert: 010101101010111001101010 to Octal

M. Suri, ELL-201, IITD, (copyright-2021) 68


Shortcut Substitution Method

Convert: 010101101010111001101010 to Octal

M. Suri, ELL-201, IITD, (copyright-2021) 69


Shortcut Substitution Method

Convert: 010101101010111001101010 to Octal

M. Suri, ELL-201, IITD, (copyright-2021) 70


Shortcut Substitution Method

Convert: 010101101010111001101010 to Octal

M. Suri, ELL-201, IITD, (copyright-2021) 71


M. Suri, ELL-201, IITD, (copyright-2021) 72
M. Suri, ELL-201, IITD, (copyright-2021) 73
M. Suri, ELL-201, IITD, (copyright-2021) 74
M. Suri, ELL-201, IITD, (copyright-2021) 75
M. Suri, ELL-201, IITD, (copyright-2021) 76
Fractional Numbers (Base N → Decimal)

After the point: Left to Right negative powers of N increase from:


-1 → - n

M. Suri, ELL-201, IITD, (copyright-2021) 77


Fractional Numbers (Decimal → Binary)
Step 1: Multiply the decimal fraction by 2, the whole number part of the result forms
the first binary digit to the right of the point

Step 2: Disregard the whole number part of previous result and multiply once again by
2. The whole number part of the new result is the 2nd binary digit of the fraction, right
to the point.

Continue steps 1 and 2 till the decimal part becomes 0 or you see an infinite recurring
pattern.

M. Suri, ELL-201, IITD, (copyright-2021) 78


Fractional Numbers -2 (Decimal → Binary)
Step 1: Multiply the decimal fraction by 2, the whole number part of the result forms
the first binary digit to the right of the point

Step 2: Disregard the whole number part of previous result and multiply once again by
2. The whole number part of the new result is the 2nd binary digit of the fraction, right
to the point.

Continue steps 1 and 2 till the decimal part becomes 0 or you see an infinite recurring
pattern.

Ex- 0.625 → 0.625 * 2 = 1.25 → 1 becomes first binary digit after the point
→ 0.25 * 2 = 0.50 → 0 becomes the 2nd binary digit representing the fraction
→ 0.50 * 2 = 1.00 → 1 becomes the 3rd and last binary digit for this fraction

(.625)10 = (.101)2

M. Suri, ELL-201, IITD, (copyright-2021) 79


Fractional Numbers -2 (Decimal → Binary)
Step 1: Multiply the decimal fraction by 2, the whole number part of the result forms
the first binary digit to the right of the point

Step 2: Disregard the whole number part of previous result and multiply once again by
2. The whole number part of the new result is the 2nd binary digit of the fraction, right
to the point.

Continue steps 1 and 2 till the decimal part becomes 0 or you see an infinite recurring
pattern.

Ex- 0.625 → 0.625 * 2 = 1.25 → 1 becomes first binary digit after the point
→ 0.25 * 2 = 0.50 → 0 becomes the 2nd binary digit representing the fraction
→ 0.50 * 2 = 1.00 → 1 becomes the 3rd and last binary digit for this fraction

(.625)10 = (.101)2

M. Suri, ELL-201, IITD, (copyright-2021) 80


Fractional Numbers -2 (Decimal → Binary)
Step 1: Multiply the decimal fraction by 2, the whole number part of the result forms
the first binary digit to the right of the point

Step 2: Disregard the whole number part of previous result and multiply once again by
2. The whole number part of the new result is the 2nd binary digit of the fraction, right
to the point.

Continue steps 1 and 2 till the decimal part becomes 0 or you see an infinite recurring
pattern.

Ex- 0.625 → 0.625 * 2 = 1.25 → 1 becomes first binary digit after the point
→ 0.25 * 2 = 0.50 → 0 becomes the 2nd binary digit representing the fraction
→ 0.50 * 2 = 1.00 → 1 becomes the 3rd and last binary digit for this fraction

(.625)10 = (.101)2

M. Suri, ELL-201, IITD, (copyright-2021) 81


Fractional Numbers -2 (Decimal → Binary)
Step 1: Multiply the decimal fraction by 2, the whole number part of the result forms
the first binary digit to the right of the point

Step 2: Disregard the whole number part of previous result and multiply once again by
2. The whole number part of the new result is the 2nd binary digit of the fraction, right
to the point.

Continue steps 1 and 2 till the decimal part becomes 0 or you see an infinite recurring
pattern.

Ex- 0.625 → 0.625 * 2 = 1.25 → 1 becomes first binary digit after the point
→ 0.25 * 2 = 0.50 → 0 becomes the 2nd binary digit representing the fraction
→ 0.50 * 2 = 1.00 → 1 becomes the 3rd and last binary digit for this fraction

(.625)10 = (.101)2

M. Suri, ELL-201, IITD, (copyright-2021) 82


Fractional Numbers -2 (Decimal → Binary)
Step 1: Multiply the decimal fraction by 2, the whole number part of the result forms
the first binary digit to the right of the point

Step 2: Disregard the whole number part of previous result and multiply once again by
2. The whole number part of the new result is the 2nd binary digit of the fraction, right
to the point.

Continue steps 1 and 2 till the decimal part becomes 0 or you see an infinite recurring
pattern.

Ex- 0.625 → 0.625 * 2 = 1.25 → 1 becomes first binary digit after the point
→ 0.25 * 2 = 0.50 → 0 becomes the 2nd binary digit representing the fraction
→ 0.50 * 2 = 1.00 → 1 becomes the 3rd and last binary digit for this fraction

(.625)10 = (.101)2

M. Suri, ELL-201, IITD, (copyright-2021) 83


Fractional Numbers -2 (Decimal → Binary)
Step 1: Multiply the decimal fraction by 2, the whole number part of the result forms
the first binary digit to the right of the point

Step 2: Disregard the whole number part of previous result and multiply once again by
2. The whole number part of the new result is the 2nd binary digit of the fraction, right
to the point.

Continue steps 1 and 2 till the decimal part becomes 0 or you see an infinite recurring
pattern.

Ex- 0.625 → 0.625 * 2 = 1.25 → 1 becomes first binary digit after the point
→ 0.25 * 2 = 0.50 → 0 becomes the 2nd binary digit representing the fraction
→ 0.50 * 2 = 1.00 → 1 becomes the 3rd and last binary digit for this fraction

(.625)10 = (.101)2

M. Suri, ELL-201, IITD, (copyright-2021) 84


Fractional Numbers -2 (Decimal → Binary)
Step 1: Multiply the decimal fraction by 2, the whole number part of the result forms
the first binary digit to the right of the point

Step 2: Disregard the whole number part of previous result and multiply once again by
2. The whole number part of the new result is the 2nd binary digit of the fraction, right
to the point.

Continue steps 1 and 2 till the decimal part becomes 0 or you see an infinite recurring
pattern.

Ex- 0.625 → 0.625 * 2 = 1.25 → 1 becomes first binary digit after the point
→ 0.25 * 2 = 0.50 → 0 becomes the 2nd binary digit representing the fraction
→ 0.50 * 2 = 1.00 → 1 becomes the 3rd and last binary digit for this fraction

(.625)10 = (.101)2

M. Suri, ELL-201, IITD, (copyright-2021) 85


Fractional Numbers -2 (Decimal → Binary)
Ex- (0.1)10 = (??)2

M. Suri, ELL-201, IITD, (copyright-2021) 86


Thank you

M. Suri, ELL-201, IITD, (copyright-2021) 87

You might also like