SlideShare a Scribd company logo
Introduction to Number System and
Logic Gates
Number Systems
What is a number system?
A system for representing numbers
Each number system has a base, which is the
number of digits used to represent numbers
Types of number systems:
Decimal
Binary
Octal
Hexadecimal
Decimal number system:
Base 10
Uses the digits 0-9
The most common number system used
in the world
Binary number system:
Base 2
Uses the digits 0 and 1
Used in computers and digital electronics
Octal number system:
Base 8
Uses the digits 0-7
A convenient way to represent binary
numbers
Hexadecimal number system:
Base 16
Uses the digits 0-9 and A-F
A convenient way to represent binary
numbers in a shorter form
Converting between number
systems:
There are a number of ways to convert
between number systems
The most common method is to use the
place value table
Place value table:
A table that shows the value of each digit in
a number system
The place value table can be used to convert
a number from one system to another
Gray codes
• Gray codes are named
after Frank Gray, who
invented them in 1953.
• Gray codes are also
known as reflected
binary codes
Decimal Number Binary Number Gray Code
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000
Gray code using K
map
Gray codes have many applications in
digital circuits and systems.
Encoders and decoders: Gray codes are often used in encoders and decoders, which are devices that
convert between analog and digital signals.
Analog-to-digital converters (ADCs): ADCs use Gray codes to reduce the effects of noise on the
conversion process.
Digital logic: Gray codes are often used in digital logic circuits, because they can simplify the design of
circuits that count or compare numbers.
Position sensors: Gray codes are often used in position sensors, such as shaft encoders and disk drive
heads.
Karnaugh maps: Gray codes are often used in Karnaugh maps, which are a graphical technique used
for simplifying Boolean expressions.
Excess-3
Excess-3 code is a non-weighted and self-complementary binary-coded
decimal (BCD) code and numeral system.
In excess-3 code, numbers are represented as decimal digits, and each
digit is represented by four bits as the digit value plus 3 (the "excess"
amount):
For example, the excess-3 code for the decimal number 5 is 1000, which is
3 + 5 = 8 in binary.
Excess-3 code is often used in digital
circuits and systems
Arithmetic operations: Excess-3 code is often used in arithmetic operations in
digital circuits. This is because it is self-complementary and non-weighted, which
makes it easy to implement arithmetic operations.
Error detection: Excess-3 code is often used in error detection in digital circuits.
This is because it has a good error detection capability.
Interfacing with electromechanical devices: Excess-3 code is often used to
interface with electromechanical devices, such as stepper motors and rotary
encoders. This is because it is less susceptible to noise than other BCD codes.
ASCII
• ASCII stands for American Standard Code for
Information Interchange.
• It is a character encoding standard for electronic
communication.
• ASCII codes represent text in computers,
telecommunications equipment, and other devices.
• ASCII uses a 7-bit code to represent characters.
• The first 32 codes are control codes, which are used
for things like carriage return, line feed, and bell
• The remaining 128 codes represent printable
characters, including the digits 0-9, the letters A-Z,
and punctuation marks.
Parity –ODD, EVEN
Parity is a simple form of error
detecting code. It is used to
check whether the bits in a
binary number have been
transmitted correctly.
There are two types of parity:
even parity and odd parity.
In even parity, the number of 1
bits in the binary number must
be even.
In odd parity, the number of 1
bits in the binary number must
be odd.
To check the parity of a
binary number, you can
use the following steps:
1.Count the number of 1 bits in
the binary number.
2.If the number of 1 bits is even,
then the parity is even.
3.If the number of 1 bits is odd,
then the parity is odd.
Binary Arithmatics
Single Bit
Addition with
Carry
Multiple Bit
Addition
Single Bit
Subtraction
with Borrow
Multiple Bit
Subtraction
Multiplication BCD Addition
Single Bit Binary Addition
Multiple Bit Binary Addition
Carries 0 0
Augend 01100 10110
Addend +10001 +10111
Sum
Single Bit Binary Subtraction with Borrow
Multiple Bit Binary Subtraction
• Extending this to two multiple bit examples:
Borrows 0 0
Minuend 10110 10110
Subtrahend - 10010 - 10011
Difference
• Notes: The 0 is a Borrow-In to the least significant bit. If the
Subtrahend > the Minuend, interchange and append a – to the
result.
Chapter 1 18
Binary Multiplication
The binary multiplication table is simple:
0  0 = 0 | 1  0 = 0 | 0  1 = 0 | 1  1 = 1
Extending multiplication to multiple digits:
Multiplicand 1011
Multiplier x 101
Partial Products 1011
0000 -
1011 - -
Product 110111
BCD Addition
Example - 1
21CSS201T-COA 19
Rule: If there is an illegal code or carry is generated as a result
of addition, then add 0110 to particular that 4 bits of
result.
BCD Addition
Example - 2
21CSS201T-COA 20
BCD Subtraction
Example - 2
21CSS201T-COA 21
unit 1 introudction of the file and sepm
BCD Subtraction
Example - 1
21CSS201T-COA 23
Rule: If one 4-bit group needs to take borrow from neighbor, then
subtract 0110 from the group which is receiving borrow.
Logic Gates
• All digital computers for the past 50
years have been constructed using
the same type of components.
• These components are called logic
gates.
• Logic gates have been implemented
in many different ways.
• Currently, logic gates are most
commonly implemented using
electronic VLSI transistor logic.
24
Logic Gates
All basic logic gates have the ability to accept either one or two input signals (depending upon the type of gate) and generate one output signal.
25
Classification
26
Basic Logic Gates-
• Basic Logic Gates are the fundamental logic gates
using which universal logic gates and other logic
gates are constructed.
They have the following properties-
• Basic logic gates are associative in nature.
• Basic logic gates are commutative in nature.
There are following three basic logic gates-
1. AND Gate
2. OR Gate
3. NOT Gate
27
AND gate
• The output of AND gate is high (‘1’) if all of its inputs
are high (‘1’).
• The output of AND gate is low (‘0’) if any one of its
inputs is low (‘0’).
OR Gate
• The output of OR gate is high (‘1’) if any one of its
inputs is high (‘1’).
• The output of OR gate is low (‘0’) if all of its inputs are
low (‘0’).
NOT Gate
• The output of NOT gate is high (‘1’) if its input is low (‘0’).
• The output of NOT gate is low (‘0’) if its input is high (‘1’).
• From here-
• It is clear that NOT gate simply inverts the given input.
• Since NOT gate simply inverts the given input, therefore it is also
known as Inverter Gate.
Universal Logic Gates
• Universal logic gates are the logic gates that are
capable of implementing any Boolean function
without requiring any other type of gate.
• They are called as “Universal Gates” because-
• They can realize all the binary operations.
• All the basic logic gates can be derived from
them.
• They have the following properties-
• Universal gates are not associative in nature.
• Universal gates are commutative in nature.
NOR Gate
• A NOR Gate is constructed by connecting a NOT Gate at
the output terminal of the OR Gate.
• The output of OR gate is high (‘1’) if all of its inputs are
low (‘0’).
• The output of OR gate is low (‘0’) if any of its inputs is
high (‘1’).
EX-OR & EX-
NOR Gates
One of the inputs of alternative gate will have a bubble
(which represents NOT gate).
For EX-OR structured original gate, alternative gate will be
EX-NOR structured.
For EX-NOR structured original gate, alternative gate will
be EX-OR structured.
If bubble is present at the output of original gate, then no
bubble will be present at the output of alternative gate.
If bubble is not present at the output of original gate, then
a bubble will be present at the output of alternative gate.

More Related Content

PPTX
Digital electronica RSS vvvdmsASmCMmmmmmcdsdvfssc
PPTX
Digital Electronics - Logic Gates Lectures-2.pptx
PDF
Number System & Logic Gate
PPTX
Chapter_Three.pptx of digital component design
PPTX
11 cs unit 1 one shot_240427_202128 (2) (6).pptx
PPTX
Digital Logic BCA TU Chapter 2.2
PDF
Combinational circuits
PPTX
BEEE - Part B - Unit 3 - Digital Electronics PPT.pptx
Digital electronica RSS vvvdmsASmCMmmmmmcdsdvfssc
Digital Electronics - Logic Gates Lectures-2.pptx
Number System & Logic Gate
Chapter_Three.pptx of digital component design
11 cs unit 1 one shot_240427_202128 (2) (6).pptx
Digital Logic BCA TU Chapter 2.2
Combinational circuits
BEEE - Part B - Unit 3 - Digital Electronics PPT.pptx

Similar to unit 1 introudction of the file and sepm (20)

PPTX
digital electronics conversion of number stystem in digital electronics
PPTX
UNIVERSAL PROPERTY.pptx
PPT
BEEE - Part B - Unit 3 PPT.ppt DL&CO - Unit 1 PPT.ppt
PPTX
DE and LD [Autosave gyideffgfd] (1).pptx
PPTX
Notes Computer Organization and Architecture
PPTX
Module 1- basics of Digital Electronics .pptx
PPT
digital___electronics___EXPLAINATION.ppt
PPSX
Coa presentation1
PDF
Number system
PPTX
Binary and EC codes
PPT
3F4ecc.ppt
PDF
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
PPTX
boolean-logic.pptx
PPT
3F4ecc.ppten cje cen cne cdn en c e cnec cen
PDF
ECAD lab manual
PDF
Lecture 8 Decoders & Encoders (combinational circuits)
DOCX
HexaDecimal-Number-Syatem-Use.-from-computer-science-subject-code-2210.docx
PPT
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
PPT
STLD-Combinational logic design
PPTX
digital-electronics lecture Ch 1and 2 -1.pptx
digital electronics conversion of number stystem in digital electronics
UNIVERSAL PROPERTY.pptx
BEEE - Part B - Unit 3 PPT.ppt DL&CO - Unit 1 PPT.ppt
DE and LD [Autosave gyideffgfd] (1).pptx
Notes Computer Organization and Architecture
Module 1- basics of Digital Electronics .pptx
digital___electronics___EXPLAINATION.ppt
Coa presentation1
Number system
Binary and EC codes
3F4ecc.ppt
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
boolean-logic.pptx
3F4ecc.ppten cje cen cne cdn en c e cnec cen
ECAD lab manual
Lecture 8 Decoders & Encoders (combinational circuits)
HexaDecimal-Number-Syatem-Use.-from-computer-science-subject-code-2210.docx
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
STLD-Combinational logic design
digital-electronics lecture Ch 1and 2 -1.pptx
Ad

Recently uploaded (20)

PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Digital Logic Computer Design lecture notes
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPT
Mechanical Engineering MATERIALS Selection
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPT
Project quality management in manufacturing
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
web development for engineering and engineering
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Construction Project Organization Group 2.pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
PPT on Performance Review to get promotions
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
UNIT 4 Total Quality Management .pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Digital Logic Computer Design lecture notes
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Mechanical Engineering MATERIALS Selection
Model Code of Practice - Construction Work - 21102022 .pdf
Project quality management in manufacturing
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Geodesy 1.pptx...............................................
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
web development for engineering and engineering
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Construction Project Organization Group 2.pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPT on Performance Review to get promotions
Ad

unit 1 introudction of the file and sepm

  • 1. Introduction to Number System and Logic Gates
  • 2. Number Systems What is a number system? A system for representing numbers Each number system has a base, which is the number of digits used to represent numbers Types of number systems: Decimal Binary Octal Hexadecimal
  • 3. Decimal number system: Base 10 Uses the digits 0-9 The most common number system used in the world Binary number system: Base 2 Uses the digits 0 and 1 Used in computers and digital electronics Octal number system: Base 8 Uses the digits 0-7 A convenient way to represent binary numbers Hexadecimal number system: Base 16 Uses the digits 0-9 and A-F A convenient way to represent binary numbers in a shorter form
  • 4. Converting between number systems: There are a number of ways to convert between number systems The most common method is to use the place value table Place value table: A table that shows the value of each digit in a number system The place value table can be used to convert a number from one system to another
  • 5. Gray codes • Gray codes are named after Frank Gray, who invented them in 1953. • Gray codes are also known as reflected binary codes Decimal Number Binary Number Gray Code 0 0000 0000 1 0001 0001 2 0010 0011 3 0011 0010 4 0100 0110 5 0101 0111 6 0110 0101 7 0111 0100 8 1000 1100 9 1001 1101 10 1010 1111 11 1011 1110 12 1100 1010 13 1101 1011 14 1110 1001 15 1111 1000
  • 7. Gray codes have many applications in digital circuits and systems. Encoders and decoders: Gray codes are often used in encoders and decoders, which are devices that convert between analog and digital signals. Analog-to-digital converters (ADCs): ADCs use Gray codes to reduce the effects of noise on the conversion process. Digital logic: Gray codes are often used in digital logic circuits, because they can simplify the design of circuits that count or compare numbers. Position sensors: Gray codes are often used in position sensors, such as shaft encoders and disk drive heads. Karnaugh maps: Gray codes are often used in Karnaugh maps, which are a graphical technique used for simplifying Boolean expressions.
  • 8. Excess-3 Excess-3 code is a non-weighted and self-complementary binary-coded decimal (BCD) code and numeral system. In excess-3 code, numbers are represented as decimal digits, and each digit is represented by four bits as the digit value plus 3 (the "excess" amount): For example, the excess-3 code for the decimal number 5 is 1000, which is 3 + 5 = 8 in binary.
  • 9. Excess-3 code is often used in digital circuits and systems Arithmetic operations: Excess-3 code is often used in arithmetic operations in digital circuits. This is because it is self-complementary and non-weighted, which makes it easy to implement arithmetic operations. Error detection: Excess-3 code is often used in error detection in digital circuits. This is because it has a good error detection capability. Interfacing with electromechanical devices: Excess-3 code is often used to interface with electromechanical devices, such as stepper motors and rotary encoders. This is because it is less susceptible to noise than other BCD codes.
  • 10. ASCII • ASCII stands for American Standard Code for Information Interchange. • It is a character encoding standard for electronic communication. • ASCII codes represent text in computers, telecommunications equipment, and other devices. • ASCII uses a 7-bit code to represent characters. • The first 32 codes are control codes, which are used for things like carriage return, line feed, and bell • The remaining 128 codes represent printable characters, including the digits 0-9, the letters A-Z, and punctuation marks.
  • 11. Parity –ODD, EVEN Parity is a simple form of error detecting code. It is used to check whether the bits in a binary number have been transmitted correctly. There are two types of parity: even parity and odd parity. In even parity, the number of 1 bits in the binary number must be even. In odd parity, the number of 1 bits in the binary number must be odd.
  • 12. To check the parity of a binary number, you can use the following steps: 1.Count the number of 1 bits in the binary number. 2.If the number of 1 bits is even, then the parity is even. 3.If the number of 1 bits is odd, then the parity is odd.
  • 13. Binary Arithmatics Single Bit Addition with Carry Multiple Bit Addition Single Bit Subtraction with Borrow Multiple Bit Subtraction Multiplication BCD Addition
  • 14. Single Bit Binary Addition
  • 15. Multiple Bit Binary Addition Carries 0 0 Augend 01100 10110 Addend +10001 +10111 Sum
  • 16. Single Bit Binary Subtraction with Borrow
  • 17. Multiple Bit Binary Subtraction • Extending this to two multiple bit examples: Borrows 0 0 Minuend 10110 10110 Subtrahend - 10010 - 10011 Difference • Notes: The 0 is a Borrow-In to the least significant bit. If the Subtrahend > the Minuend, interchange and append a – to the result.
  • 18. Chapter 1 18 Binary Multiplication The binary multiplication table is simple: 0  0 = 0 | 1  0 = 0 | 0  1 = 0 | 1  1 = 1 Extending multiplication to multiple digits: Multiplicand 1011 Multiplier x 101 Partial Products 1011 0000 - 1011 - - Product 110111
  • 19. BCD Addition Example - 1 21CSS201T-COA 19 Rule: If there is an illegal code or carry is generated as a result of addition, then add 0110 to particular that 4 bits of result.
  • 20. BCD Addition Example - 2 21CSS201T-COA 20
  • 21. BCD Subtraction Example - 2 21CSS201T-COA 21
  • 23. BCD Subtraction Example - 1 21CSS201T-COA 23 Rule: If one 4-bit group needs to take borrow from neighbor, then subtract 0110 from the group which is receiving borrow.
  • 24. Logic Gates • All digital computers for the past 50 years have been constructed using the same type of components. • These components are called logic gates. • Logic gates have been implemented in many different ways. • Currently, logic gates are most commonly implemented using electronic VLSI transistor logic. 24
  • 25. Logic Gates All basic logic gates have the ability to accept either one or two input signals (depending upon the type of gate) and generate one output signal. 25
  • 27. Basic Logic Gates- • Basic Logic Gates are the fundamental logic gates using which universal logic gates and other logic gates are constructed. They have the following properties- • Basic logic gates are associative in nature. • Basic logic gates are commutative in nature. There are following three basic logic gates- 1. AND Gate 2. OR Gate 3. NOT Gate 27
  • 28. AND gate • The output of AND gate is high (‘1’) if all of its inputs are high (‘1’). • The output of AND gate is low (‘0’) if any one of its inputs is low (‘0’).
  • 29. OR Gate • The output of OR gate is high (‘1’) if any one of its inputs is high (‘1’). • The output of OR gate is low (‘0’) if all of its inputs are low (‘0’).
  • 30. NOT Gate • The output of NOT gate is high (‘1’) if its input is low (‘0’). • The output of NOT gate is low (‘0’) if its input is high (‘1’). • From here- • It is clear that NOT gate simply inverts the given input. • Since NOT gate simply inverts the given input, therefore it is also known as Inverter Gate.
  • 31. Universal Logic Gates • Universal logic gates are the logic gates that are capable of implementing any Boolean function without requiring any other type of gate. • They are called as “Universal Gates” because- • They can realize all the binary operations. • All the basic logic gates can be derived from them. • They have the following properties- • Universal gates are not associative in nature. • Universal gates are commutative in nature.
  • 32. NOR Gate • A NOR Gate is constructed by connecting a NOT Gate at the output terminal of the OR Gate. • The output of OR gate is high (‘1’) if all of its inputs are low (‘0’). • The output of OR gate is low (‘0’) if any of its inputs is high (‘1’).
  • 33. EX-OR & EX- NOR Gates One of the inputs of alternative gate will have a bubble (which represents NOT gate). For EX-OR structured original gate, alternative gate will be EX-NOR structured. For EX-NOR structured original gate, alternative gate will be EX-OR structured. If bubble is present at the output of original gate, then no bubble will be present at the output of alternative gate. If bubble is not present at the output of original gate, then a bubble will be present at the output of alternative gate.