SlideShare a Scribd company logo
1 of 31
Download to read offline
F.Y.B.SC.(C.SC.)
PRINCIPLES OF DIGITAL
ELECTRONICS- NUMBER SYSTEMS
-Prof. Vandana Pagar
Assistant professor
MIT ACSC.
TOPICS TO BE COVERED
➢Number Systems:
1. Decimal Number System
2. Binary Number System
3. Hexadecimal Number System
➢Representation of Numbers of
Different Radix
➢Conversion of Numbers from one Radix
to Another Radix
WHAT IS NUMBER SYSTEM ?
•system for representing number of certain type.
• Example:
–There are several systems for representing the
–counting numbers.
– These include the usual base “10” or decimal system : 1,2,3
,…..10,11,12,..99,100,…
,…..10,11,12,..99,100,…
System Base Symbols
Used by
humans?
Used in
computers?
Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa-
decimal
16 0, 1, … 9,
A, B, … F
No No
COMMON NUMBER SYSTEM
Decimal Binary
Hexa-
decimal
0 0 0
1 1 1
2 10 2
3 11 3
4 100 4
5 101 5
6 110 6
7 111 7
COUNTING
DECIMAL NUMBER SYSTEM
In Decimal number system, an
ordered set of ten symbols
0,1,2,3,4,5,6,7,8 and 9 are used to
specify the quantities.
Symbols used are known as digits.
Radix or base of decimal number
system is 10
DECIMAL NUMBER SYSTEM
BINARY NUMBER SYSTEM
 The binary number system is a code that uses
only two basic symbols i.e. 0 and 1
 Generally in digital electronics 0 represents low
level and 1 represents high level.
 Symbols in binary number system are called as
bits.
BINARY NUMBER SYSTEM
HEXADECIMAL NUMBER SYSTEM
 Hexadecimal Number
System has a base of
sixteen.
 It is extensively used in
Microprocessor work
 It uses 16 distinct symbols
0 to 9 and Ato F
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,
F
BINARY TO DECIMAL CONVERSION:
(i) Get the decimal number
(ii) Write the weights in exponential form
(iii) Place 1 and a 0 at appropriate positions i.e. place a
1 if weight is taken during the sum and 0 otherwise.
iv.) Add all the products
HEXADECIMAL TO DECIMAL
CONVERSION:
 In a hexadecimal number system each digit
position corresponds to power of 16. The weight
of the digit position in a hexadecimal number is
as follows:
▪ In hexadecimal number system each digit
position corresponds to appropriate power of 16.
The weights of the digit positions in hexadecimal
number are as follows:
………163 162 161 160 . 16-1 16-2 16-3
▪ To convert Hexadecimal number to decimal
number, multiply each hexadecimal digit by its
weight and add the resulting product.
DECIMAL TO ANY BASE
 Steps:
1. Convert integer part
( Successive Division Method )
2. Convert fractional part
( Successive Multiplication Method )
DECIMAL TO BINARY CONVERSION
Steps in Successive Division Method
1. Divide the integer part of decimal number by
desired base number, store quotient (Q) and
remainder (R)
2. Consider quotient as a new decimal number and
repeat step1 until quotient becomes 0
3. Note down the remainders in the reverse order
DECIMAL FRACTIONS TO BINARY
 Multiply Rule is used
 Multiply bit by two and record the carry in the
integer position
 Note down the integers in forward direction(top
to bottom).
(0.364) 10 = ( ?)2
0.364*2 = 0.728 0
0.728*2 = 1.456 1
0.456*2 = 0.912 0
0.912*2 =1.824 1
0.824*2= 1.648 1
Ans:(0.364) 10 = ( 0.01011)2
DECIMAL TO HEXADECIMAL
HEXADECIMAL TO BINARY
 To convert a hexadecimal number to a binary
number, first write each hexadecimal digit to its
4-bit equivalent using the binary codes, and then
write the binary numbers without a gap.
Example : Convert (9A)16 to binary equivalent.
Solution :- (9 A)
(1001 1010) 2
Thus (9A)16 = (1001 1010) 2
BINARY TO HEXADECIMAL CONVERSION
(BIN TO HEX) :
 Converting a binary to hexadecimal is a straight
forward procedure. Simply break the binary
number into four-bit groups starting at binary
point, and replace each group with the equivalent
hexadecimal symbol.
 Example : Convert (101101)2 to Hexadecimal
equivalent
10 1101
2 D
(101101)2=(2D)16
BINARY ADDITIONS
 Binary numbers are added like decimal
numbers.
 In decimal, when numbers sum more than 9 a
carry results.
 In binary when numbers sum more than 1 a
carry takes place.
0 + 0 = 0
1 + 0 = 1
1 + 1 = 0 + carry 1
1 + 1 + 1 = 1 + carry 1
BINARY CODED DECIMAL (BCD) CODE:-
 The binary coded decimal (BCD) code is a
weighted code. This code is found very convenient
for representing digits. Each group of four bits is
used to represent one decimal digit. It is also
called as 8421 code. This code consists of four bits
which have the weights as 8 4 2 1 . The four bit
combination that represents the decimal digits 0
to 9 are shown in table 1.4.
BCD CODE
BINARY SUBTRACTION:
 To perform a binary subtraction you first have to
represent the number to be subtracted in its negative
form. This is known as its two's complement.
 The two's complement of a binary number is obtained
by:
1. Replacing all the 1s with 0s and the 0s with 1s. This is
known as its one's complement.
2. Adding 1 to this number by the rules of binary
addition.
Now you have the two's complement.
Example:
The decimal subtraction 29 - 7 = 22 is the same as
adding (29) + (-7) = 22
1. Convert the number to be subtracted to its two's
complement:
2’S COMPLEMENT SUBTRACTION
00000111 (decimal 7)
11111000 (one's complement)
+ 00000001 (add 1)
11111001 (two's complement)
29 00011101
+-7 11111001
22 (1)00010110
NON-WEIGHTED CODES:-
 Non-weighted binary codes do not follow the
positional weight principle. The example of non-
weighted codes is gray codes, excess-3 code and
alphanumeric code etc.
 Alphanumeric Code:- In communication
along with ordinary number, we need some
characters, punctuation marks and also
control signals. The code we have studied so
far is not enough for data communication. For
overcoming this problem binary symbols are
used for representing number, alphabetic
character and special symbols.
 The binary codes which are uses to represents
number, alphabetic character and special symbol
are called alphanumeric code.
 ASCII
 EBCDIC
ASCII Code
 The ASCII code is extensively used for data
communication and in computers. It is a 7-bit
code, so it can represents 27 or 128 different
characters.
 It can represent decimal number 0-9, letters of
alphabets in lower case and upper case, special
symbol and control instructions. Each symbol has
7- bit code which is made up of a 3-bit group
followed by a 4-bit group. The number is
represented by 8421 code.
GRAY CODE:
 Binary to Gray Converter: In this conversion
the most significant bit (MSB) is copied as it is,
so these represents MSB of gray code, then going
from left to right add each adjacent pair of binary
digits to get the next gray code. After the
addition forget the about carry.
GRAY CODE
GRAY TO BINARY CODE CONVERSION
 In this conversion first write MSB bit as it is of a
gray code, this one is an MSB bit of binary code,
and then add each MSB of binary code to the
next bit of gray code. If carry is generated then
neglect the carry.
REFERENCE BOOKS:
1. Digital Fundamentals: Floyd T.M., Jain R.P., Pearson
Education
2. Digital Electronics: Jain R.P., Tata McGraw Hill
3. Digital Principles and Applications: Malvino Leach, Tata
McGraw-Hill
4. M.Morris Mano, “ Digital Design “ 3rdEdition, PHI,
NewDelhi.
Digital Electronics- Number systems & codes

More Related Content

What's hot

What's hot (20)

Binary codes
Binary codesBinary codes
Binary codes
 
Number System (Binary,octal,Decimal,Hexadecimal)
Number System (Binary,octal,Decimal,Hexadecimal)Number System (Binary,octal,Decimal,Hexadecimal)
Number System (Binary,octal,Decimal,Hexadecimal)
 
BCD.
BCD.BCD.
BCD.
 
BCD to binary code converter
BCD to binary code converterBCD to binary code converter
BCD to binary code converter
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Binary codes
Binary codesBinary codes
Binary codes
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
 
Multiplexer and DeMultiplexer
Multiplexer and DeMultiplexerMultiplexer and DeMultiplexer
Multiplexer and DeMultiplexer
 
module1:Introduction to digital electronics
module1:Introduction to digital electronicsmodule1:Introduction to digital electronics
module1:Introduction to digital electronics
 
Counters
CountersCounters
Counters
 
Decoder Full Presentation
Decoder Full Presentation Decoder Full Presentation
Decoder Full Presentation
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
Encoder
EncoderEncoder
Encoder
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
 
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEMBINARY NUMBER SYSTEM
BINARY NUMBER SYSTEM
 
Weighted and Non Weighted Codes
Weighted and Non Weighted CodesWeighted and Non Weighted Codes
Weighted and Non Weighted Codes
 
3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )
 
Number system
Number systemNumber system
Number system
 
Mod 10 synchronous counter updated
Mod 10 synchronous counter updatedMod 10 synchronous counter updated
Mod 10 synchronous counter updated
 

Similar to Digital Electronics- Number systems & codes

Similar to Digital Electronics- Number systems & codes (20)

digital-180612132737.pdf
digital-180612132737.pdfdigital-180612132737.pdf
digital-180612132737.pdf
 
DIGITAL DESIGN
DIGITAL DESIGNDIGITAL DESIGN
DIGITAL DESIGN
 
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfCDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Data Representation
Data RepresentationData Representation
Data Representation
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Unit 1 data representation and computer arithmetic
Unit 1  data representation and computer arithmeticUnit 1  data representation and computer arithmetic
Unit 1 data representation and computer arithmetic
 
data representation
 data representation data representation
data representation
 
DLD_PPT_0.pptx
DLD_PPT_0.pptxDLD_PPT_0.pptx
DLD_PPT_0.pptx
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number system
 
Number system
Number systemNumber system
Number system
 
Data representation
Data representationData representation
Data representation
 
04 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa1604 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa16
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 
Cse 112 number system-[id_142-15-3472]
Cse 112 number system-[id_142-15-3472]Cse 112 number system-[id_142-15-3472]
Cse 112 number system-[id_142-15-3472]
 
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
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Csc 2313 (lecture 3)
Csc 2313 (lecture 3)Csc 2313 (lecture 3)
Csc 2313 (lecture 3)
 
Csc 2313 (lecture 3)
Csc 2313 (lecture 3)Csc 2313 (lecture 3)
Csc 2313 (lecture 3)
 

More from VandanaPagar1 (9)

DDUV.pdf
DDUV.pdfDDUV.pdf
DDUV.pdf
 
Verilog operators.pptx
Verilog  operators.pptxVerilog  operators.pptx
Verilog operators.pptx
 
Cloud-topology.pdf
Cloud-topology.pdfCloud-topology.pdf
Cloud-topology.pdf
 
Networking Technologies in IOT.pdf
Networking Technologies in IOT.pdfNetworking Technologies in IOT.pdf
Networking Technologies in IOT.pdf
 
IoT_application.pptx
IoT_application.pptxIoT_application.pptx
IoT_application.pptx
 
Logic Synthesis
Logic SynthesisLogic Synthesis
Logic Synthesis
 
VHDL- gate level modelling
VHDL- gate level modellingVHDL- gate level modelling
VHDL- gate level modelling
 
VHDL- data types
VHDL- data typesVHDL- data types
VHDL- data types
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 

Recently uploaded

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
meharikiros2
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
hublikarsn
 

Recently uploaded (20)

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 

Digital Electronics- Number systems & codes

  • 1. F.Y.B.SC.(C.SC.) PRINCIPLES OF DIGITAL ELECTRONICS- NUMBER SYSTEMS -Prof. Vandana Pagar Assistant professor MIT ACSC.
  • 2. TOPICS TO BE COVERED ➢Number Systems: 1. Decimal Number System 2. Binary Number System 3. Hexadecimal Number System ➢Representation of Numbers of Different Radix ➢Conversion of Numbers from one Radix to Another Radix
  • 3. WHAT IS NUMBER SYSTEM ? •system for representing number of certain type. • Example: –There are several systems for representing the –counting numbers. – These include the usual base “10” or decimal system : 1,2,3 ,…..10,11,12,..99,100,… ,…..10,11,12,..99,100,…
  • 4. System Base Symbols Used by humans? Used in computers? Decimal 10 0, 1, … 9 Yes No Binary 2 0, 1 No Yes Octal 8 0, 1, … 7 No No Hexa- decimal 16 0, 1, … 9, A, B, … F No No COMMON NUMBER SYSTEM
  • 5. Decimal Binary Hexa- decimal 0 0 0 1 1 1 2 10 2 3 11 3 4 100 4 5 101 5 6 110 6 7 111 7 COUNTING
  • 6. DECIMAL NUMBER SYSTEM In Decimal number system, an ordered set of ten symbols 0,1,2,3,4,5,6,7,8 and 9 are used to specify the quantities. Symbols used are known as digits. Radix or base of decimal number system is 10
  • 8. BINARY NUMBER SYSTEM  The binary number system is a code that uses only two basic symbols i.e. 0 and 1  Generally in digital electronics 0 represents low level and 1 represents high level.  Symbols in binary number system are called as bits.
  • 10. HEXADECIMAL NUMBER SYSTEM  Hexadecimal Number System has a base of sixteen.  It is extensively used in Microprocessor work  It uses 16 distinct symbols 0 to 9 and Ato F 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, F
  • 11. BINARY TO DECIMAL CONVERSION: (i) Get the decimal number (ii) Write the weights in exponential form (iii) Place 1 and a 0 at appropriate positions i.e. place a 1 if weight is taken during the sum and 0 otherwise. iv.) Add all the products
  • 12. HEXADECIMAL TO DECIMAL CONVERSION:  In a hexadecimal number system each digit position corresponds to power of 16. The weight of the digit position in a hexadecimal number is as follows: ▪ In hexadecimal number system each digit position corresponds to appropriate power of 16. The weights of the digit positions in hexadecimal number are as follows: ………163 162 161 160 . 16-1 16-2 16-3 ▪ To convert Hexadecimal number to decimal number, multiply each hexadecimal digit by its weight and add the resulting product.
  • 13. DECIMAL TO ANY BASE  Steps: 1. Convert integer part ( Successive Division Method ) 2. Convert fractional part ( Successive Multiplication Method )
  • 14. DECIMAL TO BINARY CONVERSION Steps in Successive Division Method 1. Divide the integer part of decimal number by desired base number, store quotient (Q) and remainder (R) 2. Consider quotient as a new decimal number and repeat step1 until quotient becomes 0 3. Note down the remainders in the reverse order
  • 15. DECIMAL FRACTIONS TO BINARY  Multiply Rule is used  Multiply bit by two and record the carry in the integer position  Note down the integers in forward direction(top to bottom). (0.364) 10 = ( ?)2 0.364*2 = 0.728 0 0.728*2 = 1.456 1 0.456*2 = 0.912 0 0.912*2 =1.824 1 0.824*2= 1.648 1 Ans:(0.364) 10 = ( 0.01011)2
  • 17. HEXADECIMAL TO BINARY  To convert a hexadecimal number to a binary number, first write each hexadecimal digit to its 4-bit equivalent using the binary codes, and then write the binary numbers without a gap. Example : Convert (9A)16 to binary equivalent. Solution :- (9 A) (1001 1010) 2 Thus (9A)16 = (1001 1010) 2
  • 18. BINARY TO HEXADECIMAL CONVERSION (BIN TO HEX) :  Converting a binary to hexadecimal is a straight forward procedure. Simply break the binary number into four-bit groups starting at binary point, and replace each group with the equivalent hexadecimal symbol.  Example : Convert (101101)2 to Hexadecimal equivalent 10 1101 2 D (101101)2=(2D)16
  • 19. BINARY ADDITIONS  Binary numbers are added like decimal numbers.  In decimal, when numbers sum more than 9 a carry results.  In binary when numbers sum more than 1 a carry takes place. 0 + 0 = 0 1 + 0 = 1 1 + 1 = 0 + carry 1 1 + 1 + 1 = 1 + carry 1
  • 20. BINARY CODED DECIMAL (BCD) CODE:-  The binary coded decimal (BCD) code is a weighted code. This code is found very convenient for representing digits. Each group of four bits is used to represent one decimal digit. It is also called as 8421 code. This code consists of four bits which have the weights as 8 4 2 1 . The four bit combination that represents the decimal digits 0 to 9 are shown in table 1.4.
  • 22. BINARY SUBTRACTION:  To perform a binary subtraction you first have to represent the number to be subtracted in its negative form. This is known as its two's complement.  The two's complement of a binary number is obtained by: 1. Replacing all the 1s with 0s and the 0s with 1s. This is known as its one's complement. 2. Adding 1 to this number by the rules of binary addition. Now you have the two's complement. Example: The decimal subtraction 29 - 7 = 22 is the same as adding (29) + (-7) = 22 1. Convert the number to be subtracted to its two's complement:
  • 23. 2’S COMPLEMENT SUBTRACTION 00000111 (decimal 7) 11111000 (one's complement) + 00000001 (add 1) 11111001 (two's complement) 29 00011101 +-7 11111001 22 (1)00010110
  • 24. NON-WEIGHTED CODES:-  Non-weighted binary codes do not follow the positional weight principle. The example of non- weighted codes is gray codes, excess-3 code and alphanumeric code etc.  Alphanumeric Code:- In communication along with ordinary number, we need some characters, punctuation marks and also control signals. The code we have studied so far is not enough for data communication. For overcoming this problem binary symbols are used for representing number, alphabetic character and special symbols.  The binary codes which are uses to represents number, alphabetic character and special symbol are called alphanumeric code.  ASCII  EBCDIC
  • 25. ASCII Code  The ASCII code is extensively used for data communication and in computers. It is a 7-bit code, so it can represents 27 or 128 different characters.  It can represent decimal number 0-9, letters of alphabets in lower case and upper case, special symbol and control instructions. Each symbol has 7- bit code which is made up of a 3-bit group followed by a 4-bit group. The number is represented by 8421 code.
  • 26.
  • 27. GRAY CODE:  Binary to Gray Converter: In this conversion the most significant bit (MSB) is copied as it is, so these represents MSB of gray code, then going from left to right add each adjacent pair of binary digits to get the next gray code. After the addition forget the about carry.
  • 29. GRAY TO BINARY CODE CONVERSION  In this conversion first write MSB bit as it is of a gray code, this one is an MSB bit of binary code, and then add each MSB of binary code to the next bit of gray code. If carry is generated then neglect the carry.
  • 30. REFERENCE BOOKS: 1. Digital Fundamentals: Floyd T.M., Jain R.P., Pearson Education 2. Digital Electronics: Jain R.P., Tata McGraw Hill 3. Digital Principles and Applications: Malvino Leach, Tata McGraw-Hill 4. M.Morris Mano, “ Digital Design “ 3rdEdition, PHI, NewDelhi.