SlideShare a Scribd company logo
1 of 12
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Digital Electronics and Logic Design

Credit Hours
3
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Credit Hours
3

Binary codes
• Binary codes are codes which are represented
in binary system with modification from the
original ones. Below we will be seeing the
following:
• Weighted Binary Systems
• Non Weighted Codes
2
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Credit Hours
3

Weighted Binary Systems
• Weighted Binary Systems Weighted binary
codes are those which obey the positional
weighting principles, each position of the
number represents a specific weight. The
binary counting sequence is an example.

3
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Credit Hours
3

4
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Credit Hours
3

Gray code

5
Subject Name
Digital Electronics and Logic Design

•

•

•
•

Code
DEL-244

Credit Hours
3

8421 Code/BCD Code The BCD (Binary Coded Decimal) is a straight assignment of
the binary equivalent. It is possible to assign weights to the binary bits according
to their positions. The weights in the BCD code are 8,4,2,1.
Example: The bit assignment 1001, can be seen by its weights to represent the
decimal 9 because:
1x8+0x4+0x2+1x1 = 9
2421 Code This is a weighted code, its weights are 2, 4, 2 and 1. A decimal
number is represented in 4-bit form and the total four bits weight is 2 + 4 + 2 + 1
= 9. Hence the 2421 code represents the decimal numbers from 0 to 9.

6
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Credit Hours
3

• Reflective Code A code is said to be reflective when code for 9 is
complement for the code for 0, and so is for 8 and 1 codes, 7 and 2, 6 and
3, 5 and 4. Codes 2421, 5211, and excess-3 are reflective, whereas the
8421 code is not.
• Sequential Codes A code is said to be sequential when two subsequent
codes, seen as numbers in binary representation, differ by one. This
greatly aids mathematical manipulation of data. The 8421 and Excess-3
codes are sequential, whereas the 2421 and 5211 codes are not.
• Non Weighted Codes Non weighted codes are codes that are not
positionally weighted. That is, each position within the binary number is
not assigned a fixed value.
• Excess-3 Code Excess-3 is a non weighted code used to express decimal
numbers. The code derives its name from the fact that each binary code is
the corresponding 8421 code plus 0011(3).
• Example: 1000 of 8421 = 1011 in Excess-3
•
7
Subject Name
Digital Electronics and Logic Design

•

Code
DEL-244

Credit Hours
3

Gray Code The gray code belongs to a class of codes called
minimum change codes, in which only one bit in the code
changes when moving from one code to the next. The Gray
code is non-weighted code, as the position of bit does not
contain any weight. The gray code is a reflective digital code
which has the special property that any two subsequent
numbers codes differ by only one bit. This is also called a unitdistance code. In digital Gray code has got a special place.

8
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Credit Hours
3

Two’s compliment
• How do you represent a minus sign electronically in a
computer?
• How can you represent it such that arithmetic
operations are manageable?
• There are two types of compliments for each number
base system.
– Have the r’s complement
– Have the (r-1)’s complement

• For base 2
complement

have 2’s complement

9/15/09 - L15 Decoders,
Multiplexers

Copyright 2009 - Joanne DeGroat, ECE, OSU

and 1’s

9
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Credit Hours
3

1’s Complement
• 1’s complement of N is defined as (2n -1)-N.
– If n=4 have (2n -1) being 1 0000 - 1 = 1111

• So for n=4 would subtract any 4-bit binary
number from 1111.
• This is just inverting each bit.
• Example: 1’s compliment of 1011001
is 0100110
9/15/09 - L15 Decoders,
Multiplexers

Copyright 2009 - Joanne DeGroat, ECE, OSU

10
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Credit Hours
3

2’s complement
• The 2’s complement is defined as 2n-N
• Can be done by subtraction of N from 2n or
adding 1 to the 1’s complement of a number.
• For 6 = 0110
– The 1’s complement is 1001
– The 2’s complement is 1010
9/15/09 - L15 Decoders,
Multiplexers

Copyright 2009 - Joanne DeGroat, ECE, OSU

11
Subject Name
Digital Electronics and Logic Design

Code
DEL-244

Credit Hours
3

Operation with 2’s complement
• Add 4 and -6
• Will use the 2’s complement of -6 or 1010
– 4
– -6
–

0100
1010
1110

• And taking the 2’s complement of 1110 get
0001 + 1 = 0010
9/15/09 - L15 Decoders,
Multiplexers

Copyright 2009 - Joanne DeGroat, ECE, OSU

12

More Related Content

What's hot

Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmeticgavhays
 
Floating point representation
Floating point representationFloating point representation
Floating point representationmissstevenson01
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes VandanaPagar1
 
Number system and codes
Number system and codesNumber system and codes
Number system and codesAbhiraj Bohra
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital ElectronicsJanki Shah
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & DecoderSyed Saeed
 
Quick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationQuick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationRitu Ranjan Shrivastwa
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representationAnil Pokhrel
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...Arti Parab Academics
 

What's hot (20)

Binary codes
Binary codesBinary codes
Binary codes
 
Binary true ppt
Binary true pptBinary true ppt
Binary true ppt
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
Binary Tree Traversal
Binary Tree TraversalBinary Tree Traversal
Binary Tree Traversal
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & Decoder
 
Binary codes
Binary codesBinary codes
Binary codes
 
Quick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationQuick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representation
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representation
 
Bcd
BcdBcd
Bcd
 
Logic gates presentation
Logic gates presentationLogic gates presentation
Logic gates presentation
 
Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1
 
Encoder
EncoderEncoder
Encoder
 
Complement
ComplementComplement
Complement
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
 

Viewers also liked

Viewers also liked (20)

DEL-244Chep i
DEL-244Chep iDEL-244Chep i
DEL-244Chep i
 
Chap iii-Logic Gates
Chap iii-Logic GatesChap iii-Logic Gates
Chap iii-Logic Gates
 
Binary to grey code conversion
Binary to grey code conversionBinary to grey code conversion
Binary to grey code conversion
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converter
 
karnaugh maps
karnaugh mapskarnaugh maps
karnaugh maps
 
Flip flop& RAM ROM
Flip flop& RAM ROMFlip flop& RAM ROM
Flip flop& RAM ROM
 
The BCD to excess-3 converter
The BCD to excess-3 converterThe BCD to excess-3 converter
The BCD to excess-3 converter
 
Design of Binary to BCD Code Converter using Area Optimized Quantum Dot Cellu...
Design of Binary to BCD Code Converter using Area Optimized Quantum Dot Cellu...Design of Binary to BCD Code Converter using Area Optimized Quantum Dot Cellu...
Design of Binary to BCD Code Converter using Area Optimized Quantum Dot Cellu...
 
4 bit Binary to Gray converter using XOR
4 bit Binary to Gray converter using XOR4 bit Binary to Gray converter using XOR
4 bit Binary to Gray converter using XOR
 
Dlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} pptDlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} ppt
 
EVALUACIÓN
EVALUACIÓNEVALUACIÓN
EVALUACIÓN
 
Cookies and Session
Cookies and SessionCookies and Session
Cookies and Session
 
Hackers
HackersHackers
Hackers
 
Binary to gray converter using xor
Binary to gray converter using xor Binary to gray converter using xor
Binary to gray converter using xor
 
Logic Equation Simplification
Logic Equation SimplificationLogic Equation Simplification
Logic Equation Simplification
 
Hacking
Hacking Hacking
Hacking
 
Hacking
HackingHacking
Hacking
 
Hacker&cracker
Hacker&crackerHacker&cracker
Hacker&cracker
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Virus (Trojan Horse and Salami Attack)
Virus (Trojan Horse and Salami Attack)Virus (Trojan Horse and Salami Attack)
Virus (Trojan Horse and Salami Attack)
 

Similar to Chap ii.BCD code,Gray code

12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...JatinJatin30
 
Dee 2034 chapter 1 number and code system (Baia)
Dee 2034 chapter 1 number and code system (Baia)Dee 2034 chapter 1 number and code system (Baia)
Dee 2034 chapter 1 number and code system (Baia)SITI SABARIAH SALIHIN
 
Chapter 1 number and code system sss
Chapter 1 number and code system sssChapter 1 number and code system sss
Chapter 1 number and code system sssBaia Salihin
 
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.pptxLibanMohamed26
 
computer architecture organization in Ece
computer architecture organization in Ececomputer architecture organization in Ece
computer architecture organization in EceBayesayohannis
 
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.2ISMT College
 
Student IP Addressing Tutorial.ppt
Student IP Addressing Tutorial.pptStudent IP Addressing Tutorial.ppt
Student IP Addressing Tutorial.pptjohnBronson6
 
MODULE_2_Ch4_01082014.pptx .
MODULE_2_Ch4_01082014.pptx                   .MODULE_2_Ch4_01082014.pptx                   .
MODULE_2_Ch4_01082014.pptx .happycocoman
 
digital logic circuits, digital component floting and fixed point
 digital logic circuits, digital component floting and fixed point digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed pointRai University
 
3F4ecc.ppt
3F4ecc.ppt3F4ecc.ppt
3F4ecc.pptAnnymus
 
Switching theory Unit 1
Switching theory Unit 1Switching theory Unit 1
Switching theory Unit 1SURBHI SAROHA
 

Similar to Chap ii.BCD code,Gray code (20)

Binary and EC codes
Binary and EC codesBinary and EC codes
Binary and EC codes
 
DSD.pptx
DSD.pptxDSD.pptx
DSD.pptx
 
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
 
Computer-codes.pptx
Computer-codes.pptxComputer-codes.pptx
Computer-codes.pptx
 
Dee 2034 chapter 1 number and code system (Baia)
Dee 2034 chapter 1 number and code system (Baia)Dee 2034 chapter 1 number and code system (Baia)
Dee 2034 chapter 1 number and code system (Baia)
 
Chapter 1 number and code system sss
Chapter 1 number and code system sssChapter 1 number and code system sss
Chapter 1 number and code system sss
 
DLD-W3-L1.pptx
DLD-W3-L1.pptxDLD-W3-L1.pptx
DLD-W3-L1.pptx
 
Code conversion r006
Code conversion r006Code conversion r006
Code conversion r006
 
unit-3.pptx
unit-3.pptxunit-3.pptx
unit-3.pptx
 
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
 
computer architecture organization in Ece
computer architecture organization in Ececomputer architecture organization in Ece
computer architecture organization in Ece
 
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
 
Student IP Addressing Tutorial.ppt
Student IP Addressing Tutorial.pptStudent IP Addressing Tutorial.ppt
Student IP Addressing Tutorial.ppt
 
MODULE_2_Ch4_01082014.pptx .
MODULE_2_Ch4_01082014.pptx                   .MODULE_2_Ch4_01082014.pptx                   .
MODULE_2_Ch4_01082014.pptx .
 
Codes r005
Codes  r005Codes  r005
Codes r005
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
DLD_Lecture_notes2.ppt
DLD_Lecture_notes2.pptDLD_Lecture_notes2.ppt
DLD_Lecture_notes2.ppt
 
digital logic circuits, digital component floting and fixed point
 digital logic circuits, digital component floting and fixed point digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed point
 
3F4ecc.ppt
3F4ecc.ppt3F4ecc.ppt
3F4ecc.ppt
 
Switching theory Unit 1
Switching theory Unit 1Switching theory Unit 1
Switching theory Unit 1
 

More from Bala Ganesh

More from Bala Ganesh (20)

DDL,DML,1stNF
DDL,DML,1stNFDDL,DML,1stNF
DDL,DML,1stNF
 
sfdfds
sfdfdssfdfds
sfdfds
 
Dbms chapter viii
Dbms chapter viiiDbms chapter viii
Dbms chapter viii
 
Dbms chapter vii
Dbms chapter viiDbms chapter vii
Dbms chapter vii
 
Dbms chapter v
Dbms chapter vDbms chapter v
Dbms chapter v
 
Dbms chapter iv
Dbms chapter ivDbms chapter iv
Dbms chapter iv
 
Dbms chapter iii
Dbms chapter iiiDbms chapter iii
Dbms chapter iii
 
Dmbs chapter vi
Dmbs chapter viDmbs chapter vi
Dmbs chapter vi
 
Dbms chapter ii
Dbms chapter iiDbms chapter ii
Dbms chapter ii
 
Dbms chap i
Dbms chap iDbms chap i
Dbms chap i
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
 
Software testing
Software testingSoftware testing
Software testing
 
Design
DesignDesign
Design
 
Comp 107 cep 8
Comp 107 cep 8Comp 107 cep 8
Comp 107 cep 8
 
Comp 107 cep 7
Comp 107 cep 7Comp 107 cep 7
Comp 107 cep 7
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
Software Requirements
Software RequirementsSoftware Requirements
Software Requirements
 
Comp107 chep6
Comp107 chep6Comp107 chep6
Comp107 chep6
 
Comp 111chp iv vi
Comp 111chp iv viComp 111chp iv vi
Comp 111chp iv vi
 
Comp 111 cep ii
Comp 111 cep iiComp 111 cep ii
Comp 111 cep ii
 

Recently uploaded

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 

Recently uploaded (20)

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 

Chap ii.BCD code,Gray code

  • 1. Subject Name Digital Electronics and Logic Design Code DEL-244 Digital Electronics and Logic Design Credit Hours 3
  • 2. Subject Name Digital Electronics and Logic Design Code DEL-244 Credit Hours 3 Binary codes • Binary codes are codes which are represented in binary system with modification from the original ones. Below we will be seeing the following: • Weighted Binary Systems • Non Weighted Codes 2
  • 3. Subject Name Digital Electronics and Logic Design Code DEL-244 Credit Hours 3 Weighted Binary Systems • Weighted Binary Systems Weighted binary codes are those which obey the positional weighting principles, each position of the number represents a specific weight. The binary counting sequence is an example. 3
  • 4. Subject Name Digital Electronics and Logic Design Code DEL-244 Credit Hours 3 4
  • 5. Subject Name Digital Electronics and Logic Design Code DEL-244 Credit Hours 3 Gray code 5
  • 6. Subject Name Digital Electronics and Logic Design • • • • Code DEL-244 Credit Hours 3 8421 Code/BCD Code The BCD (Binary Coded Decimal) is a straight assignment of the binary equivalent. It is possible to assign weights to the binary bits according to their positions. The weights in the BCD code are 8,4,2,1. Example: The bit assignment 1001, can be seen by its weights to represent the decimal 9 because: 1x8+0x4+0x2+1x1 = 9 2421 Code This is a weighted code, its weights are 2, 4, 2 and 1. A decimal number is represented in 4-bit form and the total four bits weight is 2 + 4 + 2 + 1 = 9. Hence the 2421 code represents the decimal numbers from 0 to 9. 6
  • 7. Subject Name Digital Electronics and Logic Design Code DEL-244 Credit Hours 3 • Reflective Code A code is said to be reflective when code for 9 is complement for the code for 0, and so is for 8 and 1 codes, 7 and 2, 6 and 3, 5 and 4. Codes 2421, 5211, and excess-3 are reflective, whereas the 8421 code is not. • Sequential Codes A code is said to be sequential when two subsequent codes, seen as numbers in binary representation, differ by one. This greatly aids mathematical manipulation of data. The 8421 and Excess-3 codes are sequential, whereas the 2421 and 5211 codes are not. • Non Weighted Codes Non weighted codes are codes that are not positionally weighted. That is, each position within the binary number is not assigned a fixed value. • Excess-3 Code Excess-3 is a non weighted code used to express decimal numbers. The code derives its name from the fact that each binary code is the corresponding 8421 code plus 0011(3). • Example: 1000 of 8421 = 1011 in Excess-3 • 7
  • 8. Subject Name Digital Electronics and Logic Design • Code DEL-244 Credit Hours 3 Gray Code The gray code belongs to a class of codes called minimum change codes, in which only one bit in the code changes when moving from one code to the next. The Gray code is non-weighted code, as the position of bit does not contain any weight. The gray code is a reflective digital code which has the special property that any two subsequent numbers codes differ by only one bit. This is also called a unitdistance code. In digital Gray code has got a special place. 8
  • 9. Subject Name Digital Electronics and Logic Design Code DEL-244 Credit Hours 3 Two’s compliment • How do you represent a minus sign electronically in a computer? • How can you represent it such that arithmetic operations are manageable? • There are two types of compliments for each number base system. – Have the r’s complement – Have the (r-1)’s complement • For base 2 complement have 2’s complement 9/15/09 - L15 Decoders, Multiplexers Copyright 2009 - Joanne DeGroat, ECE, OSU and 1’s 9
  • 10. Subject Name Digital Electronics and Logic Design Code DEL-244 Credit Hours 3 1’s Complement • 1’s complement of N is defined as (2n -1)-N. – If n=4 have (2n -1) being 1 0000 - 1 = 1111 • So for n=4 would subtract any 4-bit binary number from 1111. • This is just inverting each bit. • Example: 1’s compliment of 1011001 is 0100110 9/15/09 - L15 Decoders, Multiplexers Copyright 2009 - Joanne DeGroat, ECE, OSU 10
  • 11. Subject Name Digital Electronics and Logic Design Code DEL-244 Credit Hours 3 2’s complement • The 2’s complement is defined as 2n-N • Can be done by subtraction of N from 2n or adding 1 to the 1’s complement of a number. • For 6 = 0110 – The 1’s complement is 1001 – The 2’s complement is 1010 9/15/09 - L15 Decoders, Multiplexers Copyright 2009 - Joanne DeGroat, ECE, OSU 11
  • 12. Subject Name Digital Electronics and Logic Design Code DEL-244 Credit Hours 3 Operation with 2’s complement • Add 4 and -6 • Will use the 2’s complement of -6 or 1010 – 4 – -6 – 0100 1010 1110 • And taking the 2’s complement of 1110 get 0001 + 1 = 0010 9/15/09 - L15 Decoders, Multiplexers Copyright 2009 - Joanne DeGroat, ECE, OSU 12