SlideShare a Scribd company logo
1 of 36
 The negative number has two representations:
a. complement representation
b. sign magnitude representation
Complement representation:
There are two ways of representing complement
numbers:
a. 1’s Complement
b. 2’s Complement
1’s complement of a binary number is obtained simply
by replacing each 1 by 0 and each 0 by 1. Alternately,
1’s complement of a binary can be obtained by
subtracting each bit from 1.
 Example: Find 1’s complement of (i) 011001 (ii)
00100111
Solution. (i) Replace each 1 by 0 and each 0 by 1
0 1 1 0 0 1
↓ ↓ ↓ ↓ ↓ ↓
1 0 0 1 1 0
So, 1’s complement of 011001 is 100110.
 (ii) Subtract each binary bit from 1.
1 1 1 1 1 1 1 1
–0 0 1 0 0 1 1 1
1 1 0 1 1 0 0 0 ← 1’s complement
one can see that both the method gives same
result.
2’s Complement
2’s complement of a binary number can be obtained
by adding 1 to its 1’s complement.
Example 1. Find 2’s complement of (i) 011001 (ii)
0101100
Solution. (i) 0 1 1 0 0 1 ← Number
1 0 0 1 1 0 ← 1’s complement
+ 1 ← Add 1 to 1’s complement
1 0 0 1 1 1 ← 2’s complement
(ii) 0 1 0 1 1 0 0 ← Number
1 0 1 0 0 1 1 ← 1’s complement
+ 1 ← Add 1 to 1’s complement
1 0 1 0 1 0 0 ← 2’s complement
 Before using any complement method for subtraction
equate the length of both minuendand subtrahend by
introducing leading zeros.
 1’s complement subtraction following are the rules for
subtraction using 1’s complement.
1. Take 1’s complement of subtrahend.
2. Add 1’s complement of subtrahend to minuend.
3. If a carry is produced by addition then add this carry to the
LSB of result. This is called as end around carry (EAC).
4. If carry is generated from MSB in step 2 then result is
positive. If no carry generated result is negative, and is in
1’s complement form.
 Example. Perform following subtraction using
1’s complement.
(i) 7 – 3 (ii) 3 – 7
Solution. (i) 7 – 3:
binary of 7 = (0111)2
binary of 3 = (0011)2
both numbers have equal length.
Step 1. 1’s complement of (0011)2 = (1100)2
In a broad sense we can classify the codes into
five groups:
(i) Weighted Binary codes
(ii) Non-weighted codes
(iii) Error–detecting codes
(iv) Error–correcting codes
(v) Alphanumeric codes.
 In weighted binary codes, each position of a number
represents a specific weight. The bits are multiplied by the
weights indicated; and the sum of these weighted bits gives
the equivalent decimal digit.
(a) Straight Binary coding is a method of representing a
decimal number by its binary equivalent.
 In BCD codes, individual decimal digits are coded in
binary notation and are operated upon singly. Thus
binary codes representing 0 to 9 decimal digits are
allowed. Therefore, all BCD codes have at least
four bits (∵ min. no. of bits required to encode to
decimal digits = 4)
For example, decimal 364 in BCD
3 → 0011
6 → 0110
4 → 0100
364 → 0011 0110 0100
 There are many binary coded decimal codes
(BCD) all of which are used to represent decimal
digits. Therefore, all BCD codes have atleast 4
bits and at least 6 unassigned or unused code
words.
 Some example of BCD codes are:
(a) 8421 BCD code, sometimes referred to as the
Natural Binary Coded Decimal Code (NBCD);
(b)* Excess-3 code (XS3);
(c)** 84 –2 –1 code (+8, +4, –2, –1);
(d) 2 4 2 1 code
Example: Lowest [643]10 into XS3 code
Decimal 6 4 3
Add 3 to each 3 3 3
Sum 9 7 6
Converting the sum into BCD code we have
9 7 6
↓ ↓ ↓
1001 0111 0110
Hence, XS3 for [643]10 = 1001 0111 0110
 The excess 3, 8 4–2–1 and 2421 BCD codes are also known
as self complementing codes.
 Self complementing property– 9’s complement of the
decimal number is easily obtained by changing 1’0 to 0’s
and 0’s to 1’s in corresponding codeword or the 9’s
complement of self complementing code word is the same
as its logical complement.
 Example. The decimal digit 3 in 8.4–2–1 code is coded as
0101. The 9’s complement of 3 is 6. The decimal digit 6 is
coded as 1010 that is 1’s complement of the code for 3. This
is termed as self complementing property.
 These codes are not positionally weighted.
This means that each position within a binary
number is not assigned a fixed value.
 Excess-3 codes
 Gray codes
are examples of nonweighted codes.
Gray code (Unit Distance code or Reflective code)
 There are applications in which it is desirable to represent
numerical as well as other information with a code that
changes in only one bit position from one code word to the
nextadjacent word.
 This class of code is called a unit distance code (UDC).
 These are sometimes also called as ‘cyclic’, ‘reflective’ or
‘gray’ code.
 These codes finds great applications in Boolean function
minimization using Karnaugh map.
 Binary information is transmitted from one device to
another by electric wires or other communication medium.
 A system that can not guarantee that the data received by
one device are identical to the data transmitted by another
device is essentially useless.
 Yet anytime data are transmitted from source to destination,
they can become corrupted in passage. Many factors,
including external noise, may change some of the bits from
0 to 1 or viceversa.
 Reliable systems must have a mechanism for detecting and
correcting such errors.
 In a single bit error, a 0 is changed to a 1 or a 1 is
changed to a 0.
 In a burst error, multiple (two or more) bits are
changed.
 The purpose of error detection code is to detect such bit
reversal errors.
 Error detection uses the concept of redundancy which
means adding extra bits for detecting errors at the
destination.
Four types of redundancy checks are used:
 Parity check or vertial redundancy check(VRC)
 longitudinal redundancy check (LRC)
 cyclic redundancy check (CRC) and
 checksum
 For a single bit error detection, the most common way
to achieve error detection is by means of a parity bit
 A parity bit is an extra bit (redundant bit) included with
a message to make the total number of 1’s transmitted
either odd or even.
 In LRC, a block of bits is organised in rows and columns
(table). For example, a block of 16 bits can be organised in
two rows and eight columns as shown in Fig.
 We then calcualte the parity bit (even parity/odd parity, here
we are using even parity) for each column and create a new
row of 8 bits, which are the parity bits for the whole block.
 CRC is most powerful of the redundancy checking
techniques.Cyclic redundancy check is based on
binary division.
 A sequence of redundant bits called CRC or CRC
remainder is appended to the end of a data unit.
 After adding CRC remainder, the resulting data
unit becomes exactly divisible by another
predetermined binary number.
 At the destination this data unit is divided by the
same binary number. If there is no remainder,
then there is no error.
 The CRC generator and CRC checker are
shown in Fig.(a) and Fig.(b) respectively.
Fig.(a) Fig.(b)
 The mechanism that we have covered upto this
point detect errors but do not correct them. Error
correction can be handled in two ways.
 In one, when an error is encountered the receiver
can request the sender to retransmit entire data
unit.
 In the other, a receiver can use an error correcting
code, which automatically corrects certain errors.

More Related Content

What's hot

Register in Digital Logic
Register in Digital LogicRegister in Digital Logic
Register in Digital LogicISMT College
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital ElectronicsJanki Shah
 
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to CountersISMT College
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE Tamim Tanvir
 
Registers
RegistersRegisters
RegistersGaditek
 
Digital Electronics - Counters
Digital Electronics - CountersDigital Electronics - Counters
Digital Electronics - CountersJayakrishnan J
 
Floating point representation
Floating point representationFloating point representation
Floating point representationmissstevenson01
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & DecoderSyed Saeed
 
Code conversions.pptx415.pptx
Code conversions.pptx415.pptxCode conversions.pptx415.pptx
Code conversions.pptx415.pptxMariaJoseph591921
 
Decoders-Digital Electronics
Decoders-Digital ElectronicsDecoders-Digital Electronics
Decoders-Digital ElectronicsPaurav Shah
 
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 )MdFazleRabbi18
 
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCETEC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCETSeshaVidhyaS
 

What's hot (20)

Register in Digital Logic
Register in Digital LogicRegister in Digital Logic
Register in Digital Logic
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to Counters
 
BCD ADDER
BCD ADDER BCD ADDER
BCD ADDER
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE
 
Registers
RegistersRegisters
Registers
 
Counters
CountersCounters
Counters
 
Digital Electronics - Counters
Digital Electronics - CountersDigital Electronics - Counters
Digital Electronics - Counters
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Subtractor (1)
Subtractor (1)Subtractor (1)
Subtractor (1)
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & Decoder
 
Code conversions.pptx415.pptx
Code conversions.pptx415.pptxCode conversions.pptx415.pptx
Code conversions.pptx415.pptx
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
 
Decoders-Digital Electronics
Decoders-Digital ElectronicsDecoders-Digital Electronics
Decoders-Digital Electronics
 
Subtractor
SubtractorSubtractor
Subtractor
 
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 )
 
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCETEC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
 
Two’s complement
Two’s complementTwo’s complement
Two’s complement
 

Viewers also liked

2s complement arithmetic
2s complement arithmetic2s complement arithmetic
2s complement arithmeticSanjay Saluth
 
Introduction number systems and conversion
 Introduction number systems and conversion Introduction number systems and conversion
Introduction number systems and conversionkanyuma jitjumnong
 
Computer number systems
Computer number systemsComputer number systems
Computer number systemsRevi Shahini
 
Number System
Number SystemNumber System
Number Systemitutor
 

Viewers also liked (10)

Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 
2s complement arithmetic
2s complement arithmetic2s complement arithmetic
2s complement arithmetic
 
Number system conversion
Number system conversionNumber system conversion
Number system conversion
 
Introduction number systems and conversion
 Introduction number systems and conversion Introduction number systems and conversion
Introduction number systems and conversion
 
Number System
Number SystemNumber System
Number System
 
Number system
Number systemNumber system
Number system
 
Conversion of number system
Conversion of number systemConversion of number system
Conversion of number system
 
Number system
Number system Number system
Number system
 
Computer number systems
Computer number systemsComputer number systems
Computer number systems
 
Number System
Number SystemNumber System
Number System
 

Similar to review of number systems and codes

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
 
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.pdfshubhangisonawane6
 
Chapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionChapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionJeoffnaRuth
 
Lecture 5 binary_codes
Lecture 5 binary_codesLecture 5 binary_codes
Lecture 5 binary_codesKamran Zafar
 
DLD_PPT_0.pptx
DLD_PPT_0.pptxDLD_PPT_0.pptx
DLD_PPT_0.pptxECENAAC2
 
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 arithmeticAmrutaMehata
 
error detection correction
error detection correctionerror detection correction
error detection correctionBishalWosti1
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptMarlonMagtibay2
 
Linear Block Codes
Linear Block CodesLinear Block Codes
Linear Block CodesNilaNila16
 
4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdf4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdfkenilpatel65
 
DCN Error Detection & Correction
DCN Error Detection & CorrectionDCN Error Detection & Correction
DCN Error Detection & CorrectionRohan Bhatkar
 
Lecture8_Error Detection and Correction 232.pptx
Lecture8_Error Detection and Correction 232.pptxLecture8_Error Detection and Correction 232.pptx
Lecture8_Error Detection and Correction 232.pptxMahabubAlam97
 
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...ARVIND PANDE
 

Similar to review of number systems and codes (20)

crc_checksum.pdf
crc_checksum.pdfcrc_checksum.pdf
crc_checksum.pdf
 
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
 
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
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Bcd with access 3
Bcd with access 3Bcd with access 3
Bcd with access 3
 
Binary codes
Binary codesBinary codes
Binary codes
 
Chapter 10: Error Correction and Detection
Chapter 10: Error Correction and DetectionChapter 10: Error Correction and Detection
Chapter 10: Error Correction and Detection
 
Lecture 5 binary_codes
Lecture 5 binary_codesLecture 5 binary_codes
Lecture 5 binary_codes
 
Code Converters & Parity Checker
Code Converters & Parity CheckerCode Converters & Parity Checker
Code Converters & Parity Checker
 
DLD_PPT_0.pptx
DLD_PPT_0.pptxDLD_PPT_0.pptx
DLD_PPT_0.pptx
 
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
 
error detection correction
error detection correctionerror detection correction
error detection correction
 
Number system
Number systemNumber system
Number system
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.ppt
 
Codes r005
Codes  r005Codes  r005
Codes r005
 
Linear Block Codes
Linear Block CodesLinear Block Codes
Linear Block Codes
 
4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdf4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdf
 
DCN Error Detection & Correction
DCN Error Detection & CorrectionDCN Error Detection & Correction
DCN Error Detection & Correction
 
Lecture8_Error Detection and Correction 232.pptx
Lecture8_Error Detection and Correction 232.pptxLecture8_Error Detection and Correction 232.pptx
Lecture8_Error Detection and Correction 232.pptx
 
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
Digital electronics & microprocessor Batu- s y computer engineering- arvind p...
 

More from srinu247

Power point presentation on Universal gravitational law for ICSE class IX stu...
Power point presentation on Universal gravitational law for ICSE class IX stu...Power point presentation on Universal gravitational law for ICSE class IX stu...
Power point presentation on Universal gravitational law for ICSE class IX stu...srinu247
 
Power point presentation on Laws of motion for ICSE class IX students
Power point presentation on Laws of motion for ICSE class IX studentsPower point presentation on Laws of motion for ICSE class IX students
Power point presentation on Laws of motion for ICSE class IX studentssrinu247
 
Power point presentation on Contact and non contact forces for ICSE class VII...
Power point presentation on Contact and non contact forces for ICSE class VII...Power point presentation on Contact and non contact forces for ICSE class VII...
Power point presentation on Contact and non contact forces for ICSE class VII...srinu247
 
Power Point Presentation on Motion in one dimension for ICSE VIII & IX students
Power Point Presentation on Motion in one dimension for ICSE VIII & IX studentsPower Point Presentation on Motion in one dimension for ICSE VIII & IX students
Power Point Presentation on Motion in one dimension for ICSE VIII & IX studentssrinu247
 
power point presentation on Pascals law and its applications for ICSE class IX
power point presentation on Pascals law and its applications for ICSE class IXpower point presentation on Pascals law and its applications for ICSE class IX
power point presentation on Pascals law and its applications for ICSE class IXsrinu247
 
power point presentation on Atmospheric pressure for class IX ICSE students
power point presentation on Atmospheric pressure for class IX ICSE studentspower point presentation on Atmospheric pressure for class IX ICSE students
power point presentation on Atmospheric pressure for class IX ICSE studentssrinu247
 
power point presentation on Pressure in Fluids for ICSE Class IX
power point presentation on Pressure in Fluids for ICSE Class IXpower point presentation on Pressure in Fluids for ICSE Class IX
power point presentation on Pressure in Fluids for ICSE Class IXsrinu247
 
power point presentation on Magnetism for ICSE class IX students
power point presentation on Magnetism for ICSE class IX studentspower point presentation on Magnetism for ICSE class IX students
power point presentation on Magnetism for ICSE class IX studentssrinu247
 

More from srinu247 (8)

Power point presentation on Universal gravitational law for ICSE class IX stu...
Power point presentation on Universal gravitational law for ICSE class IX stu...Power point presentation on Universal gravitational law for ICSE class IX stu...
Power point presentation on Universal gravitational law for ICSE class IX stu...
 
Power point presentation on Laws of motion for ICSE class IX students
Power point presentation on Laws of motion for ICSE class IX studentsPower point presentation on Laws of motion for ICSE class IX students
Power point presentation on Laws of motion for ICSE class IX students
 
Power point presentation on Contact and non contact forces for ICSE class VII...
Power point presentation on Contact and non contact forces for ICSE class VII...Power point presentation on Contact and non contact forces for ICSE class VII...
Power point presentation on Contact and non contact forces for ICSE class VII...
 
Power Point Presentation on Motion in one dimension for ICSE VIII & IX students
Power Point Presentation on Motion in one dimension for ICSE VIII & IX studentsPower Point Presentation on Motion in one dimension for ICSE VIII & IX students
Power Point Presentation on Motion in one dimension for ICSE VIII & IX students
 
power point presentation on Pascals law and its applications for ICSE class IX
power point presentation on Pascals law and its applications for ICSE class IXpower point presentation on Pascals law and its applications for ICSE class IX
power point presentation on Pascals law and its applications for ICSE class IX
 
power point presentation on Atmospheric pressure for class IX ICSE students
power point presentation on Atmospheric pressure for class IX ICSE studentspower point presentation on Atmospheric pressure for class IX ICSE students
power point presentation on Atmospheric pressure for class IX ICSE students
 
power point presentation on Pressure in Fluids for ICSE Class IX
power point presentation on Pressure in Fluids for ICSE Class IXpower point presentation on Pressure in Fluids for ICSE Class IX
power point presentation on Pressure in Fluids for ICSE Class IX
 
power point presentation on Magnetism for ICSE class IX students
power point presentation on Magnetism for ICSE class IX studentspower point presentation on Magnetism for ICSE class IX students
power point presentation on Magnetism for ICSE class IX students
 

Recently uploaded

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
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
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
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
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
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
 

Recently uploaded (20)

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
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
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
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🔝
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
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
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
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
 

review of number systems and codes

  • 1.  The negative number has two representations: a. complement representation b. sign magnitude representation Complement representation: There are two ways of representing complement numbers: a. 1’s Complement b. 2’s Complement
  • 2. 1’s complement of a binary number is obtained simply by replacing each 1 by 0 and each 0 by 1. Alternately, 1’s complement of a binary can be obtained by subtracting each bit from 1.  Example: Find 1’s complement of (i) 011001 (ii) 00100111 Solution. (i) Replace each 1 by 0 and each 0 by 1 0 1 1 0 0 1 ↓ ↓ ↓ ↓ ↓ ↓ 1 0 0 1 1 0 So, 1’s complement of 011001 is 100110.
  • 3.  (ii) Subtract each binary bit from 1. 1 1 1 1 1 1 1 1 –0 0 1 0 0 1 1 1 1 1 0 1 1 0 0 0 ← 1’s complement one can see that both the method gives same result. 2’s Complement 2’s complement of a binary number can be obtained by adding 1 to its 1’s complement. Example 1. Find 2’s complement of (i) 011001 (ii) 0101100
  • 4. Solution. (i) 0 1 1 0 0 1 ← Number 1 0 0 1 1 0 ← 1’s complement + 1 ← Add 1 to 1’s complement 1 0 0 1 1 1 ← 2’s complement (ii) 0 1 0 1 1 0 0 ← Number 1 0 1 0 0 1 1 ← 1’s complement + 1 ← Add 1 to 1’s complement 1 0 1 0 1 0 0 ← 2’s complement
  • 5.
  • 6.  Before using any complement method for subtraction equate the length of both minuendand subtrahend by introducing leading zeros.  1’s complement subtraction following are the rules for subtraction using 1’s complement. 1. Take 1’s complement of subtrahend. 2. Add 1’s complement of subtrahend to minuend. 3. If a carry is produced by addition then add this carry to the LSB of result. This is called as end around carry (EAC). 4. If carry is generated from MSB in step 2 then result is positive. If no carry generated result is negative, and is in 1’s complement form.
  • 7.  Example. Perform following subtraction using 1’s complement. (i) 7 – 3 (ii) 3 – 7 Solution. (i) 7 – 3: binary of 7 = (0111)2 binary of 3 = (0011)2 both numbers have equal length. Step 1. 1’s complement of (0011)2 = (1100)2
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. In a broad sense we can classify the codes into five groups: (i) Weighted Binary codes (ii) Non-weighted codes (iii) Error–detecting codes (iv) Error–correcting codes (v) Alphanumeric codes.
  • 19.  In weighted binary codes, each position of a number represents a specific weight. The bits are multiplied by the weights indicated; and the sum of these weighted bits gives the equivalent decimal digit. (a) Straight Binary coding is a method of representing a decimal number by its binary equivalent.
  • 20.  In BCD codes, individual decimal digits are coded in binary notation and are operated upon singly. Thus binary codes representing 0 to 9 decimal digits are allowed. Therefore, all BCD codes have at least four bits (∵ min. no. of bits required to encode to decimal digits = 4) For example, decimal 364 in BCD 3 → 0011 6 → 0110 4 → 0100 364 → 0011 0110 0100
  • 21.  There are many binary coded decimal codes (BCD) all of which are used to represent decimal digits. Therefore, all BCD codes have atleast 4 bits and at least 6 unassigned or unused code words.  Some example of BCD codes are: (a) 8421 BCD code, sometimes referred to as the Natural Binary Coded Decimal Code (NBCD); (b)* Excess-3 code (XS3); (c)** 84 –2 –1 code (+8, +4, –2, –1); (d) 2 4 2 1 code
  • 22.
  • 23. Example: Lowest [643]10 into XS3 code Decimal 6 4 3 Add 3 to each 3 3 3 Sum 9 7 6 Converting the sum into BCD code we have 9 7 6 ↓ ↓ ↓ 1001 0111 0110 Hence, XS3 for [643]10 = 1001 0111 0110
  • 24.  The excess 3, 8 4–2–1 and 2421 BCD codes are also known as self complementing codes.  Self complementing property– 9’s complement of the decimal number is easily obtained by changing 1’0 to 0’s and 0’s to 1’s in corresponding codeword or the 9’s complement of self complementing code word is the same as its logical complement.  Example. The decimal digit 3 in 8.4–2–1 code is coded as 0101. The 9’s complement of 3 is 6. The decimal digit 6 is coded as 1010 that is 1’s complement of the code for 3. This is termed as self complementing property.
  • 25.  These codes are not positionally weighted. This means that each position within a binary number is not assigned a fixed value.  Excess-3 codes  Gray codes are examples of nonweighted codes.
  • 26. Gray code (Unit Distance code or Reflective code)  There are applications in which it is desirable to represent numerical as well as other information with a code that changes in only one bit position from one code word to the nextadjacent word.  This class of code is called a unit distance code (UDC).  These are sometimes also called as ‘cyclic’, ‘reflective’ or ‘gray’ code.  These codes finds great applications in Boolean function minimization using Karnaugh map.
  • 27.
  • 28.  Binary information is transmitted from one device to another by electric wires or other communication medium.  A system that can not guarantee that the data received by one device are identical to the data transmitted by another device is essentially useless.  Yet anytime data are transmitted from source to destination, they can become corrupted in passage. Many factors, including external noise, may change some of the bits from 0 to 1 or viceversa.  Reliable systems must have a mechanism for detecting and correcting such errors.
  • 29.  In a single bit error, a 0 is changed to a 1 or a 1 is changed to a 0.  In a burst error, multiple (two or more) bits are changed.  The purpose of error detection code is to detect such bit reversal errors.  Error detection uses the concept of redundancy which means adding extra bits for detecting errors at the destination.
  • 30. Four types of redundancy checks are used:  Parity check or vertial redundancy check(VRC)  longitudinal redundancy check (LRC)  cyclic redundancy check (CRC) and  checksum
  • 31.  For a single bit error detection, the most common way to achieve error detection is by means of a parity bit  A parity bit is an extra bit (redundant bit) included with a message to make the total number of 1’s transmitted either odd or even.
  • 32.  In LRC, a block of bits is organised in rows and columns (table). For example, a block of 16 bits can be organised in two rows and eight columns as shown in Fig.  We then calcualte the parity bit (even parity/odd parity, here we are using even parity) for each column and create a new row of 8 bits, which are the parity bits for the whole block.
  • 33.  CRC is most powerful of the redundancy checking techniques.Cyclic redundancy check is based on binary division.  A sequence of redundant bits called CRC or CRC remainder is appended to the end of a data unit.  After adding CRC remainder, the resulting data unit becomes exactly divisible by another predetermined binary number.  At the destination this data unit is divided by the same binary number. If there is no remainder, then there is no error.
  • 34.  The CRC generator and CRC checker are shown in Fig.(a) and Fig.(b) respectively. Fig.(a) Fig.(b)
  • 35.
  • 36.  The mechanism that we have covered upto this point detect errors but do not correct them. Error correction can be handled in two ways.  In one, when an error is encountered the receiver can request the sender to retransmit entire data unit.  In the other, a receiver can use an error correcting code, which automatically corrects certain errors.