SlideShare a Scribd company logo
DIGITAL
LO
GIC
FUN
DAM
EN
TALS
Part – I (N
um
ber System
&
Code)
V
EERA
N
A
N
V
EERA
N
A
N
A
SSISTA
N
T
PRO
FESSO
R
IN
IN
FO
RM
A
TIO
N
TECH
N
O
LO
G
Y
A
SSISTA
N
T
PRO
FESSO
R
IN
IN
FO
RM
A
TIO
N
TECH
N
O
LO
G
Y
D
EPA
RTM
EN
T
O
F
IN
FO
RM
A
TIO
N
TECH
N
O
LO
G
Y
D
EPA
RTM
EN
T
O
F
IN
FO
RM
A
TIO
N
TECH
N
O
LO
G
Y
P.K
.N
. A
RTS
A
N
D
SCIEN
CE
CO
LLEG
E
P.K
.N
. A
RTS
A
N
D
SCIEN
CE
CO
LLEG
E
TIRU
M
A
N
G
A
LA
M
TIRU
M
A
N
G
A
LA
M
M
A
D
U
RA
I
M
A
D
U
RA
I
NUMBER SYSTEMS
 A number system is a way of representing numbers using symbols (digits)
and a base (radix).
 Types of Number Systems
System Base Digits Used Example
Binary 2 0, 1 (1011) = 11
₂
Octal 8 0 – 7 (745) = 485
₈
Decimal 10 0 – 9 (253) = 253
₁₀
Hex 16 0 – 9, A – F (2F) = 47
₁₆
REASON FOR USING BINARY IN DIGITAL COMPUTERS
 Two-State Devices: Digital components like transistors, switches, and magnetic storage naturally operate
in only two stable states (e.g., ON/OFF, High/Low, Saturated/Cutoff).
 Noise Immunity: Two distinct states (0 and 1) make signals less prone to error due to noise or signal
degradation.
 Simplicity in Circuit Design: Using only two states simplifies logic circuit design, enabling the use of
logic gates (AND, OR, NOT).
 Reliable Storage: Data storage (e.g., in magnetic tape, punched cards, memory cells) easily maps to two
states (hole/no hole, magnetized/non-magnetized).
 Universal Representation: Any numeric, character, or symbolic information can be encoded into binary
format for processing and storage.
CONCLUSION
 Binary is chosen because it aligns perfectly with the physical behavior of electronic components,
ensuring simplicity, reliability, and cost-effectiveness in computing systems.
BASE CONVERSIONS
A. Decimal → Any Base
Divide repeatedly by base, note remainders, reverse order.
Example: 43 → Binary → (101011)₂
ANY BASE DECIMAL
→
 Multiply each digit by positional weight.
 Example: (1101)₂
= 1×2³ + 1×2² + 0×2¹ + 1×2 = 13
⁰
BINARY OCTAL
↔
 Group bits in 3 from right.
 Example: (101011) = (53)
₂ ₈
BINARY HEXADECIMAL
↔
 Group bits in 4 from right.
 Example: (10101111) = (AF)
₂ ₁₆
HEXADECIMAL TO DECIMAL CONVERSION
EXAMPLES
EXAMPLES (CONT.)
BINARY CODES
A. BCD (Binary Coded Decimal)
Each decimal digit represented using 4 bits.
Example: 59 → (0101 1001)
B. ASCII
American Standard Code for Information Interchange
7-bit code representing English letters and symbols.
Example: 'A' → 65 → (1000001)₂
C. EBCDIC
Extended Binary Coded Decimal Interchange Code (8-bit, used in IBM mainframes).
D. Unicode
Supports multiple languages (8 to 32 bits).
E. Gray Code
Successive values differ in only one bit (reduces errors).
Decimal Binary Gray
0 000 000
1 001 001
2 010 011
3 011 010
Example Table
CODE CONVERSION SHORTCUTS
A. Binary → Gray Code
 First bit same, next bits = XOR of consecutive binary bits.
 Example: Binary 1011 → Gray 1110
B. Gray → Binary
 First bit same, next bits = XOR(previous binary bit, current Gray bit).
 Example: Gray 1110 → Binary 1011
C. Binary ↔ Hex
 Group 4 bits for hex conversion.
D. Binary ↔ Octal
 Group 3 bits for octal conversion.
COMPLEMENTS
 1’s Complement: Invert all bits.
 Example: 1010 → 0101
 2’s Complement: 1’s complement + 1.
 Example: 1010 → 0101+1 = 0110
 Use: Subtraction: A – B = A + (2’s complement of B)
EXAMPLES
QUESTIONS
Short Answer Questions
1. What are the different types of number systems?
2. What is the advantage of using binary number system?
3. How do you perform addition and subtraction using 1’s and
2’s complement? Illustrate with examples.
4. Convert the following numbers to their binary equivalents:
(a) 37 (b) 14 (c) 167 (d) 72.45
5. Convert the following decimal numbers to equivalent binary
numbers:
(a) 43 (b) 64 (c) 4096 (d) 0.375
Long Answer Questions
1. Convert the following from binary to octal:
(a) 101101 (b) 101101110 (c) 10110111 (d) 11010.011
2. Convert the following from decimal to octal and then to binary:
(a) 59 (b) 0.58 (c) 64.2 (d) 199.3
3. Convert each octal number to binary:
(a) 15 (b) 24 (c) 167 (d) 234
₈ ₈ ₈ ₈
(e) 173 (f) 157 (g) 4653 (h) 1723 (i) 2645
₈ ₈ ₈ ₈ ₈
4. Convert each hexadecimal number to binary:
(a) 49 (b) 324 (c) 649 (d) ABC
₁₆ ₁₆ ₁₆ ₁₆
5. Convert each binary number to hexadecimal:
(a) 1100110 (b) 11101111 (c) 1011110101.0111
₂ ₂ ₂
6. Convert each decimal number to hexadecimal:
(a) 16 (b) 19 (c) 35 (d) 439
₁₀ ₁₀ ₁₀ ₁₀
7. Convert the following binary numbers to octal and then to
hexadecimal:
(a) 101100110011 (b) 1011101.1011
8. Convert each hexadecimal number to decimal:
(a) 49 (b) 632 (c) 54 (d) AB0
₁₆ ₁₆ ₁₆ ₁₆

More Related Content

PPT
Number_Systems _binary_octal_hex_dec.ppt
PPT
Number_Systems decimal, binary, octal, and hexadecimal
PPT
An introduction to the different number systems
PPT
Number Systems and its effectiveness .ppt
PPT
Number_Systems_Number base conversions.ppt
PPTX
PPT
Number_Systems (2).ppt
PPTX
DLD-Introduction.pptx
Number_Systems _binary_octal_hex_dec.ppt
Number_Systems decimal, binary, octal, and hexadecimal
An introduction to the different number systems
Number Systems and its effectiveness .ppt
Number_Systems_Number base conversions.ppt
Number_Systems (2).ppt
DLD-Introduction.pptx

Similar to Digital Logic Fundamentals – Number Systems & Codes (20)

PPTX
2013 1
PPTX
Chapter 1 digital design.pptx
PPTX
digi.elec.number%20system.pptx
PPT
computer architecture
PDF
Number System and conversion in Electronics.pdf
PPTX
ADE UNIT-III (Digital Fundamentals).pptx
PPT
PPT
PPTX
21EC201– Digital Principles and system design.pptx
DOCX
POLITEKNIK MALAYSIA
PPT
Chapter 1 Digital Systems and Binary Numbers.ppt
PPT
Computers numbering systems
PPTX
Digital electronics-Introduction.pptx
PPTX
Unit 1 PDF.pptx
PPT
DL&CO - Unit 1 PPT.ppt DL&CO - Unit 1 PPT.ppt DL&CO - Unit 1 PPT.ppt
PPT
45196656565656565656565656565656565656566.ppt
PPT
Computer Number System
PPTX
01dshgdfdhfhdgfhdgfhgdjgdjgvjdgvgjfgjvfffh.pptx
PPT
Number_System and Boolean Algebra in Digital System Design
PPT
ENG241-Week1-NumberSystemsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2013 1
Chapter 1 digital design.pptx
digi.elec.number%20system.pptx
computer architecture
Number System and conversion in Electronics.pdf
ADE UNIT-III (Digital Fundamentals).pptx
21EC201– Digital Principles and system design.pptx
POLITEKNIK MALAYSIA
Chapter 1 Digital Systems and Binary Numbers.ppt
Computers numbering systems
Digital electronics-Introduction.pptx
Unit 1 PDF.pptx
DL&CO - Unit 1 PPT.ppt DL&CO - Unit 1 PPT.ppt DL&CO - Unit 1 PPT.ppt
45196656565656565656565656565656565656566.ppt
Computer Number System
01dshgdfdhfhdgfhdgfhgdjgdjgvjdgvgjfgjvfffh.pptx
Number_System and Boolean Algebra in Digital System Design
ENG241-Week1-NumberSystemsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Ad

More from CUO VEERANAN VEERANAN (20)

PPT
Cryptography - Unit I | Introduction to Security Concepts
PPT
Python Programming Unit II Control Statements.ppt
PPT
Python Programming Essentials – A Student-Friendly Approach.ppt
PPT
From Operators to Arrays – Power Up Your Python Skills for Real-World Coding!
PPT
Master Python Basics Easily – From Zero to Real-World Applications for UG Stu...
PDF
Banakacherla Project and Inter-State Water Politics in India
PPT
Overview of MS Access A Beginner's Guide to Creating and Managing Databases.ppt
PPT
HTML List, Nesting List & Hyperlinks.ppt
PPT
HTML Specific HTML tags also control font styles and colors
PPT
Introduction to Web Development Web Basics & HTML Tags
PPTX
Big Data - large Scale data (Amazon, FB)
PPTX
Fourier Transforms are indispensable tool
PPT
ENHANCING BIOLOGICAL RESEARCH THROUGH DIGITAL TECHNOLOGIES AND COMPUTATIONAL.ppt
PDF
ADS_Unit I_Route Map 2023.pdf
PPT
CS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULING
PPT
Python Unit I MCQ.ppt
PPT
GAC DS Priority Queue Presentation 2022.ppt
PPT
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
PDF
Lab 3 Python Programming Lab 8-15 MKU.pdf
PDF
Lab 3 Python Programming Lab 1-8 MKU.pdf
Cryptography - Unit I | Introduction to Security Concepts
Python Programming Unit II Control Statements.ppt
Python Programming Essentials – A Student-Friendly Approach.ppt
From Operators to Arrays – Power Up Your Python Skills for Real-World Coding!
Master Python Basics Easily – From Zero to Real-World Applications for UG Stu...
Banakacherla Project and Inter-State Water Politics in India
Overview of MS Access A Beginner's Guide to Creating and Managing Databases.ppt
HTML List, Nesting List & Hyperlinks.ppt
HTML Specific HTML tags also control font styles and colors
Introduction to Web Development Web Basics & HTML Tags
Big Data - large Scale data (Amazon, FB)
Fourier Transforms are indispensable tool
ENHANCING BIOLOGICAL RESEARCH THROUGH DIGITAL TECHNOLOGIES AND COMPUTATIONAL.ppt
ADS_Unit I_Route Map 2023.pdf
CS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULING
Python Unit I MCQ.ppt
GAC DS Priority Queue Presentation 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
Lab 3 Python Programming Lab 8-15 MKU.pdf
Lab 3 Python Programming Lab 1-8 MKU.pdf
Ad

Recently uploaded (20)

PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
master seminar digital applications in india
PPTX
Lesson notes of climatology university.
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Cell Types and Its function , kingdom of life
PDF
Classroom Observation Tools for Teachers
PDF
Computing-Curriculum for Schools in Ghana
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Pre independence Education in Inndia.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
Renaissance Architecture: A Journey from Faith to Humanism
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
master seminar digital applications in india
Lesson notes of climatology university.
Anesthesia in Laparoscopic Surgery in India
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Cell Types and Its function , kingdom of life
Classroom Observation Tools for Teachers
Computing-Curriculum for Schools in Ghana
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pre independence Education in Inndia.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Microbial diseases, their pathogenesis and prophylaxis
Microbial disease of the cardiovascular and lymphatic systems
102 student loan defaulters named and shamed – Is someone you know on the list?

Digital Logic Fundamentals – Number Systems & Codes

  • 1. DIGITAL LO GIC FUN DAM EN TALS Part – I (N um ber System & Code) V EERA N A N V EERA N A N A SSISTA N T PRO FESSO R IN IN FO RM A TIO N TECH N O LO G Y A SSISTA N T PRO FESSO R IN IN FO RM A TIO N TECH N O LO G Y D EPA RTM EN T O F IN FO RM A TIO N TECH N O LO G Y D EPA RTM EN T O F IN FO RM A TIO N TECH N O LO G Y P.K .N . A RTS A N D SCIEN CE CO LLEG E P.K .N . A RTS A N D SCIEN CE CO LLEG E TIRU M A N G A LA M TIRU M A N G A LA M M A D U RA I M A D U RA I
  • 2. NUMBER SYSTEMS  A number system is a way of representing numbers using symbols (digits) and a base (radix).  Types of Number Systems System Base Digits Used Example Binary 2 0, 1 (1011) = 11 ₂ Octal 8 0 – 7 (745) = 485 ₈ Decimal 10 0 – 9 (253) = 253 ₁₀ Hex 16 0 – 9, A – F (2F) = 47 ₁₆
  • 3. REASON FOR USING BINARY IN DIGITAL COMPUTERS  Two-State Devices: Digital components like transistors, switches, and magnetic storage naturally operate in only two stable states (e.g., ON/OFF, High/Low, Saturated/Cutoff).  Noise Immunity: Two distinct states (0 and 1) make signals less prone to error due to noise or signal degradation.  Simplicity in Circuit Design: Using only two states simplifies logic circuit design, enabling the use of logic gates (AND, OR, NOT).  Reliable Storage: Data storage (e.g., in magnetic tape, punched cards, memory cells) easily maps to two states (hole/no hole, magnetized/non-magnetized).  Universal Representation: Any numeric, character, or symbolic information can be encoded into binary format for processing and storage. CONCLUSION  Binary is chosen because it aligns perfectly with the physical behavior of electronic components, ensuring simplicity, reliability, and cost-effectiveness in computing systems.
  • 4. BASE CONVERSIONS A. Decimal → Any Base Divide repeatedly by base, note remainders, reverse order. Example: 43 → Binary → (101011)₂
  • 5. ANY BASE DECIMAL →  Multiply each digit by positional weight.  Example: (1101)₂ = 1×2³ + 1×2² + 0×2¹ + 1×2 = 13 ⁰
  • 6. BINARY OCTAL ↔  Group bits in 3 from right.  Example: (101011) = (53) ₂ ₈
  • 7. BINARY HEXADECIMAL ↔  Group bits in 4 from right.  Example: (10101111) = (AF) ₂ ₁₆
  • 11. BINARY CODES A. BCD (Binary Coded Decimal) Each decimal digit represented using 4 bits. Example: 59 → (0101 1001) B. ASCII American Standard Code for Information Interchange 7-bit code representing English letters and symbols. Example: 'A' → 65 → (1000001)₂ C. EBCDIC Extended Binary Coded Decimal Interchange Code (8-bit, used in IBM mainframes). D. Unicode Supports multiple languages (8 to 32 bits). E. Gray Code Successive values differ in only one bit (reduces errors). Decimal Binary Gray 0 000 000 1 001 001 2 010 011 3 011 010 Example Table
  • 12. CODE CONVERSION SHORTCUTS A. Binary → Gray Code  First bit same, next bits = XOR of consecutive binary bits.  Example: Binary 1011 → Gray 1110 B. Gray → Binary  First bit same, next bits = XOR(previous binary bit, current Gray bit).  Example: Gray 1110 → Binary 1011 C. Binary ↔ Hex  Group 4 bits for hex conversion. D. Binary ↔ Octal  Group 3 bits for octal conversion.
  • 13. COMPLEMENTS  1’s Complement: Invert all bits.  Example: 1010 → 0101  2’s Complement: 1’s complement + 1.  Example: 1010 → 0101+1 = 0110  Use: Subtraction: A – B = A + (2’s complement of B)
  • 15. QUESTIONS Short Answer Questions 1. What are the different types of number systems? 2. What is the advantage of using binary number system? 3. How do you perform addition and subtraction using 1’s and 2’s complement? Illustrate with examples. 4. Convert the following numbers to their binary equivalents: (a) 37 (b) 14 (c) 167 (d) 72.45 5. Convert the following decimal numbers to equivalent binary numbers: (a) 43 (b) 64 (c) 4096 (d) 0.375 Long Answer Questions 1. Convert the following from binary to octal: (a) 101101 (b) 101101110 (c) 10110111 (d) 11010.011 2. Convert the following from decimal to octal and then to binary: (a) 59 (b) 0.58 (c) 64.2 (d) 199.3 3. Convert each octal number to binary: (a) 15 (b) 24 (c) 167 (d) 234 ₈ ₈ ₈ ₈ (e) 173 (f) 157 (g) 4653 (h) 1723 (i) 2645 ₈ ₈ ₈ ₈ ₈ 4. Convert each hexadecimal number to binary: (a) 49 (b) 324 (c) 649 (d) ABC ₁₆ ₁₆ ₁₆ ₁₆ 5. Convert each binary number to hexadecimal: (a) 1100110 (b) 11101111 (c) 1011110101.0111 ₂ ₂ ₂ 6. Convert each decimal number to hexadecimal: (a) 16 (b) 19 (c) 35 (d) 439 ₁₀ ₁₀ ₁₀ ₁₀ 7. Convert the following binary numbers to octal and then to hexadecimal: (a) 101100110011 (b) 1011101.1011 8. Convert each hexadecimal number to decimal: (a) 49 (b) 632 (c) 54 (d) AB0 ₁₆ ₁₆ ₁₆ ₁₆