SlideShare a Scribd company logo
Digital logic degin, Number system
 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 (20)

PPTX
Data Representation
Rick Jamil
 
PDF
Lec 02
Syed Haider
 
PPT
[1] Data Representation
Mr McAlpine
 
PPT
Computer Systems Data Representation
iarthur
 
PPTX
data representation
Haroon_007
 
PPT
Data representation moris mano ch 03
thearticlenow
 
PPTX
Data representation
MAGADH UNIVERSITY,BOADH GAYA
 
PPT
Data representation
shashikant pabari
 
PPTX
Basic electronics
Mantra VLSI
 
PPTX
Data representation
Ashraf Miraz
 
PPTX
Data representation
Kaviya Arikrishnan
 
PPTX
Data Representation
Education Front
 
PPT
08. Numeral Systems
Intro C# Book
 
PPT
Number Systems
Nasir Jumani
 
PPT
Binary code
Juzen1600101
 
PDF
Number system
Vinoth Loganathan
 
PDF
Data representation in computers
Prof. Dr. K. Adisesha
 
PPT
Chapter 02 Data Types
Nathan Yeung
 
PPT
Error detection and correction codes r006
arunachalamr16
 
Data Representation
Rick Jamil
 
Lec 02
Syed Haider
 
[1] Data Representation
Mr McAlpine
 
Computer Systems Data Representation
iarthur
 
data representation
Haroon_007
 
Data representation moris mano ch 03
thearticlenow
 
Data representation
MAGADH UNIVERSITY,BOADH GAYA
 
Data representation
shashikant pabari
 
Basic electronics
Mantra VLSI
 
Data representation
Ashraf Miraz
 
Data representation
Kaviya Arikrishnan
 
Data Representation
Education Front
 
08. Numeral Systems
Intro C# Book
 
Number Systems
Nasir Jumani
 
Binary code
Juzen1600101
 
Number system
Vinoth Loganathan
 
Data representation in computers
Prof. Dr. K. Adisesha
 
Chapter 02 Data Types
Nathan Yeung
 
Error detection and correction codes r006
arunachalamr16
 

Similar to Digital logic degin, Number system (20)

PPTX
Coding Schemes related dld lecture it is dld
shayan03239
 
PPT
digital___electronics___EXPLAINATION.ppt
Harshal Vaidya
 
PPT
Fundamentals of Electrical and electronic engineering Binary code,grey code,o...
njr200505
 
PPTX
Applied physics iii lecture3 digital_codes
Japhet Munnah
 
PPTX
Codes r005
arunachalamr16
 
PPTX
Computer-codes.pptx
PraveenThabbannavar
 
PDF
chapter 2 part 1.pdf
Praches1
 
PPTX
Digital principles basic
Abinaya B
 
PPTX
Digital Logic BCA TU Chapter 2.2
ISMT College
 
PPTX
Digital Fundamental - Binary Codes-Logic Gates
VidhyaB10
 
PDF
Lecture6 Chapter1- ASCII Code, Error Detection and Correction Codes, and Bina...
UmerKhan147799
 
PPTX
6.number system
vanitha caroline
 
PDF
Information Science in Action Week 3 Codes
ValentinusRobyHanant
 
PDF
Lecture5 Chapter1- Binary Codes.pdf
UmerKhan147799
 
PPT
digitalelectronics.ppt
HarshalVaidya11
 
PPT
Dr.naveen electronics binary codes
NAVEEN KUMAR
 
PPTX
Module_3_Codes and Arithmetic operation.pptx
earningmoney9595
 
PDF
CODES_2.elictronicjajajajsjjsjdjdjcjdjjsksjs
obenzajoshua01
 
PPT
Computer archi&mp
MSc CST
 
Coding Schemes related dld lecture it is dld
shayan03239
 
digital___electronics___EXPLAINATION.ppt
Harshal Vaidya
 
Fundamentals of Electrical and electronic engineering Binary code,grey code,o...
njr200505
 
Applied physics iii lecture3 digital_codes
Japhet Munnah
 
Codes r005
arunachalamr16
 
Computer-codes.pptx
PraveenThabbannavar
 
chapter 2 part 1.pdf
Praches1
 
Digital principles basic
Abinaya B
 
Digital Logic BCA TU Chapter 2.2
ISMT College
 
Digital Fundamental - Binary Codes-Logic Gates
VidhyaB10
 
Lecture6 Chapter1- ASCII Code, Error Detection and Correction Codes, and Bina...
UmerKhan147799
 
6.number system
vanitha caroline
 
Information Science in Action Week 3 Codes
ValentinusRobyHanant
 
Lecture5 Chapter1- Binary Codes.pdf
UmerKhan147799
 
digitalelectronics.ppt
HarshalVaidya11
 
Dr.naveen electronics binary codes
NAVEEN KUMAR
 
Module_3_Codes and Arithmetic operation.pptx
earningmoney9595
 
CODES_2.elictronicjajajajsjjsjdjdjcjdjjsksjs
obenzajoshua01
 
Computer archi&mp
MSc CST
 
Ad

More from Ashish Kumar Thakur (12)

PPT
No sql databases
Ashish Kumar Thakur
 
PDF
Home automation using bluetooth - Aurdino BASED
Ashish Kumar Thakur
 
PDF
APRIORI Algorithm
Ashish Kumar Thakur
 
DOC
Traveling salesman problem
Ashish Kumar Thakur
 
PPTX
Cse image processing ppt
Ashish Kumar Thakur
 
PPTX
A survey on artificial neural networks in cyber world
Ashish Kumar Thakur
 
PPTX
An event driven campus navigation system on andriod121
Ashish Kumar Thakur
 
PPTX
Ram ppt
Ashish Kumar Thakur
 
PPTX
Data warehousing ppt
Ashish Kumar Thakur
 
PPTX
Objec oriented Analysis and design Pattern
Ashish Kumar Thakur
 
PPTX
Dwd mdatamining intro-iep
Ashish Kumar Thakur
 
PPTX
Biomass conversion technologies
Ashish Kumar Thakur
 
No sql databases
Ashish Kumar Thakur
 
Home automation using bluetooth - Aurdino BASED
Ashish Kumar Thakur
 
APRIORI Algorithm
Ashish Kumar Thakur
 
Traveling salesman problem
Ashish Kumar Thakur
 
Cse image processing ppt
Ashish Kumar Thakur
 
A survey on artificial neural networks in cyber world
Ashish Kumar Thakur
 
An event driven campus navigation system on andriod121
Ashish Kumar Thakur
 
Data warehousing ppt
Ashish Kumar Thakur
 
Objec oriented Analysis and design Pattern
Ashish Kumar Thakur
 
Dwd mdatamining intro-iep
Ashish Kumar Thakur
 
Biomass conversion technologies
Ashish Kumar Thakur
 
Ad

Recently uploaded (20)

PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPTX
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
PPTX
EC3551-Transmission lines Demo class .pptx
Mahalakshmiprasannag
 
PPTX
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
PDF
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
PPT
Oxygen Co2 Transport in the Lungs(Exchange og gases)
SUNDERLINSHIBUD
 
PDF
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
PPTX
Destructive Tests corrosion engineer (1).pptx
zeidali3
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PDF
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
PDF
POWER PLANT ENGINEERING (R17A0326).pdf..
haneefachosa123
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PPTX
Innowell Capability B0425 - Commercial Buildings.pptx
regobertroza
 
PPTX
Benefits_^0_Challigi😙🏡💐8fenges[1].pptx
akghostmaker
 
PPTX
REINFORCEMENT AS CONSTRUCTION MATERIALS.pptx
mohaiminulhaquesami
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Day2 B2 Best.pptx
helenjenefa1
 
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
EC3551-Transmission lines Demo class .pptx
Mahalakshmiprasannag
 
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
Oxygen Co2 Transport in the Lungs(Exchange og gases)
SUNDERLINSHIBUD
 
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
Destructive Tests corrosion engineer (1).pptx
zeidali3
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
POWER PLANT ENGINEERING (R17A0326).pdf..
haneefachosa123
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
Thermal runway and thermal stability.pptx
godow93766
 
Innowell Capability B0425 - Commercial Buildings.pptx
regobertroza
 
Benefits_^0_Challigi😙🏡💐8fenges[1].pptx
akghostmaker
 
REINFORCEMENT AS CONSTRUCTION MATERIALS.pptx
mohaiminulhaquesami
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Hashing Introduction , hash functions and techniques
sailajam21
 
MRRS Strength and Durability of Concrete
CivilMythili
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 

Digital logic degin, Number system

  • 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!