SlideShare a Scribd company logo
1’s and 2’s complement
• Binary number system is the type of most
popular Number Representation
techniques that used in digital systems.
• In the Binary System, there are only two
symbols or possible digit values, i.e., 0 (off)
and 1 (on). Represented by any device that
only 2 operating states or possible conditions.
1’s complement
• 1’s complement of a given binary number is
obtained by replacing 1 instead of 0 and 0
instead of 1
Find out 1’s complement of binary number
• 101101 1’s complement is 010010
• 111001 1’s complement is 000110
• 01010110 1’s complement is 10101001
• Example-1: Find 1’s complement of binary
number 10101110.
• Example-2: Find 1’s complement of binary
number 10001.001.
• Example-3: Find 1’s complement of each 3 bit
binary number.
2’s complement
• 2’s complement of a given binary number is obtained
by adding1 to 1’s complement
Find out 2’s complement of binary number
• 101101
1’s complement is 010010
2’s complement is 010010+1=010011
• 111001
1’s complement is 000110
2’s complement is 000110+1=000111
• 01010110
1’s complement is 10101001
2’s comp.. is 10101001+1=10101010
5.0 Binary-Coded-Decimal (BCD)
• Conversions between decimal and binary can become long and
complicated for large numbers.
• For example, convert 87410 to binary. The answer is 11011010102,
but it takes quite a lot of time and effort to make this conversion. We
call this straight binary coding.
5.1 Binary-Coded-Decimal (BCD)
• The Binary-Coded-Decimal (BCD) code makes conversion much
easier. Each decimal digit, 0 through 9, is represented with a 4-Bit
BCD code as shown below. The BCD code 1010, 1011, 1100, 1101,
1110 and 1111 are not used.
• Conversion between BCD and decimal is accomplished by replacing
a 4-bit BCD for each decimal digit. For example, 87410 = 1000 0111
0100BCD.
• BCD is not another number system like binary, octal, decimal and
hexadecimal. It is in fact the decimal system with each digit encoded
in its binary equivalent. A BCD code is not the same as a straight
binary number. For example, the BCD code requires 12 bits, while
the straight binary number requires only 10 bits to represent 87310.
5.2 Decimal  BCD Conversion
• A BCD code is converted into a decimal number by taking groups of
4 bits, starting from LSB, and replacing them with a BCD code. For
example, 1 1001 0111 1000 BCD = 197810
5.3 BCD  Decimal Conversion
BCD ADDITION:-
• Addition of BCD (8421) is performed by
adding two digits of binary, starting from least
significant digit. In case if
• the result is an illegal code (greater than 9) or
if there is a carry out of one then add 0110(6)
and add the
• resulting carry to the next most significant.
compliment representation and code ascii
BCD SUBTRACTION:-
• The BCD subtraction is performed by subtracting
the digits of each 4 – bit group of the subtrahend
from corresponding 4 – bit group of the minuend
in the binary starting from the LSD.
• If there is no borrow from the next higher group
then no correction is required. If there is a
borrow from the next group, then 6 (0110) is
subtracted from the difference term of this
group.
• For example:-
• Subtract 147.8 from 206.7 using 8421 BCD code.
compliment representation and code ascii
compliment representation and code ascii
compliment representation and code ascii
compliment representation and code ascii

More Related Content

PPTX
Digital Module 2.pptx Digital logic design
PPTX
Digital Module 1.pptx Digital logic design
PDF
Representasi Data, SISTEM BILANGAN, KODE BILANGAN
PPTX
Unit-1 (DLD) Lecture 2.pptx
PPTX
ELECTRICAL 411 L1 Digital Electronics.pptx
PDF
UNIT-1- Logic gates and Boolean algebras
PPTX
Number system in Digital Electronics
PDF
uyuyuy.pdf
Digital Module 2.pptx Digital logic design
Digital Module 1.pptx Digital logic design
Representasi Data, SISTEM BILANGAN, KODE BILANGAN
Unit-1 (DLD) Lecture 2.pptx
ELECTRICAL 411 L1 Digital Electronics.pptx
UNIT-1- Logic gates and Boolean algebras
Number system in Digital Electronics
uyuyuy.pdf

Similar to compliment representation and code ascii (20)

PPTX
Lecture # 3-4 Number Systems. DIGITALSS
PPT
Binary coded decimal r004
PDF
Digital Logic Computer Design lecture notes
PPTX
Binary true ppt
PPTX
Number System and Conversions.pptx
PDF
Number system utm notes
PPTX
Number_system_B.pharm_2nd_BP205T_Unit_1_Ravi.pptx
PPT
Code conversion r006
DOCX
binary-numbers-system.doc.docx
PDF
Digital Logic
PDF
Module 2_Data representations.pdf
PPT
Digital fundamendals r001a
PPTX
micro processor and its architecture unit1.pptx
PPT
2. Computer_Organization_unit_ 1_win.ppt
PPTX
Lecture 7 Data Representation (1).pptx for computer organization and architec...
PPT
Number System- binary octal hexadecimal numbers
PPTX
number system
PPT
02 number systems
Lecture # 3-4 Number Systems. DIGITALSS
Binary coded decimal r004
Digital Logic Computer Design lecture notes
Binary true ppt
Number System and Conversions.pptx
Number system utm notes
Number_system_B.pharm_2nd_BP205T_Unit_1_Ravi.pptx
Code conversion r006
binary-numbers-system.doc.docx
Digital Logic
Module 2_Data representations.pdf
Digital fundamendals r001a
micro processor and its architecture unit1.pptx
2. Computer_Organization_unit_ 1_win.ppt
Lecture 7 Data Representation (1).pptx for computer organization and architec...
Number System- binary octal hexadecimal numbers
number system
02 number systems
Ad

More from garimajain959768 (6)

PPT
Flip Flops sequential circuit and types
PPTX
Transport layer security computer network.pptx
PPTX
health info clinical data warehouse.pptx
PPTX
classes and importance of tuberculosis.pptx
PPT
information for world ozone day with importance
PPTX
MODULE 2 computer vision part 2 depth estimation
Flip Flops sequential circuit and types
Transport layer security computer network.pptx
health info clinical data warehouse.pptx
classes and importance of tuberculosis.pptx
information for world ozone day with importance
MODULE 2 computer vision part 2 depth estimation
Ad

Recently uploaded (20)

PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
Current and future trends in Computer Vision.pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
additive manufacturing of ss316l using mig welding
DOCX
573137875-Attendance-Management-System-original
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Geodesy 1.pptx...............................................
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
web development for engineering and engineering
PDF
Well-logging-methods_new................
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Current and future trends in Computer Vision.pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Automation-in-Manufacturing-Chapter-Introduction.pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
additive manufacturing of ss316l using mig welding
573137875-Attendance-Management-System-original
R24 SURVEYING LAB MANUAL for civil enggi
CH1 Production IntroductoryConcepts.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Embodied AI: Ushering in the Next Era of Intelligent Systems
Lecture Notes Electrical Wiring System Components
Geodesy 1.pptx...............................................
Safety Seminar civil to be ensured for safe working.
web development for engineering and engineering
Well-logging-methods_new................
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Model Code of Practice - Construction Work - 21102022 .pdf

compliment representation and code ascii

  • 1. 1’s and 2’s complement
  • 2. • Binary number system is the type of most popular Number Representation techniques that used in digital systems. • In the Binary System, there are only two symbols or possible digit values, i.e., 0 (off) and 1 (on). Represented by any device that only 2 operating states or possible conditions.
  • 3. 1’s complement • 1’s complement of a given binary number is obtained by replacing 1 instead of 0 and 0 instead of 1 Find out 1’s complement of binary number • 101101 1’s complement is 010010 • 111001 1’s complement is 000110 • 01010110 1’s complement is 10101001
  • 4. • Example-1: Find 1’s complement of binary number 10101110. • Example-2: Find 1’s complement of binary number 10001.001. • Example-3: Find 1’s complement of each 3 bit binary number.
  • 5. 2’s complement • 2’s complement of a given binary number is obtained by adding1 to 1’s complement Find out 2’s complement of binary number • 101101 1’s complement is 010010 2’s complement is 010010+1=010011 • 111001 1’s complement is 000110 2’s complement is 000110+1=000111 • 01010110 1’s complement is 10101001 2’s comp.. is 10101001+1=10101010
  • 6. 5.0 Binary-Coded-Decimal (BCD) • Conversions between decimal and binary can become long and complicated for large numbers. • For example, convert 87410 to binary. The answer is 11011010102, but it takes quite a lot of time and effort to make this conversion. We call this straight binary coding.
  • 7. 5.1 Binary-Coded-Decimal (BCD) • The Binary-Coded-Decimal (BCD) code makes conversion much easier. Each decimal digit, 0 through 9, is represented with a 4-Bit BCD code as shown below. The BCD code 1010, 1011, 1100, 1101, 1110 and 1111 are not used.
  • 8. • Conversion between BCD and decimal is accomplished by replacing a 4-bit BCD for each decimal digit. For example, 87410 = 1000 0111 0100BCD. • BCD is not another number system like binary, octal, decimal and hexadecimal. It is in fact the decimal system with each digit encoded in its binary equivalent. A BCD code is not the same as a straight binary number. For example, the BCD code requires 12 bits, while the straight binary number requires only 10 bits to represent 87310. 5.2 Decimal  BCD Conversion
  • 9. • A BCD code is converted into a decimal number by taking groups of 4 bits, starting from LSB, and replacing them with a BCD code. For example, 1 1001 0111 1000 BCD = 197810 5.3 BCD  Decimal Conversion
  • 10. BCD ADDITION:- • Addition of BCD (8421) is performed by adding two digits of binary, starting from least significant digit. In case if • the result is an illegal code (greater than 9) or if there is a carry out of one then add 0110(6) and add the • resulting carry to the next most significant.
  • 12. BCD SUBTRACTION:- • The BCD subtraction is performed by subtracting the digits of each 4 – bit group of the subtrahend from corresponding 4 – bit group of the minuend in the binary starting from the LSD. • If there is no borrow from the next higher group then no correction is required. If there is a borrow from the next group, then 6 (0110) is subtracted from the difference term of this group. • For example:- • Subtract 147.8 from 206.7 using 8421 BCD code.