SlideShare a Scribd company logo
1 of 28
Download to read offline
CACS105 DIGITAL LOGIC
CHAPTER 2
Number Systems
Prepared by Praches Acharya Lalitpur Engineering College
Number Systems
Prepared by Praches Acharya Lalitpur Engineering College
Decimal Numbers
Prepared by Praches Acharya Lalitpur Engineering College
Binary numbers
• Digits: a binary digit representing a 0 or a 1.
• Binary numbers are base 2 as opposed to base 10 typically used.
•Instead of decimal places such as 1s, 10s, 100s, 1000s, etc., binary uses
powers of two to have 1s, 2s, 4s, 8s, 16s, 32s, 64s, etc.
Binary to Decimal Conversion
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Binary Codes (Coding)
Digital systems represent and manipulate not only binary
numbers, but also many other discrete elements of information.
Any discrete element of information distinct among a group of
quantities can be represented by a binary code. Binary codes play
an important role in digital computers.
1. Binary Coded Decimal (BCD)
computer uses decimals in coded form which the hardware
understands. A binary code that distinguishes among 10 elements
of decimal digits must contain at least four bits. Numerous
different binary codes can be obtained by arranging four bits into
10 distinct combinations. This is called binary-coded decimal and
is commonly referred to as BCD.
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Gray code (Reflected code)
• It is a binary coding scheme used to represent digits generated from a
mechanical sensor that may be prone to error. Used in telegraphy in the
late 1800s, and also known as "reflected binary code”. Gray code was
patented by Bell Labs researcher Frank Gray in 1947. In Gray code, there is
only one bit location different between two successive values, which makes
mechanical transitions from one digit to the next less error prone. The
following chart shows normal binary representations from 0 to 15 and the
corresponding Gray code.
• The Gray code is used in applications where the normal sequence of binary
numbers may produce an error or ambiguity during the transition from one
number to the next. If binary numbers are used, a change from 0111 to
1000 may produce an intermediate erroneous number 1001 if the
rightmost bit takes more time to change than the other three bits. The
Gray code eliminates this problem since only one bit changes in value
during any transition between two numbers.
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Gray code Contd…
Prepared by Praches Acharya Lalitpur Engineering College
Alphanumeric codes
• Alphanumeric character set is a set of elements that includes the 10
decimal digits, 26 letters of the alphabet and special characters such as $,
%, + etc. It is necessary to formulate a binary code for this set to handle
different data types. If only capital letters are included, we need a binary
code of at least six bits, and if both uppercase letters and lowercase letters
are included, we need a binary code of at least seven bits.
ASCII Code
The standard binary code for the alphanumeric characters is called ASCII
(American Standard Code for Information Interchange). It uses seven bits to
code 128 characters as shown in the table below. The seven bits of the code
are designated by B1 through B7 with B7 being the most significant bit.
Prepared by Praches Acharya Lalitpur Engineering College
Prepared by Praches Acharya Lalitpur Engineering College
Excess-3 Code (XS3)
• Excess-3, also called XS3, is a code used to express decimal numbers.
It is another important binary code. The Excess-3 code for a given
decimal number is determined by adding '3' to each decimal digit in
the given number and then replacing each digit of the newly found
decimal number by its four bit binary equivalent. For example, XS3
code of 24 is obtained as
2 4
+3 +3
-----------
5 7
0101 0111
Thus, XS3 code of 24 is 0101 0111.
Prepared by Praches Acharya Lalitpur Engineering College
For example; Let us suppose we want to determine the decimal
equivalent for the Excess-3 code 1000110. First we make group of 4 bits
starting from radix point.
Prepared by Praches Acharya Lalitpur Engineering College

More Related Content

Similar to chapter 2 part 1.pdf

Similar to chapter 2 part 1.pdf (20)

DSD.pptx
DSD.pptxDSD.pptx
DSD.pptx
 
Binary no
Binary noBinary no
Binary no
 
Quantitative Analysis 2
Quantitative Analysis 2Quantitative Analysis 2
Quantitative Analysis 2
 
data representation
 data representation data representation
data representation
 
3RD.pptx
3RD.pptx3RD.pptx
3RD.pptx
 
Digital Logic BCA TU Chapter 2.2
Digital Logic BCA TU Chapter 2.2Digital Logic BCA TU Chapter 2.2
Digital Logic BCA TU Chapter 2.2
 
Lecture 01
Lecture 01Lecture 01
Lecture 01
 
2022_ITN_Module_5.pptx
2022_ITN_Module_5.pptx2022_ITN_Module_5.pptx
2022_ITN_Module_5.pptx
 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
 
DLD-W3-L1.pptx
DLD-W3-L1.pptxDLD-W3-L1.pptx
DLD-W3-L1.pptx
 
Number-Systems presentation of the mathematics
Number-Systems presentation of the mathematicsNumber-Systems presentation of the mathematics
Number-Systems presentation of the mathematics
 
Data representation
Data representationData representation
Data representation
 
1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx
 
Number system
Number systemNumber system
Number system
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptx
 
DIGITAL DESIGN
DIGITAL DESIGNDIGITAL DESIGN
DIGITAL DESIGN
 
Learn C LANGUAGE at ASIT
Learn C LANGUAGE at ASITLearn C LANGUAGE at ASIT
Learn C LANGUAGE at ASIT
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.ppt
 
Binary codes
Binary codesBinary codes
Binary codes
 
numbering system binary and decimal hex octal
numbering system binary and decimal hex octalnumbering system binary and decimal hex octal
numbering system binary and decimal hex octal
 

More from Praches1

chapter 2 part 2.pdf
chapter 2 part 2.pdfchapter 2 part 2.pdf
chapter 2 part 2.pdfPraches1
 
09_op-amps.ppt
09_op-amps.ppt09_op-amps.ppt
09_op-amps.pptPraches1
 
08-Multiplexing.ppt
08-Multiplexing.ppt08-Multiplexing.ppt
08-Multiplexing.pptPraches1
 
04-TransmissionMedia.ppt
04-TransmissionMedia.ppt04-TransmissionMedia.ppt
04-TransmissionMedia.pptPraches1
 
03-DataTransmission.ppt
03-DataTransmission.ppt03-DataTransmission.ppt
03-DataTransmission.pptPraches1
 
microprocessor_8085_architecture.ppt
microprocessor_8085_architecture.pptmicroprocessor_8085_architecture.ppt
microprocessor_8085_architecture.pptPraches1
 

More from Praches1 (7)

chapter 2 part 2.pdf
chapter 2 part 2.pdfchapter 2 part 2.pdf
chapter 2 part 2.pdf
 
09_op-amps.ppt
09_op-amps.ppt09_op-amps.ppt
09_op-amps.ppt
 
08-Multiplexing.ppt
08-Multiplexing.ppt08-Multiplexing.ppt
08-Multiplexing.ppt
 
04-TransmissionMedia.ppt
04-TransmissionMedia.ppt04-TransmissionMedia.ppt
04-TransmissionMedia.ppt
 
03-DataTransmission.ppt
03-DataTransmission.ppt03-DataTransmission.ppt
03-DataTransmission.ppt
 
microprocessor_8085_architecture.ppt
microprocessor_8085_architecture.pptmicroprocessor_8085_architecture.ppt
microprocessor_8085_architecture.ppt
 
Chap4.ppt
Chap4.pptChap4.ppt
Chap4.ppt
 

Recently uploaded

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 

Recently uploaded (20)

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 

chapter 2 part 1.pdf

  • 1. CACS105 DIGITAL LOGIC CHAPTER 2 Number Systems Prepared by Praches Acharya Lalitpur Engineering College
  • 2. Number Systems Prepared by Praches Acharya Lalitpur Engineering College
  • 3. Decimal Numbers Prepared by Praches Acharya Lalitpur Engineering College
  • 4. Binary numbers • Digits: a binary digit representing a 0 or a 1. • Binary numbers are base 2 as opposed to base 10 typically used. •Instead of decimal places such as 1s, 10s, 100s, 1000s, etc., binary uses powers of two to have 1s, 2s, 4s, 8s, 16s, 32s, 64s, etc. Binary to Decimal Conversion Prepared by Praches Acharya Lalitpur Engineering College
  • 5. Prepared by Praches Acharya Lalitpur Engineering College
  • 6. Prepared by Praches Acharya Lalitpur Engineering College
  • 7. Prepared by Praches Acharya Lalitpur Engineering College
  • 8. Prepared by Praches Acharya Lalitpur Engineering College
  • 9. Prepared by Praches Acharya Lalitpur Engineering College
  • 10. Prepared by Praches Acharya Lalitpur Engineering College
  • 11. Prepared by Praches Acharya Lalitpur Engineering College
  • 12. Prepared by Praches Acharya Lalitpur Engineering College
  • 13. Prepared by Praches Acharya Lalitpur Engineering College
  • 14. Prepared by Praches Acharya Lalitpur Engineering College
  • 15. Prepared by Praches Acharya Lalitpur Engineering College
  • 16. Prepared by Praches Acharya Lalitpur Engineering College
  • 17. Prepared by Praches Acharya Lalitpur Engineering College
  • 18. Prepared by Praches Acharya Lalitpur Engineering College
  • 19. Prepared by Praches Acharya Lalitpur Engineering College
  • 20. Binary Codes (Coding) Digital systems represent and manipulate not only binary numbers, but also many other discrete elements of information. Any discrete element of information distinct among a group of quantities can be represented by a binary code. Binary codes play an important role in digital computers. 1. Binary Coded Decimal (BCD) computer uses decimals in coded form which the hardware understands. A binary code that distinguishes among 10 elements of decimal digits must contain at least four bits. Numerous different binary codes can be obtained by arranging four bits into 10 distinct combinations. This is called binary-coded decimal and is commonly referred to as BCD. Prepared by Praches Acharya Lalitpur Engineering College
  • 21. Prepared by Praches Acharya Lalitpur Engineering College
  • 22. Gray code (Reflected code) • It is a binary coding scheme used to represent digits generated from a mechanical sensor that may be prone to error. Used in telegraphy in the late 1800s, and also known as "reflected binary code”. Gray code was patented by Bell Labs researcher Frank Gray in 1947. In Gray code, there is only one bit location different between two successive values, which makes mechanical transitions from one digit to the next less error prone. The following chart shows normal binary representations from 0 to 15 and the corresponding Gray code. • The Gray code is used in applications where the normal sequence of binary numbers may produce an error or ambiguity during the transition from one number to the next. If binary numbers are used, a change from 0111 to 1000 may produce an intermediate erroneous number 1001 if the rightmost bit takes more time to change than the other three bits. The Gray code eliminates this problem since only one bit changes in value during any transition between two numbers. Prepared by Praches Acharya Lalitpur Engineering College
  • 23. Prepared by Praches Acharya Lalitpur Engineering College
  • 24. Gray code Contd… Prepared by Praches Acharya Lalitpur Engineering College
  • 25. Alphanumeric codes • Alphanumeric character set is a set of elements that includes the 10 decimal digits, 26 letters of the alphabet and special characters such as $, %, + etc. It is necessary to formulate a binary code for this set to handle different data types. If only capital letters are included, we need a binary code of at least six bits, and if both uppercase letters and lowercase letters are included, we need a binary code of at least seven bits. ASCII Code The standard binary code for the alphanumeric characters is called ASCII (American Standard Code for Information Interchange). It uses seven bits to code 128 characters as shown in the table below. The seven bits of the code are designated by B1 through B7 with B7 being the most significant bit. Prepared by Praches Acharya Lalitpur Engineering College
  • 26. Prepared by Praches Acharya Lalitpur Engineering College
  • 27. Excess-3 Code (XS3) • Excess-3, also called XS3, is a code used to express decimal numbers. It is another important binary code. The Excess-3 code for a given decimal number is determined by adding '3' to each decimal digit in the given number and then replacing each digit of the newly found decimal number by its four bit binary equivalent. For example, XS3 code of 24 is obtained as 2 4 +3 +3 ----------- 5 7 0101 0111 Thus, XS3 code of 24 is 0101 0111. Prepared by Praches Acharya Lalitpur Engineering College
  • 28. For example; Let us suppose we want to determine the decimal equivalent for the Excess-3 code 1000110. First we make group of 4 bits starting from radix point. Prepared by Praches Acharya Lalitpur Engineering College