SlideShare a Scribd company logo
 2’s complement numbers
› Addition and subtraction
 Binary coded decimal
 Gray codes for binary numbers
 ASCII characters
 Moving towards hardware
› Storing data
› Processing data
 Let’s compute (13)10 - (5)10.
› (13)10 = +(1101)2 = (01101)2
› (-5)10 = -(0101)2 = (11011)2
 Adding these two 5-bit codes…
 Discarding the carry bit, the sign bit is seen to
be zero, indicating a correct result.
 Numbers in hexadecimal
0 1 1 0 1
+ 1 1 0 1 1
--------------
1 0 1 0 0 0
carry
 Let’s compute (5)10 – (12)10.
› (-12)10 = -(1100)2 = (10100)2
› (5)10 = +(0101)2 = (00101)2
 Adding these two 5-bit codes…
 Here, there is no carry bit and the sign bit is 1.
This indicates a negative result, which is what
we expect. (11001)2 = -(7)10.
 Numbers in hexadecimal
0 0 1 0 1
+ 1 0 1 0 0
--------------
1 1 0 0 1
 Binary coded decimal (BCD) represents each
decimal digit with four bits
› Ex. 0011 0010 1001 = 32910
 This is NOT the same as 0011001010012
 Why do this? Because people think in
decimal.
Digit BCD
Code
Digit BCD
Code
0 0000 5 0101
1 0001 6 0110
2 0010 7 0111
3 0011 8 1000
4 0100 9 1001
3 2 9
° BCD not very efficient
° Used in early
computers (40s, 50s)
° Used to encode
numbers for seven-
segment displays.
° Easier to read?
 Gray code is not a
number system.
› It is an alternate way to represent
four bit data
 Only one bit changes
from one decimal digit to
the next
 Useful for reducing errors
in communication.
 Can be scaled to larger
numbers.
Digit Binary 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
 American Standard Code for Information
Interchange
 ASCII is a 7-bit code, frequently used with
an 8th bit for error detection (more about
that in a bit).Character ASCII (bin) ASCII (hex) Decimal Octal
A 1000001 41 65 101
B 1000010 42 66 102
C 1000011 43 67 103
…
Z
a
…
1
‘
° ASCII Codes
° A – Z (26 codes), a – z (26 codes)
° 0-9 (10 codes), others (@#$%^&*….)
° Complete listing in Mano text
° Transmission susceptible to noise
° Typical transmission rates (1500 Kbps, 56.6 Kbps)
° How to keep data transmission accurate?
 Parity codes are formed by concatenating a parity
bit, P to each code word of C.
 In an odd-parity code, the parity bit is specified so
that the total number of ones is odd.
 In an even-parity code, the parity bit is specified so
that the total number of ones is even.
Information BitsP
1 1 0 0 0 0 1 1

Added even parity bit
0 1 0 0 0 0 1 1

Added odd parity bit
 Concatenate a parity bit to the ASCII code for the
characters 0, X, and = to produce both odd-parity and
even-parity codes.
Character ASCII Odd-Parity
ASCII
Even-Parity
ASCII
0 0110000 10110000 00110000
X 1011000 01011000 11011000
= 0111100 10111100 00111100
• Binary cells store individual bits of data
• Multiple cells form a register.
• Data in registers can indicate different values
• Hex (decimal)
• BCD
• ASCII
Binary Cell
0 0 1 0 1 0 1 1
 Data can move from register to register.
 Digital logic used to process data
 We will learn to design this logic
Register A Register B
Register C
Digital Logic
Circuits
 Data input at keyboard
 Shifted into place
 Stored in memory
NOTE: Data input in ASCII
 We need processing
 We need storage
 We need
communication
 You will learn to use
and design these
components.
 Although 2’s complement most important,
other number codes exist
 ASCII code used to represent characters
(including those on the keyboard)
 Registers store binary data
 Next time: Building logic circuits!
Digital logic degin, Number system

More Related Content

What's hot

Data Representation
Data RepresentationData Representation
Data RepresentationRick Jamil
 
[1] Data Representation
[1] Data Representation[1] Data Representation
[1] Data Representation
Mr McAlpine
 
Computer Systems Data Representation
Computer Systems   Data RepresentationComputer Systems   Data Representation
Computer Systems Data Representationiarthur
 
data representation
 data representation data representation
data representation
Haroon_007
 
Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03
thearticlenow
 
Data representation
Data representationData representation
Data representation
shashikant pabari
 
Basic electronics
Basic electronicsBasic electronics
Basic electronics
Mantra VLSI
 
Data representation
 Data representation Data representation
Data representation
Ashraf Miraz
 
Data representation
Data representationData representation
Data representation
Kaviya Arikrishnan
 
Data Representation
Data RepresentationData Representation
Data Representation
Education Front
 
08. Numeral Systems
08. Numeral Systems08. Numeral Systems
08. Numeral Systems
Intro C# Book
 
Binary code
Binary codeBinary code
Binary code
Juzen1600101
 
Number codes students
Number codes studentsNumber codes students
Number system
Number systemNumber system
Number system
Vinoth Loganathan
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
Prof. Dr. K. Adisesha
 
Chapter 02 Data Types
Chapter 02   Data TypesChapter 02   Data Types
Chapter 02 Data TypesNathan Yeung
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006
arunachalamr16
 

What's hot (20)

Data Representation
Data RepresentationData Representation
Data Representation
 
Lec 02
Lec 02Lec 02
Lec 02
 
[1] Data Representation
[1] Data Representation[1] Data Representation
[1] Data Representation
 
Computer Systems Data Representation
Computer Systems   Data RepresentationComputer Systems   Data Representation
Computer Systems Data Representation
 
data representation
 data representation data representation
data representation
 
Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03
 
Data representation
Data representationData representation
Data representation
 
Data representation
Data representationData representation
Data representation
 
Basic electronics
Basic electronicsBasic electronics
Basic electronics
 
Data representation
 Data representation Data representation
Data representation
 
Data representation
Data representationData representation
Data representation
 
Data Representation
Data RepresentationData Representation
Data Representation
 
08. Numeral Systems
08. Numeral Systems08. Numeral Systems
08. Numeral Systems
 
Number Systems
Number  SystemsNumber  Systems
Number Systems
 
Binary code
Binary codeBinary code
Binary code
 
Number codes students
Number codes studentsNumber codes students
Number codes students
 
Number system
Number systemNumber system
Number system
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 
Chapter 02 Data Types
Chapter 02   Data TypesChapter 02   Data Types
Chapter 02 Data Types
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006
 

Similar to Digital logic degin, Number system

3RD.pptx
3RD.pptx3RD.pptx
3RD.pptx
MAminQureshi
 
Number System.pdf
Number System.pdfNumber System.pdf
Number System.pdf
Sweta Kumari Barnwal
 
004 NUMBER SYSTEM (1).pdf
004 NUMBER SYSTEM (1).pdf004 NUMBER SYSTEM (1).pdf
004 NUMBER SYSTEM (1).pdf
MaheShiva
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
Sukriti Dhang
 
Codes r005
Codes  r005Codes  r005
Codes r005
arunachalamr16
 
bits.ppt
bits.pptbits.ppt
bits.ppt
MMichaelGuelcan
 
binarycode.pptx
binarycode.pptxbinarycode.pptx
binarycode.pptx
WilliamLugo12
 
1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM
Buxoo Abdullah
 
digitalelectronics.ppt
digitalelectronics.pptdigitalelectronics.ppt
digitalelectronics.ppt
HarshalVaidya11
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mpMSc CST
 
Number System[HEXADECIMAL].pptx
Number System[HEXADECIMAL].pptxNumber System[HEXADECIMAL].pptx
Number System[HEXADECIMAL].pptx
MaheShiva
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
sohag sikder
 
Number system
Number systemNumber system
Number system
Prof. Dr. K. Adisesha
 
COMPUTER AWARENESS.pptx
COMPUTER AWARENESS.pptxCOMPUTER AWARENESS.pptx
COMPUTER AWARENESS.pptx
Abhishek Sonker
 
Lecture_2.pptx
Lecture_2.pptxLecture_2.pptx
Lecture_2.pptx
AhmedRamadan308073
 
Octal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversionsOctal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversions
Afrasiyab Haider
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
nivedita murugan
 

Similar to Digital logic degin, Number system (20)

3RD.pptx
3RD.pptx3RD.pptx
3RD.pptx
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
Number System.pdf
Number System.pdfNumber System.pdf
Number System.pdf
 
004 NUMBER SYSTEM (1).pdf
004 NUMBER SYSTEM (1).pdf004 NUMBER SYSTEM (1).pdf
004 NUMBER SYSTEM (1).pdf
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Codes r005
Codes  r005Codes  r005
Codes r005
 
bits.ppt
bits.pptbits.ppt
bits.ppt
 
binarycode.pptx
binarycode.pptxbinarycode.pptx
binarycode.pptx
 
1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM
 
digitalelectronics.ppt
digitalelectronics.pptdigitalelectronics.ppt
digitalelectronics.ppt
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mp
 
Number System[HEXADECIMAL].pptx
Number System[HEXADECIMAL].pptxNumber System[HEXADECIMAL].pptx
Number System[HEXADECIMAL].pptx
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
 
Number system
Number systemNumber system
Number system
 
COMPUTER AWARENESS.pptx
COMPUTER AWARENESS.pptxCOMPUTER AWARENESS.pptx
COMPUTER AWARENESS.pptx
 
Lecture_2.pptx
Lecture_2.pptxLecture_2.pptx
Lecture_2.pptx
 
Octal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversionsOctal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversions
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
Digital Logic Rcs
Digital Logic RcsDigital Logic Rcs
Digital Logic Rcs
 

More from Ashish Kumar Thakur

No sql databases
No sql databasesNo sql databases
No sql databases
Ashish Kumar Thakur
 
Home automation using bluetooth - Aurdino BASED
Home automation using bluetooth - Aurdino BASEDHome automation using bluetooth - Aurdino BASED
Home automation using bluetooth - Aurdino BASED
Ashish Kumar Thakur
 
APRIORI Algorithm
APRIORI AlgorithmAPRIORI Algorithm
APRIORI Algorithm
Ashish Kumar Thakur
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
Ashish Kumar Thakur
 
Cse image processing ppt
Cse image processing pptCse image processing ppt
Cse image processing ppt
Ashish Kumar Thakur
 
A survey on artificial neural networks in cyber world
A survey on artificial neural networks in cyber world A survey on artificial neural networks in cyber world
A survey on artificial neural networks in cyber world
Ashish Kumar Thakur
 
An event driven campus navigation system on andriod121
An event driven campus navigation system on andriod121An event driven campus navigation system on andriod121
An event driven campus navigation system on andriod121
Ashish Kumar Thakur
 
Ram ppt
Ram pptRam ppt
Data warehousing ppt
Data warehousing pptData warehousing ppt
Data warehousing ppt
Ashish Kumar Thakur
 
Objec oriented Analysis and design Pattern
Objec oriented Analysis and design PatternObjec oriented Analysis and design Pattern
Objec oriented Analysis and design Pattern
Ashish Kumar Thakur
 
Dwd mdatamining intro-iep
Dwd mdatamining intro-iepDwd mdatamining intro-iep
Dwd mdatamining intro-iep
Ashish Kumar Thakur
 
Biomass conversion technologies
Biomass conversion technologiesBiomass conversion technologies
Biomass conversion technologies
Ashish Kumar Thakur
 

More from Ashish Kumar Thakur (12)

No sql databases
No sql databasesNo sql databases
No sql databases
 
Home automation using bluetooth - Aurdino BASED
Home automation using bluetooth - Aurdino BASEDHome automation using bluetooth - Aurdino BASED
Home automation using bluetooth - Aurdino BASED
 
APRIORI Algorithm
APRIORI AlgorithmAPRIORI Algorithm
APRIORI Algorithm
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
 
Cse image processing ppt
Cse image processing pptCse image processing ppt
Cse image processing ppt
 
A survey on artificial neural networks in cyber world
A survey on artificial neural networks in cyber world A survey on artificial neural networks in cyber world
A survey on artificial neural networks in cyber world
 
An event driven campus navigation system on andriod121
An event driven campus navigation system on andriod121An event driven campus navigation system on andriod121
An event driven campus navigation system on andriod121
 
Ram ppt
Ram pptRam ppt
Ram ppt
 
Data warehousing ppt
Data warehousing pptData warehousing ppt
Data warehousing ppt
 
Objec oriented Analysis and design Pattern
Objec oriented Analysis and design PatternObjec oriented Analysis and design Pattern
Objec oriented Analysis and design Pattern
 
Dwd mdatamining intro-iep
Dwd mdatamining intro-iepDwd mdatamining intro-iep
Dwd mdatamining intro-iep
 
Biomass conversion technologies
Biomass conversion technologiesBiomass conversion technologies
Biomass conversion technologies
 

Recently uploaded

CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 

Recently uploaded (20)

CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 

Digital logic degin, Number system

  • 1.
  • 2.  2’s complement numbers › Addition and subtraction  Binary coded decimal  Gray codes for binary numbers  ASCII characters  Moving towards hardware › Storing data › Processing data
  • 3.  Let’s compute (13)10 - (5)10. › (13)10 = +(1101)2 = (01101)2 › (-5)10 = -(0101)2 = (11011)2  Adding these two 5-bit codes…  Discarding the carry bit, the sign bit is seen to be zero, indicating a correct result.  Numbers in hexadecimal 0 1 1 0 1 + 1 1 0 1 1 -------------- 1 0 1 0 0 0 carry
  • 4.  Let’s compute (5)10 – (12)10. › (-12)10 = -(1100)2 = (10100)2 › (5)10 = +(0101)2 = (00101)2  Adding these two 5-bit codes…  Here, there is no carry bit and the sign bit is 1. This indicates a negative result, which is what we expect. (11001)2 = -(7)10.  Numbers in hexadecimal 0 0 1 0 1 + 1 0 1 0 0 -------------- 1 1 0 0 1
  • 5.  Binary coded decimal (BCD) represents each decimal digit with four bits › Ex. 0011 0010 1001 = 32910  This is NOT the same as 0011001010012  Why do this? Because people think in decimal. Digit BCD Code Digit BCD Code 0 0000 5 0101 1 0001 6 0110 2 0010 7 0111 3 0011 8 1000 4 0100 9 1001 3 2 9
  • 6. ° BCD not very efficient ° Used in early computers (40s, 50s) ° Used to encode numbers for seven- segment displays. ° Easier to read?
  • 7.  Gray code is not a number system. › It is an alternate way to represent four bit data  Only one bit changes from one decimal digit to the next  Useful for reducing errors in communication.  Can be scaled to larger numbers. Digit Binary 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
  • 8.  American Standard Code for Information Interchange  ASCII is a 7-bit code, frequently used with an 8th bit for error detection (more about that in a bit).Character ASCII (bin) ASCII (hex) Decimal Octal A 1000001 41 65 101 B 1000010 42 66 102 C 1000011 43 67 103 … Z a … 1 ‘
  • 9. ° ASCII Codes ° A – Z (26 codes), a – z (26 codes) ° 0-9 (10 codes), others (@#$%^&*….) ° Complete listing in Mano text ° Transmission susceptible to noise ° Typical transmission rates (1500 Kbps, 56.6 Kbps) ° How to keep data transmission accurate?
  • 10.  Parity codes are formed by concatenating a parity bit, P to each code word of C.  In an odd-parity code, the parity bit is specified so that the total number of ones is odd.  In an even-parity code, the parity bit is specified so that the total number of ones is even. Information BitsP 1 1 0 0 0 0 1 1  Added even parity bit 0 1 0 0 0 0 1 1  Added odd parity bit
  • 11.  Concatenate a parity bit to the ASCII code for the characters 0, X, and = to produce both odd-parity and even-parity codes. Character ASCII Odd-Parity ASCII Even-Parity ASCII 0 0110000 10110000 00110000 X 1011000 01011000 11011000 = 0111100 10111100 00111100
  • 12. • Binary cells store individual bits of data • Multiple cells form a register. • Data in registers can indicate different values • Hex (decimal) • BCD • ASCII Binary Cell 0 0 1 0 1 0 1 1
  • 13.  Data can move from register to register.  Digital logic used to process data  We will learn to design this logic Register A Register B Register C Digital Logic Circuits
  • 14.  Data input at keyboard  Shifted into place  Stored in memory NOTE: Data input in ASCII
  • 15.  We need processing  We need storage  We need communication  You will learn to use and design these components.
  • 16.  Although 2’s complement most important, other number codes exist  ASCII code used to represent characters (including those on the keyboard)  Registers store binary data  Next time: Building logic circuits!