SlideShare a Scribd company logo
1 of 42
Download to read offline
Chapter 1
DATA REPRESENTATION
Number Systems


 Number system Base Coefficients
    Decimal     10     0–9
     Binary     2       0,1
     Octal      8      0–7
  Hexadecimal   16  0 – 9, A – F
Binary Shop
Base conversion

• From any base-r to Decimal
• From Decimal to any base-r
• From Binary to either Octal or Hexadecimal
• From either Octal or Hexadecimal to Binary
Binary to octal or hexadecimal

Binary To Octal
 Procedure:
   • Partition binary number into groups of 3
    digits
 Example:
   • (10110001101011.111100000110)2
    = ______________ 8
Binary to octal or hexadecimal

10 110 001 101 011 . 111 100 000 110 2
Binary to octal or hexadecimal

10 110 001 101 011 . 111 100 000 110 2


 2   6   1   5   3 .   7   4   0   6   8
Binary to octal or hexadecimal

Binary To Hexadecimal
 Procedure:
   • Partition binary number into groups of 4
    digits
 Example:
   • (10110001101011.11110010)2
     = ______________ 16
Binary to octal or hexadecimal

10 1100 0110 1011 . 1111 0010   2
Binary to octal or hexadecimal

10 1100 0110 1011 . 1111 0010   2



 2   C    6    B   .   F   2    16
Octal or hexadecimal to binary

Octal To Binary
 Procedure:
  • Each octal digit is converted to its 3-
   digit binary equivalent
 Example: (673.124)8 = _____ 2
Octal or hexadecimal to binary

 6   7   3   .   1   2   4   8
Octal or hexadecimal to binary

 6   7   3   .   1   2   4   8



110 111 011 . 001 010 100    2
Octal or hexadecimal to binary

Hexadecimal to Binary
 Procedure:
  • Each hexadecimal digit is converted to
   its 4-digit binary equivalent
 Example: (306.D)16 = _____ 2
Octal or hexadecimal to binary

    3   0    6   .   D   16
Octal or hexadecimal to binary

    3   0    6   .   D    16



  0011 0000 0110 . 1101   2
Any Other Number System

• In general, a number expressed in base-r has
r possible coefficients multiplied by powers of
r:

anrn + an-1rn-1 + an-2rn-2 +...+ a0r0 + a-1r-1 + a-2r-2 + ... + a-mr-m



where n = position of the coefficient
      coefficients = 0 to r-1
Example

Base 5 number
   coefficients: 0 to r-1 (0, 1, 2, 3, 4)

• (324.2)5
Example

Base 5 number
   coefficients: 0 to r-1 (0, 1, 2, 3, 4)

• (324.2)5
   = 3 x 52 + 2 x 51 + 4 x 50 + 2 x 5-1
   = 89.410
Example

Base 5 number
   coefficients: 0 to r-1 (0, 1, 2, 3, 4)

• (324.2)5
   = 3 x 52 + 2 x 51 + 4 x 50 + 2 x 5-1
   = 89.410
• (4021)5
Example

Base 5 number
   coefficients: 0 to r-1 (0, 1, 2, 3, 4)

• (324.2)5
   = 3 x 52 + 2 x 51 + 4 x 50 + 2 x 5-1
   = 89.410
• (4021)5
   = 4 x 53 + 0 x 5 2 + 2 x 5 1 + 1 x 5 0
   = 51110
Fixed-Point Representation

Unsigned Number
  leftmost bit is the
   most significant bit
  Example:

   • 01001 = 9
   • 11001 = 25
Fixed-Point Representation

Unsigned Number           Signed Number
  leftmost bit is the      leftmost bit
   most significant bit      represents the sign
  Example:                 Example:

   • 01001 = 9               • 01001= +9
   • 11001 = 25              • 11001= - 9
Systems Used to Represent Negative Numbers

Signed-Magnitude Representation
    A number consists of a magnitude and a symbol
     indicating whether the magnitude is positive or
     negative.

Examples:
     +85 = 010101012           -85 = 110101012
     +127 = 011111112          -127 = 111111112
Systems Used to Represent Negative Numbers


Signed-Complement System
• This system negates a number by taking its
  complement as defined by the system.
• Types of complements:
   – Radix-complement
   – Diminished Radix-complement
Complements

• Diminished Radix                 • Radix Complement
  Complement                        General Formula:
 General Formula:                   r’s C of N = rn - N
 (r-1)’s C of N = (rn - r-m) - N    where
 where                              n = # of bits
 n = # of digits (integer)          r = base/radix
 m = # of digits (fraction)         N = the given # in
 r = base/radix                          base-r
 N = the given # in base-r
Complements

Examples
 9’s C
  • 012390 = 987609
  • 54670.5 = 45329.4
 10’s C

  • 012390 = 987610
  • 54670.5 = 45329.5
Complements

Examples                Examples
 9’s C                   1’s C
  • 012390 = 987609        • 1101100 = 0010011
  • 54670.5 = 45329.4      • 0110111 = 1001000
 10’s C                  2’s C

  • 012390 = 987610        • 1101100 = 0010100
  • 54670.5 = 45329.5      • 0110111 = 1001001
Binary Codes

Code – a set of n-bit strings in which different
bit strings represent different numbers or
other things.
Binary codes are used for:
  Decimal numbers
  Character codes
Binary codes for decimal numbers

At least four bits are needed to represent
ten decimal digits.
Some binary codes:
  BCD (Binary-coded decimal)
  Excess-3

  Biquinary
Binary codes for decimal numbers

BCD                       Excess-3 Code
 straight assignment       unweighted code
                            BCD + 3
  of the binary
  equivalent
 weights can be
                          Biquinary Code
                            seven-bit code with
  assigned to the            error detection
  binary bits according      properties
  to their position         each decimal digit
                             consists of 5 0’s and
                             2 1’s
Binary codes for the decimal digits

 Decimal   BCD Excess-3 84-2-1 2421 Biquinary
  Digit    8421                     5043210
    0      0000 0011     0000 0000 0100001
    1      0001 0100     0111 0001 0100010
    2      0010 0101     0110 0010 0100100
    3      0011 0110     0101 0011 0101000
    4      0100 0111     0100 0100 0110000
    5      0101 1000     1011 1011 1000001
    6      0110 1001     1010 1100 1000010
    7      0111 1010     1001 1101 1000100
    8      1000 1011     1000 1110 1001000
    9      1001 1100     1111 1111 1010000
Differences between Binary and BCD

• BCDis not a number system
• BCD requires more bits than Binary
• BCD is less efficient than Binary
• BCD is easier to use than Binary
Coding vs Conversion

Conversion
  bits obtained are binary digits
  Example: 13 = 1101


Coding
  bits obtained are combinations of 0’s and 1’s
  Example: 13 = 0001 0011
Character Code

American Standard        Extended Binary
Code for Information     Coded Decimal
Exchange                 Interchange Code
  7-bit code              8-bit code
  contains 94 graphic     last 4 bits range from

   chars and 34 non-        0000-1001
   printing chars
Gray code
• It is a binary number
                                    Binary   Gray
  system where two        Decimal
                                    code     code
  successive values          0       000      000
  differ in only one         1       001      001
                             2       010      011
  digit, originally          3       011      010
  designed to prevent        4       100      110
                             5       101      111
  spurious output from       6       110      101
  electromechanical          7       111      100
  switches.
Number Representations

• No representation     • Various methods
method is capable of      can be used:
representing all real     – Fixed-point number
                          system
numbers
                          – Rational number
• Most real values        system
must be represented       – Floating point
by an approximation       number system
                          – Logarithmic number
                          system
Fixed-point representation

• It is a method used to represent integer
  values.
• Disadvantages
  – Very small real numbers are not clearly
  distinguished
  – Very large real numbers are not known
  accurately enough
Floating-point Representation

• It is a method used to represent real
  numbers
• Notation:
  – Mantissa x Baseexponent
• Example
  1 1000011 000100101100000000000000
    = - 300.0
Activity
Activity




01110111 01100101 01101100 01100011
  01101111 01101101 01100101
Activity                  97 = ‘a’




01110111 01100101 01101100 01100011
  01101111 01101101 01100101

More Related Content

What's hot

Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notesKurenai Ryu
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpuWan Afirah
 
Number systems
Number systemsNumber systems
Number systemsthechamp3
 
Binary coded decimal r004
Binary coded decimal   r004Binary coded decimal   r004
Binary coded decimal r004arunachalamr16
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Frankie Jones
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number systemAswiniT3
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental Aman anand kumar
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersMohammad Bashartullah
 
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...Arti Parab Academics
 
data representation
 data representation data representation
data representationHaroon_007
 
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsChapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsSSE_AndyLi
 
Introduction of number system
Introduction of number systemIntroduction of number system
Introduction of number systemAswiniT3
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsImran Waris
 

What's hot (20)

Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notes
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpu
 
Number systems
Number systemsNumber systems
Number systems
 
Number system
Number systemNumber system
Number system
 
Binary coded decimal r004
Binary coded decimal   r004Binary coded decimal   r004
Binary coded decimal r004
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)
 
Alu1
Alu1Alu1
Alu1
 
06 floating point
06 floating point06 floating point
06 floating point
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number system
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 
Number system
Number systemNumber system
Number system
 
number system
number systemnumber system
number system
 
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 representation data representation
data representation
 
Number system
Number systemNumber system
Number system
 
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic CircuitsChapter 07 Digital Alrithmetic and Arithmetic Circuits
Chapter 07 Digital Alrithmetic and Arithmetic Circuits
 
Introduction of number system
Introduction of number systemIntroduction of number system
Introduction of number system
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systems
 
Number system
Number systemNumber system
Number system
 

Similar to Chapter1b

Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effectsPeriyanayagiS
 
Digital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfDigital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfKannan Kanagaraj
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfMdJubayerFaisalEmon
 
Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:Asif Iqbal
 
Boolean Algebra Arithmetic SIG UNSIGN.ppt
Boolean Algebra  Arithmetic SIG UNSIGN.pptBoolean Algebra  Arithmetic SIG UNSIGN.ppt
Boolean Algebra Arithmetic SIG UNSIGN.pptAshishChandrakar12
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptxGobinathAECEJRF1101
 
Standard 9th Number System Power point presentation
Standard 9th Number System Power point presentationStandard 9th Number System Power point presentation
Standard 9th Number System Power point presentationhemangipednekar0812
 
Chapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.pptChapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.pptAparnaDas827261
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptxAminaZahid16
 
Lecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionLecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionMubashir Ali
 

Similar to Chapter1b (20)

Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
 
Module 2_Data representations.pdf
Module 2_Data representations.pdfModule 2_Data representations.pdf
Module 2_Data representations.pdf
 
Digital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfDigital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdf
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdf
 
Digital Logic
Digital LogicDigital Logic
Digital Logic
 
Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
Boolean Algebra Arithmetic SIG UNSIGN.ppt
Boolean Algebra  Arithmetic SIG UNSIGN.pptBoolean Algebra  Arithmetic SIG UNSIGN.ppt
Boolean Algebra Arithmetic SIG UNSIGN.ppt
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx
 
DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
 
Standard 9th Number System Power point presentation
Standard 9th Number System Power point presentationStandard 9th Number System Power point presentation
Standard 9th Number System Power point presentation
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Lecture 2 ns
Lecture 2 nsLecture 2 ns
Lecture 2 ns
 
Cse115 lecture01numbersystems
Cse115 lecture01numbersystemsCse115 lecture01numbersystems
Cse115 lecture01numbersystems
 
Code conversion r006
Code conversion r006Code conversion r006
Code conversion r006
 
Chapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.pptChapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.ppt
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
 
Lecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionLecture-2(2): Number System & Conversion
Lecture-2(2): Number System & Conversion
 

More from MaeEstherMaguadMaralit (15)

Chapter2c
Chapter2cChapter2c
Chapter2c
 
Chapter2b
Chapter2bChapter2b
Chapter2b
 
Chapter2a
Chapter2aChapter2a
Chapter2a
 
Chapter1c
Chapter1cChapter1c
Chapter1c
 
Chapter1b
Chapter1bChapter1b
Chapter1b
 
Chapter1a
Chapter1aChapter1a
Chapter1a
 
Chapter2d
Chapter2dChapter2d
Chapter2d
 
linked list (CMSC 123)
linked list (CMSC 123)linked list (CMSC 123)
linked list (CMSC 123)
 
HTTP
HTTPHTTP
HTTP
 
The lovedare
The lovedareThe lovedare
The lovedare
 
Cmsc 100 (web content)
Cmsc 100  (web content)Cmsc 100  (web content)
Cmsc 100 (web content)
 
Cmsc 100 (web forms)
Cmsc 100 (web forms)Cmsc 100 (web forms)
Cmsc 100 (web forms)
 
Cmsc 100 xhtml and css
Cmsc 100 xhtml and cssCmsc 100 xhtml and css
Cmsc 100 xhtml and css
 
Cmsc 100 (web programming in a nutshell)
Cmsc 100 (web programming in a nutshell)Cmsc 100 (web programming in a nutshell)
Cmsc 100 (web programming in a nutshell)
 
Chapter2a
Chapter2aChapter2a
Chapter2a
 

Chapter1b

  • 2. Number Systems Number system Base Coefficients Decimal 10 0–9 Binary 2 0,1 Octal 8 0–7 Hexadecimal 16 0 – 9, A – F
  • 4. Base conversion • From any base-r to Decimal • From Decimal to any base-r • From Binary to either Octal or Hexadecimal • From either Octal or Hexadecimal to Binary
  • 5. Binary to octal or hexadecimal Binary To Octal Procedure: • Partition binary number into groups of 3 digits Example: • (10110001101011.111100000110)2 = ______________ 8
  • 6. Binary to octal or hexadecimal 10 110 001 101 011 . 111 100 000 110 2
  • 7. Binary to octal or hexadecimal 10 110 001 101 011 . 111 100 000 110 2 2 6 1 5 3 . 7 4 0 6 8
  • 8. Binary to octal or hexadecimal Binary To Hexadecimal Procedure: • Partition binary number into groups of 4 digits Example: • (10110001101011.11110010)2 = ______________ 16
  • 9. Binary to octal or hexadecimal 10 1100 0110 1011 . 1111 0010 2
  • 10. Binary to octal or hexadecimal 10 1100 0110 1011 . 1111 0010 2 2 C 6 B . F 2 16
  • 11. Octal or hexadecimal to binary Octal To Binary Procedure: • Each octal digit is converted to its 3- digit binary equivalent Example: (673.124)8 = _____ 2
  • 12. Octal or hexadecimal to binary 6 7 3 . 1 2 4 8
  • 13. Octal or hexadecimal to binary 6 7 3 . 1 2 4 8 110 111 011 . 001 010 100 2
  • 14. Octal or hexadecimal to binary Hexadecimal to Binary Procedure: • Each hexadecimal digit is converted to its 4-digit binary equivalent Example: (306.D)16 = _____ 2
  • 15. Octal or hexadecimal to binary 3 0 6 . D 16
  • 16. Octal or hexadecimal to binary 3 0 6 . D 16 0011 0000 0110 . 1101 2
  • 17. Any Other Number System • In general, a number expressed in base-r has r possible coefficients multiplied by powers of r: anrn + an-1rn-1 + an-2rn-2 +...+ a0r0 + a-1r-1 + a-2r-2 + ... + a-mr-m where n = position of the coefficient coefficients = 0 to r-1
  • 18. Example Base 5 number coefficients: 0 to r-1 (0, 1, 2, 3, 4) • (324.2)5
  • 19. Example Base 5 number coefficients: 0 to r-1 (0, 1, 2, 3, 4) • (324.2)5 = 3 x 52 + 2 x 51 + 4 x 50 + 2 x 5-1 = 89.410
  • 20. Example Base 5 number coefficients: 0 to r-1 (0, 1, 2, 3, 4) • (324.2)5 = 3 x 52 + 2 x 51 + 4 x 50 + 2 x 5-1 = 89.410 • (4021)5
  • 21. Example Base 5 number coefficients: 0 to r-1 (0, 1, 2, 3, 4) • (324.2)5 = 3 x 52 + 2 x 51 + 4 x 50 + 2 x 5-1 = 89.410 • (4021)5 = 4 x 53 + 0 x 5 2 + 2 x 5 1 + 1 x 5 0 = 51110
  • 22. Fixed-Point Representation Unsigned Number  leftmost bit is the most significant bit  Example: • 01001 = 9 • 11001 = 25
  • 23. Fixed-Point Representation Unsigned Number Signed Number  leftmost bit is the  leftmost bit most significant bit represents the sign  Example:  Example: • 01001 = 9 • 01001= +9 • 11001 = 25 • 11001= - 9
  • 24. Systems Used to Represent Negative Numbers Signed-Magnitude Representation  A number consists of a magnitude and a symbol indicating whether the magnitude is positive or negative. Examples: +85 = 010101012 -85 = 110101012 +127 = 011111112 -127 = 111111112
  • 25. Systems Used to Represent Negative Numbers Signed-Complement System • This system negates a number by taking its complement as defined by the system. • Types of complements: – Radix-complement – Diminished Radix-complement
  • 26. Complements • Diminished Radix • Radix Complement Complement General Formula: General Formula: r’s C of N = rn - N (r-1)’s C of N = (rn - r-m) - N where where n = # of bits n = # of digits (integer) r = base/radix m = # of digits (fraction) N = the given # in r = base/radix base-r N = the given # in base-r
  • 27. Complements Examples  9’s C • 012390 = 987609 • 54670.5 = 45329.4  10’s C • 012390 = 987610 • 54670.5 = 45329.5
  • 28. Complements Examples Examples  9’s C  1’s C • 012390 = 987609 • 1101100 = 0010011 • 54670.5 = 45329.4 • 0110111 = 1001000  10’s C  2’s C • 012390 = 987610 • 1101100 = 0010100 • 54670.5 = 45329.5 • 0110111 = 1001001
  • 29. Binary Codes Code – a set of n-bit strings in which different bit strings represent different numbers or other things. Binary codes are used for:  Decimal numbers  Character codes
  • 30. Binary codes for decimal numbers At least four bits are needed to represent ten decimal digits. Some binary codes:  BCD (Binary-coded decimal)  Excess-3  Biquinary
  • 31. Binary codes for decimal numbers BCD Excess-3 Code  straight assignment  unweighted code  BCD + 3 of the binary equivalent  weights can be Biquinary Code  seven-bit code with assigned to the error detection binary bits according properties to their position  each decimal digit consists of 5 0’s and 2 1’s
  • 32. Binary codes for the decimal digits Decimal BCD Excess-3 84-2-1 2421 Biquinary Digit 8421 5043210 0 0000 0011 0000 0000 0100001 1 0001 0100 0111 0001 0100010 2 0010 0101 0110 0010 0100100 3 0011 0110 0101 0011 0101000 4 0100 0111 0100 0100 0110000 5 0101 1000 1011 1011 1000001 6 0110 1001 1010 1100 1000010 7 0111 1010 1001 1101 1000100 8 1000 1011 1000 1110 1001000 9 1001 1100 1111 1111 1010000
  • 33. Differences between Binary and BCD • BCDis not a number system • BCD requires more bits than Binary • BCD is less efficient than Binary • BCD is easier to use than Binary
  • 34. Coding vs Conversion Conversion  bits obtained are binary digits  Example: 13 = 1101 Coding  bits obtained are combinations of 0’s and 1’s  Example: 13 = 0001 0011
  • 35. Character Code American Standard Extended Binary Code for Information Coded Decimal Exchange Interchange Code  7-bit code  8-bit code  contains 94 graphic  last 4 bits range from chars and 34 non- 0000-1001 printing chars
  • 36. Gray code • It is a binary number Binary Gray system where two Decimal code code successive values 0 000 000 differ in only one 1 001 001 2 010 011 digit, originally 3 011 010 designed to prevent 4 100 110 5 101 111 spurious output from 6 110 101 electromechanical 7 111 100 switches.
  • 37. Number Representations • No representation • Various methods method is capable of can be used: representing all real – Fixed-point number system numbers – Rational number • Most real values system must be represented – Floating point by an approximation number system – Logarithmic number system
  • 38. Fixed-point representation • It is a method used to represent integer values. • Disadvantages – Very small real numbers are not clearly distinguished – Very large real numbers are not known accurately enough
  • 39. Floating-point Representation • It is a method used to represent real numbers • Notation: – Mantissa x Baseexponent • Example 1 1000011 000100101100000000000000 = - 300.0
  • 41. Activity 01110111 01100101 01101100 01100011 01101111 01101101 01100101
  • 42. Activity 97 = ‘a’ 01110111 01100101 01101100 01100011 01101111 01101101 01100101