SlideShare uma empresa Scribd logo
1 de 59
Lesson 1
Basic Theory of Information
Number System
 Number
    It is a symbol representing a unit or quantity.
 Number     System
    Defines a set of symbols used to represent
     quantity
 Radix
    The base or radix of number system determines
     how many numerical digits the number system
     uses.
Types of Number System
 Decimal System
 Binary Number System

 Octal Number System

 Hexadecimal Number System
Decimal Number System
 Ingenious   method of expressing all numbers
  by means of tens symbols originated from
  India. It is widely used and is based on the
  ten fingers of a human being.
 It makes use of ten numeric symbols
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Inherent Value and Positional Value

   The inherent value of a symbol is the value of that
    symbol standing alone.
       Example 6 in number 256, 165, 698
         The symbol is related to the quantity six, even if it is used in
          different number positions
   The positional value of a numeric symbol is
    directly related to the base of a system.
       In the case of decimal system, each position has a
        value of 10 times greater that the position to its right.
        Example: 423, the symbol 3 represents the ones (units), the
        symbol 2 represents the tens position (10 x 1), and the symbol
        4 represents the hundreds position (10 x 10). In other words,
        each symbol move to the left represents an increase in the
        value of the position by a factor of ten.
Inherent and Positional Value cont.

2539 = 2X1000 + 5X100 + 3X10 + 9X1
     = 2X103 + 5X102 + 3X101 + 9 x100

This means that positional value of symbol 2 is
  1000 or using the base 10 it is 103
Binary Number System
 Uses   only two numeric symbols 1 and 0
    Under the binary system, each position has a
     value 2 times greater than the position to the
     right.
Octal Number System
 Octalnumber system is using 8 digits to
 represent numbers. The highest value = 7.
 Each column represents a power of 8. Octal
 numbers are represented with the suffix 8.
Hexadecimal Number System
 Provides  another convenient and simple
  method for expressing values represented by
  binary numerals.
 It uses a base, or radix, of 16 and the place
  values are the powers of 16.
Decimal   Binary   Hexadecimal   Decimal   Binary   Hexadecimal


    0       0000          0           8      1000         8

    1       0001          1           9      1001         9

    2       0010          2           10     1010         A

    3       0011          3           11     1011         B

    4       0100          4           12     1100         C

    5       0101          5           13     1101         D

    6       0110          6           14     1110         E

    7       0111          7           15     1111         F
Radix Conversion
 The  process of converting a base to another.
 To convert a decimal number to any other
  number system, divide the decimal number
  by the base of the destination number
  system. Repeat the process until the quotient
  becomes zero. And note down the
  remainders in the reverse order.
 To convert from any other number system to
  decimal, take the positional value, multiply by
  the digit and add.
Radix Conversion
Radix Conversion
Decimal to Binary Conversion
of Fractions
 Division      – Multiplication Method
     Steps to be followed
         Multiply the decimal fraction by 2 and noting the
          integral part of the product
         Continue to multiply by 2 as long as the resulting
          product is not equal to zero.
         When the obtained product is equal to zero, the binary
          of the number consists of the integral part listed from
          top to bottom in the order they were recorded.
 Example 1: Convert 0.375 to its binary
 equivalent

       Multiplication     Product         Integral part
            0.375 x 2          0.75              0
            0.75 x 2            1.5              1
             0.5 x 2            1.0              1


               0.37510 is equivalent to 0.0112
Exercises
 Convertthe following decimal numbers into
 binary and hexadecimal numbers:
 1.   128
 2.   207
 Convertthe following binary numbers into
 decimal and hexadecimal numbers:
 1.     11111000
 2.      1110110
Binary Arithmetic
 Addition

 Subtraction

 Multiplication

 Division
Binary Addition
1 + 1 = 0 plus a carry of 1
0 + 1 = 1

1 + 0 = 1

0 + 0 = 0
Binary Subtraction
0  –0=0
1 – 0 = 1

1 – 1 = 0

 0 – 1 = 1 with borrow of 1
Binary Multiplication
0  x0=0
0 x 1 = 0

1 x 0 = 0

 1 x 1 =1
Data Representation
 Data on digital computers is represented as a
  sequence of 0s and 1s. This includes
  numeric data, text, executable files, images,
  audio, and video.
 Data can be represented using 2n

 Numeric representation
     Fixed point
     Floating point
 Non    numeric representation
Fixed Point
 Integers  are whole numbers or fixed-point
  numbers with the radix point fixed after the
  least-significant bit.
 Computers use a fixed number of bits to
  represent an integer. The commonly-used
  bit-lengths for integers are 8-bit, 16-bit, 32-bit
  or 64-bit.
 Two representation
Fixed Point: Two
Representation Schemes
 Unsigned Magnitude
 Signed Magnitude

 One’s complement

 Two’s complement
Unsigned magnitude
   Unsigned integers can represent zero and positive
    integers, but not negative integers.
   Example 1: Suppose that n=8 and the binary pattern
    is 0100 0001, the value of this unsigned integer is
    1×2^0 + 1×2^6 = 65.
   Example 2: Suppose that n=16 and the binary
    pattern is 0001 0000 0000 1000, the value of this
    unsigned integer is 1×2^3 + 1×2^12 = 4104.
   An n-bit pattern can represent 2^n distinct integers.
   An n-bit unsigned integer can represent integers
    from 0 to (2^n)-1
Signed magnitude
 The  most-significant bit (msb) is the sign bit,
  with value of 0 representing positive integer
  and 1 representing negative integer.
 The remaining n-1 bits represents the
  magnitude (absolute value) of the integer.
  The absolute value of the integer is
  interpreted as "the magnitude of the (n-1)-bit
  binary pattern".
Signed magnitude
 Example   1: Suppose that n=8 and the binary
  representation is 0 100 0001.
    Sign bit is 0 ⇒ positive
    Absolute value is 100 0001 = 65
    Hence, the integer is +65
 Example 2: Suppose that n=8 and the binary
  representation is 1 000 0001.
    Sign bit is 1 ⇒ negative
    Absolute value is 000 0001 = 1
    Hence, the integer is -1
Signed magnitude
 Example   3: Suppose that n=8 and the binary
  representation is 0 000 0000.
    Sign bit is 0 ⇒ positive
    Absolute value is 000 0000 = 0
    Hence, the integer is +0
 Example 4: Suppose that n=8 and the binary
  representation is 1 000 0000.
    Sign bit is 1 ⇒ negative
    Absolute value is 000 0000B = 0
    Hence, the integer is -0
Drawbacks
 Thedrawbacks of sign-magnitude
 representation are:
    There are two representations (0000 0000B and
     1000 0000B) for the number zero, which could
     lead to inefficiency and confusion.
    Positive and negative integers need to be
     processed separately.
One’s Complement
 The most significant bit (msb) is the sign bit, with
  value of 0 representing positive integers and 1
  representing negative integers.
 The remaining n-1 bits represents the magnitude
  of the integer, as follows:
       for positive integers, the absolute value of the integer
        is equal to "the magnitude of the (n-1)-bit binary
        pattern".
       for negative integers, the absolute value of the integer
        is equal to "the magnitude of the complement
        (inverse) of the (n-1)-bit binary pattern" (hence called
        1's complement).
One’s complement
 Example   1: Suppose that n=8 and the binary
  representation 0 100 0001.
    Sign bit is 0 ⇒ positive
    Absolute value is 100 0001 = 65
    Hence, the integer is +65
 Example 2: Suppose that n=8 and the binary
  representation 1 000 0001.
    Sign bit is 1 ⇒ negative
    Absolute value is the complement of 000
  0001B, i.e., 111 1110B = 126
    Hence, the integer is -126
Two’s complement
 Again, the most significant bit (msb) is the sign
  bit, with value of 0 representing positive integers
  and 1 representing negative integers.
 The remaining n-1 bits represents the magnitude
  of the integer, as follows:
       for positive integers, the absolute value of the integer
        is equal to "the magnitude of the (n-1)-bit binary
        pattern".
       for negative integers, the absolute value of the integer
        is equal to "the magnitude of the complement of the
        (n-1)-bit binary pattern plus one" (hence called 2's
        complement).
Two’s complement
 Example   1: Suppose that n=8 and the binary
  representation 0 000 0000.
    Sign bit is 0 ⇒ positive
    Absolute value is 000 0000 = 0
    Hence, the integer is +0
 Example 2: Suppose that n=8 and the binary
  representation 1 111 1111.
    Sign bit is 1 ⇒ negative
    Absolute value is the complement of 111
  1111B plus 1, i.e., 000 0000 + 1 = 1
    Hence, the integer is -1
Floating point representation
A     real number is represented in exponential
     form (a = +- m x re)
1 bit           8 bits             23 bits (single precision)

 0            10000100            11010000000000000000000

Sign           Exponent                    Mantissa




                          Radix
                          point
IEEE Floating-Point Standard
754
COMPLEMENTS
    Complements are used in digital computers
     for simplifying the subtraction operation and
     for logical manipulations
    2 types for each base-r system
    1)   r’s complement (Radix complement)
    2)   (r-1)’s complement (Diminished radix
         Complement)
Radix Complement
 Referred  to as r’s complement
 The r’s complement of N is obtained as (rn)-N
  where
           r = base or radix
           n = number of digits
           N = number
Example
   Give the 10’s complement for the following number
        a. 583978
        b. 5498

Solution:
        a. N = 583978
                n=6
                106 - 583978
                1,000,000 – 583978 = 436022
        b. N = 5498
                n=4
                104 - 5498
                10, 000 – 5498 = 4502
Diminished Radix Complements
 Referred  to as the (r-1)s complement
 The (r-1)s complement of N is obtained as (rn-
  1)-N where

             r = base or radix
             n = number of digits
             N = number

Therefore 9’s complement of N is (10n-1)- N
Example
    Give the (r-1)’s complement for the following
     number if n=6
a.   567894
b.   012598
Solution
Using the formula (rn-1)-N
     if n = 6
        r = 10
     then 106 = 1, 000, 000
          rn-1= 1, 000, 000 = 999, 999
 A.) N = 567894
           999,999 – 567894 = 432105
      Therefore, the 9’s complement of 567894
        is 432105.
 B.) N = 012598

           999,999 – 012598 = 987401
      Therefore, the 9’s complement of 012598
        is 987401.
Diminished Radix Complement
 Inthe binary number system r=2 then r-1 = 1
  so the 1’s complement of N is (2n-1)-N
 When a binary digit is subtracted from 1, the
  only possibilities are 1-0=1 or 1-1=0

Therefore, 1’s complement of a binary numeral
  is formed by changing 1’s to 0’s and 0’s to
  1’s.
Example
 Compute for the 1’s complement of each of the
  following binary numbers
       a. 1001011
       b. 010110101
Solution:
       a. N=1001011
  The 1’s complement of 1001011 is 0110100
       b. N=010110101
  The 1’s complement of 010110101 is 101001010
Subtraction with Complements
   The subtraction of two n-digit unsigned numbers M
    – N in base r can be done as follows:
     1. Add the minuend M to the r’s complement of
      the subtrahend N.
     If the M >= N, the sum will produce an end carry,
      rn, which is discarded; what is left is the result M –
      N
     If M < N, the sum does not produce an end carry
      ans is equal to rn – (N – M), which is the r’s
      complement of (N – M). To obtain the answer,
      take the r’s complement of the sum and place a
      negative sign in front.
 Using   10’s complement, subtract 72532 –
 3250.
                         M    =      72532
     10’s complement of N     =   + 96750
                      Sum     =     169282
      Discard end carry 105   =   - 100000
                   Answer     =      69282
 Using
      10’s complement, subtract 3250 –
 72532.
                         M      =     03250
     10’s complement of N       = + 27468
                      Sum       =     30718
      There is no end carry.
                   Answer       =    -69282
                     Get the 10’s complement of 30718.
 Using9’s complement, subtract 89 – 23 and
 98 – 87.
Exercise
 Giventwo binary numbers X = 1010100 and
 Y = 1000011, perform the subtraction (a) X –
 Y and (b) Y – X using 2’s complements and
 1’s complement.
Binary Codes
Decimal Digit   (BCD)   Excess-3
                8421
        0       0000    0011
        1       0001    0100
        2       0010    0101       In a digital system,
        3       0011    0110       it may sometimes
                                   represent a binary
        4       0100    0111
                                   number, other
        5       0101    1000       times some other
        6       0110    1001       discrete quantity of
                                   information
        7       0111    1010
        8       1000    1011
        9       1001    1100
Non Numerical
Representations
 Itrefers to a representation of data other than
  numerical values. It refers to the
  representation of a character, sound or
  image.
Standardizations of Character
Codes
Codename        Description
EBCDIC          Computer code defined by IBM for
                general purpose computers. 8 bits
                represent one character.
ASCII           7 bit code established by ANSI
                (American National Standards
                Institute). Used in PC’s.
ISO Code        ISO646 published as a
                recommendation by the International
                Organization for Standardization
                (ISO), based on ASCII
                7 bit code for information exchange
Unicode         An industry standard allowing
                computers to consistently represent
                characters used in most of the
                countries. Every character is
                represented with 2 bytes.
Image and Sound
  Representations
Still Images      GIF          Format to save graphics, 256 colors
                               displayable

                  JPEG         Compression format for color still
                               images

Moving Pictures   Compression format for color moving pictures
                  MPEG-1       Data stored mainly on CD ROM
                  MPEG-2       Stored images like vide; real time
                               images

                  MPEG-4       Standardization for mobile terminals
Sound             PCM
                  MIDI         Interface to connect a musical
                               instrument with a computer.
Operations and Accuracy
 Shift   operations
     It is the operation of shifting a bit string to the right
      or left.

                     Arithmetic Shift         Logical Shift
             Left    Arithmetic Left Shift    Logical left shift
             Right   Arithmetic Right Shift   Logical Right Shift
Arithmetic Shift
Arithmetic Shift is an operation of shifting a bit string,
  except for the sign bit.
Example : Shift bits by 1
           ALS                              ARS
                                        Sign bit    overflow
           overflow


           11111010                         11111010
Sign bit
           11110100                         11111101

                Insert a zero in the vacated spot
Logical Shift
    It shifts a bit string and inserts “0” in places made
     empty by the shift.
    Perform a logical left shift. Shift by 1 bit.
        01111010
    Perform a logical right shift. Shift by 1 bit.
        10011001
Exercise
 Perform  arithmetic right and logical right
 shifts by 3 bits on the 8th binary number
 11001100.

Mais conteúdo relacionado

Mais procurados

21 monotone sequences x
21 monotone sequences x21 monotone sequences x
21 monotone sequences xmath266
 
Use of binomial probability distribution
Use of binomial probability distributionUse of binomial probability distribution
Use of binomial probability distributionNadeem Uddin
 
3 d viewing projection
3 d viewing  projection3 d viewing  projection
3 d viewing projectionPooja Dixit
 
UNIT-6-Illumination-Models-and-Surface-Rendering-Methods.pdf
UNIT-6-Illumination-Models-and-Surface-Rendering-Methods.pdfUNIT-6-Illumination-Models-and-Surface-Rendering-Methods.pdf
UNIT-6-Illumination-Models-and-Surface-Rendering-Methods.pdfSayantanMajhi2
 
Gram-Schmidt process linear algbera
Gram-Schmidt process linear algberaGram-Schmidt process linear algbera
Gram-Schmidt process linear algberaPulakKundu1
 
Lecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionLecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionMubashir Ali
 
Linear Algebra PowerPoint
Linear Algebra PowerPointLinear Algebra PowerPoint
Linear Algebra PowerPointAshley Carter
 
Data representation and Arithmetic Algorithms
Data representation and Arithmetic AlgorithmsData representation and Arithmetic Algorithms
Data representation and Arithmetic AlgorithmsMumthas Shaikh
 
Lec 04 - Gate-level Minimization
Lec 04 - Gate-level MinimizationLec 04 - Gate-level Minimization
Lec 04 - Gate-level MinimizationVajira Thambawita
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesOmprakash Chauhan
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformationsMohd Arif
 
6.2 Unit Circle and Circular Functions
6.2 Unit Circle and Circular Functions6.2 Unit Circle and Circular Functions
6.2 Unit Circle and Circular Functionssmiller5
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics University of Potsdam
 
Logisim tutorial
Logisim tutorialLogisim tutorial
Logisim tutorialTâm Tâm
 
GCD of n Numbers
GCD of n NumbersGCD of n Numbers
GCD of n NumbersSaikat Roy
 

Mais procurados (20)

21 monotone sequences x
21 monotone sequences x21 monotone sequences x
21 monotone sequences x
 
Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
 
Use of binomial probability distribution
Use of binomial probability distributionUse of binomial probability distribution
Use of binomial probability distribution
 
Sap 1
Sap 1Sap 1
Sap 1
 
3 d viewing projection
3 d viewing  projection3 d viewing  projection
3 d viewing projection
 
UNIT-6-Illumination-Models-and-Surface-Rendering-Methods.pdf
UNIT-6-Illumination-Models-and-Surface-Rendering-Methods.pdfUNIT-6-Illumination-Models-and-Surface-Rendering-Methods.pdf
UNIT-6-Illumination-Models-and-Surface-Rendering-Methods.pdf
 
Gram-Schmidt process linear algbera
Gram-Schmidt process linear algberaGram-Schmidt process linear algbera
Gram-Schmidt process linear algbera
 
Lecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionLecture-2(2): Number System & Conversion
Lecture-2(2): Number System & Conversion
 
Number system conversion
Number system conversionNumber system conversion
Number system conversion
 
Linear Algebra PowerPoint
Linear Algebra PowerPointLinear Algebra PowerPoint
Linear Algebra PowerPoint
 
Data representation and Arithmetic Algorithms
Data representation and Arithmetic AlgorithmsData representation and Arithmetic Algorithms
Data representation and Arithmetic Algorithms
 
Lec 04 - Gate-level Minimization
Lec 04 - Gate-level MinimizationLec 04 - Gate-level Minimization
Lec 04 - Gate-level Minimization
 
Polygon mesh
Polygon  meshPolygon  mesh
Polygon mesh
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
 
6.2 Unit Circle and Circular Functions
6.2 Unit Circle and Circular Functions6.2 Unit Circle and Circular Functions
6.2 Unit Circle and Circular Functions
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
 
Logisim tutorial
Logisim tutorialLogisim tutorial
Logisim tutorial
 
GCD of n Numbers
GCD of n NumbersGCD of n Numbers
GCD of n Numbers
 
Double Integrals
Double IntegralsDouble Integrals
Double Integrals
 

Destaque

Johnny english
Johnny englishJohnny english
Johnny englishbkxhunter
 
기획회의 롤링다이스
기획회의 롤링다이스기획회의 롤링다이스
기획회의 롤링다이스현주 제
 
Storyboard (Draft)
Storyboard (Draft)Storyboard (Draft)
Storyboard (Draft)bkxhunter
 
Tablas de diseño de acero en compresion
Tablas de diseño de acero en compresionTablas de diseño de acero en compresion
Tablas de diseño de acero en compresionCristian Melgar Tueros
 
Content Strategy: WordCamp Buffalo 2012
Content Strategy: WordCamp Buffalo 2012Content Strategy: WordCamp Buffalo 2012
Content Strategy: WordCamp Buffalo 2012Adrian Roselli
 
The purdygreenteam 10.19.12
The purdygreenteam 10.19.12The purdygreenteam 10.19.12
The purdygreenteam 10.19.12dalyc
 
WordPress Accessibility - WordCamp Buffalo 2016
WordPress Accessibility - WordCamp Buffalo 2016WordPress Accessibility - WordCamp Buffalo 2016
WordPress Accessibility - WordCamp Buffalo 2016Adrian Roselli
 
Selfish Accessibility: WordCamp Toronto 2014
Selfish Accessibility: WordCamp Toronto 2014Selfish Accessibility: WordCamp Toronto 2014
Selfish Accessibility: WordCamp Toronto 2014Adrian Roselli
 
מצגת שלג Crm שלמה
מצגת שלג Crm   שלמהמצגת שלג Crm   שלמה
מצגת שלג Crm שלמהShelegcrm
 
Menopauza
MenopauzaMenopauza
Menopauzamasszi
 
Perl beginners#6 LT
Perl beginners#6 LTPerl beginners#6 LT
Perl beginners#6 LTsasakure_kei
 
How To Apply for Pick.Click.Give. in 2016 - Powerpoint
How To Apply for Pick.Click.Give. in 2016 - PowerpointHow To Apply for Pick.Click.Give. in 2016 - Powerpoint
How To Apply for Pick.Click.Give. in 2016 - Powerpointpcgak
 
Fringe Accessibility: A11y Camp Toronto 2015
Fringe Accessibility: A11y Camp Toronto 2015Fringe Accessibility: A11y Camp Toronto 2015
Fringe Accessibility: A11y Camp Toronto 2015Adrian Roselli
 
The Unwebinar
The UnwebinarThe Unwebinar
The Unwebinarpcgak
 
Fringe Accessibility: ID24 for GAAD
Fringe Accessibility: ID24 for GAADFringe Accessibility: ID24 for GAAD
Fringe Accessibility: ID24 for GAADAdrian Roselli
 
библиотека. взгляд из будущего
библиотека. взгляд из будущегобиблиотека. взгляд из будущего
библиотека. взгляд из будущегоNadezda Bezukladnikova
 

Destaque (20)

Johnny english
Johnny englishJohnny english
Johnny english
 
기획회의 롤링다이스
기획회의 롤링다이스기획회의 롤링다이스
기획회의 롤링다이스
 
Storyboard (Draft)
Storyboard (Draft)Storyboard (Draft)
Storyboard (Draft)
 
Tablas de diseño de acero en compresion
Tablas de diseño de acero en compresionTablas de diseño de acero en compresion
Tablas de diseño de acero en compresion
 
Zz patterson
Zz pattersonZz patterson
Zz patterson
 
Content Strategy: WordCamp Buffalo 2012
Content Strategy: WordCamp Buffalo 2012Content Strategy: WordCamp Buffalo 2012
Content Strategy: WordCamp Buffalo 2012
 
The purdygreenteam 10.19.12
The purdygreenteam 10.19.12The purdygreenteam 10.19.12
The purdygreenteam 10.19.12
 
WordPress Accessibility - WordCamp Buffalo 2016
WordPress Accessibility - WordCamp Buffalo 2016WordPress Accessibility - WordCamp Buffalo 2016
WordPress Accessibility - WordCamp Buffalo 2016
 
Prezentacja ogólna2.0
Prezentacja ogólna2.0Prezentacja ogólna2.0
Prezentacja ogólna2.0
 
Selfish Accessibility: WordCamp Toronto 2014
Selfish Accessibility: WordCamp Toronto 2014Selfish Accessibility: WordCamp Toronto 2014
Selfish Accessibility: WordCamp Toronto 2014
 
Elia (februari)
Elia (februari)Elia (februari)
Elia (februari)
 
מצגת שלג Crm שלמה
מצגת שלג Crm   שלמהמצגת שלג Crm   שלמה
מצגת שלג Crm שלמה
 
Menopauza
MenopauzaMenopauza
Menopauza
 
Perl beginners#6 LT
Perl beginners#6 LTPerl beginners#6 LT
Perl beginners#6 LT
 
How To Apply for Pick.Click.Give. in 2016 - Powerpoint
How To Apply for Pick.Click.Give. in 2016 - PowerpointHow To Apply for Pick.Click.Give. in 2016 - Powerpoint
How To Apply for Pick.Click.Give. in 2016 - Powerpoint
 
Fringe Accessibility: A11y Camp Toronto 2015
Fringe Accessibility: A11y Camp Toronto 2015Fringe Accessibility: A11y Camp Toronto 2015
Fringe Accessibility: A11y Camp Toronto 2015
 
The Unwebinar
The UnwebinarThe Unwebinar
The Unwebinar
 
Fringe Accessibility: ID24 for GAAD
Fringe Accessibility: ID24 for GAADFringe Accessibility: ID24 for GAAD
Fringe Accessibility: ID24 for GAAD
 
библиотека. взгляд из будущего
библиотека. взгляд из будущегобиблиотека. взгляд из будущего
библиотека. взгляд из будущего
 
Scenariusz
ScenariuszScenariusz
Scenariusz
 

Semelhante a Lesson 1 basic theory of information

Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1Deepak John
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1Abdul Khan
 
Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.Ritesh Saini
 
Chapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemChapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemISMT College
 
Data representation
Data representationData representation
Data representationManish Kumar
 
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptDavid Louie Bedia
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawabAmmar_n
 
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
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptxbmangesh
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdfmiftah88
 
Application of bases
Application of basesApplication of bases
Application of basesAbdur Rehman
 
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
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptxODAATUBE1
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.pptRavikumarR77
 

Semelhante a Lesson 1 basic theory of information (20)

Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1
 
Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Chapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemChapter 2.1 introduction to number system
Chapter 2.1 introduction to number system
 
Data representation
Data representationData representation
Data representation
 
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawab
 
Data Representation
Data RepresentationData Representation
Data Representation
 
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
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptx
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
 
Application of bases
Application of basesApplication of bases
Application of bases
 
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...
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptx
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Data Representation
Data RepresentationData Representation
Data Representation
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 

Último

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 

Último (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

Lesson 1 basic theory of information

  • 1. Lesson 1 Basic Theory of Information
  • 2. Number System  Number  It is a symbol representing a unit or quantity.  Number System  Defines a set of symbols used to represent quantity  Radix  The base or radix of number system determines how many numerical digits the number system uses.
  • 3. Types of Number System  Decimal System  Binary Number System  Octal Number System  Hexadecimal Number System
  • 4. Decimal Number System  Ingenious method of expressing all numbers by means of tens symbols originated from India. It is widely used and is based on the ten fingers of a human being.  It makes use of ten numeric symbols  0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • 5. Inherent Value and Positional Value  The inherent value of a symbol is the value of that symbol standing alone.  Example 6 in number 256, 165, 698  The symbol is related to the quantity six, even if it is used in different number positions  The positional value of a numeric symbol is directly related to the base of a system.  In the case of decimal system, each position has a value of 10 times greater that the position to its right. Example: 423, the symbol 3 represents the ones (units), the symbol 2 represents the tens position (10 x 1), and the symbol 4 represents the hundreds position (10 x 10). In other words, each symbol move to the left represents an increase in the value of the position by a factor of ten.
  • 6. Inherent and Positional Value cont. 2539 = 2X1000 + 5X100 + 3X10 + 9X1 = 2X103 + 5X102 + 3X101 + 9 x100 This means that positional value of symbol 2 is 1000 or using the base 10 it is 103
  • 7. Binary Number System  Uses only two numeric symbols 1 and 0  Under the binary system, each position has a value 2 times greater than the position to the right.
  • 8. Octal Number System  Octalnumber system is using 8 digits to represent numbers. The highest value = 7. Each column represents a power of 8. Octal numbers are represented with the suffix 8.
  • 9. Hexadecimal Number System  Provides another convenient and simple method for expressing values represented by binary numerals.  It uses a base, or radix, of 16 and the place values are the powers of 16.
  • 10. Decimal Binary Hexadecimal Decimal Binary Hexadecimal 0 0000 0 8 1000 8 1 0001 1 9 1001 9 2 0010 2 10 1010 A 3 0011 3 11 1011 B 4 0100 4 12 1100 C 5 0101 5 13 1101 D 6 0110 6 14 1110 E 7 0111 7 15 1111 F
  • 11. Radix Conversion  The process of converting a base to another.  To convert a decimal number to any other number system, divide the decimal number by the base of the destination number system. Repeat the process until the quotient becomes zero. And note down the remainders in the reverse order.  To convert from any other number system to decimal, take the positional value, multiply by the digit and add.
  • 14. Decimal to Binary Conversion of Fractions  Division – Multiplication Method  Steps to be followed  Multiply the decimal fraction by 2 and noting the integral part of the product  Continue to multiply by 2 as long as the resulting product is not equal to zero.  When the obtained product is equal to zero, the binary of the number consists of the integral part listed from top to bottom in the order they were recorded.
  • 15.  Example 1: Convert 0.375 to its binary equivalent Multiplication Product Integral part 0.375 x 2 0.75 0 0.75 x 2 1.5 1 0.5 x 2 1.0 1 0.37510 is equivalent to 0.0112
  • 16. Exercises  Convertthe following decimal numbers into binary and hexadecimal numbers: 1. 128 2. 207  Convertthe following binary numbers into decimal and hexadecimal numbers: 1. 11111000 2. 1110110
  • 17. Binary Arithmetic  Addition  Subtraction  Multiplication  Division
  • 18. Binary Addition 1 + 1 = 0 plus a carry of 1 0 + 1 = 1 1 + 0 = 1 0 + 0 = 0
  • 19. Binary Subtraction 0 –0=0 1 – 0 = 1 1 – 1 = 0  0 – 1 = 1 with borrow of 1
  • 20. Binary Multiplication 0 x0=0 0 x 1 = 0 1 x 0 = 0  1 x 1 =1
  • 21. Data Representation  Data on digital computers is represented as a sequence of 0s and 1s. This includes numeric data, text, executable files, images, audio, and video.  Data can be represented using 2n  Numeric representation  Fixed point  Floating point  Non numeric representation
  • 22. Fixed Point  Integers are whole numbers or fixed-point numbers with the radix point fixed after the least-significant bit.  Computers use a fixed number of bits to represent an integer. The commonly-used bit-lengths for integers are 8-bit, 16-bit, 32-bit or 64-bit.  Two representation
  • 23. Fixed Point: Two Representation Schemes  Unsigned Magnitude  Signed Magnitude  One’s complement  Two’s complement
  • 24. Unsigned magnitude  Unsigned integers can represent zero and positive integers, but not negative integers.  Example 1: Suppose that n=8 and the binary pattern is 0100 0001, the value of this unsigned integer is 1×2^0 + 1×2^6 = 65.  Example 2: Suppose that n=16 and the binary pattern is 0001 0000 0000 1000, the value of this unsigned integer is 1×2^3 + 1×2^12 = 4104.  An n-bit pattern can represent 2^n distinct integers.  An n-bit unsigned integer can represent integers from 0 to (2^n)-1
  • 25. Signed magnitude  The most-significant bit (msb) is the sign bit, with value of 0 representing positive integer and 1 representing negative integer.  The remaining n-1 bits represents the magnitude (absolute value) of the integer. The absolute value of the integer is interpreted as "the magnitude of the (n-1)-bit binary pattern".
  • 26. Signed magnitude  Example 1: Suppose that n=8 and the binary representation is 0 100 0001. Sign bit is 0 ⇒ positive Absolute value is 100 0001 = 65 Hence, the integer is +65  Example 2: Suppose that n=8 and the binary representation is 1 000 0001. Sign bit is 1 ⇒ negative Absolute value is 000 0001 = 1 Hence, the integer is -1
  • 27. Signed magnitude  Example 3: Suppose that n=8 and the binary representation is 0 000 0000. Sign bit is 0 ⇒ positive Absolute value is 000 0000 = 0 Hence, the integer is +0  Example 4: Suppose that n=8 and the binary representation is 1 000 0000. Sign bit is 1 ⇒ negative Absolute value is 000 0000B = 0 Hence, the integer is -0
  • 28.
  • 29. Drawbacks  Thedrawbacks of sign-magnitude representation are:  There are two representations (0000 0000B and 1000 0000B) for the number zero, which could lead to inefficiency and confusion.  Positive and negative integers need to be processed separately.
  • 30. One’s Complement  The most significant bit (msb) is the sign bit, with value of 0 representing positive integers and 1 representing negative integers.  The remaining n-1 bits represents the magnitude of the integer, as follows:  for positive integers, the absolute value of the integer is equal to "the magnitude of the (n-1)-bit binary pattern".  for negative integers, the absolute value of the integer is equal to "the magnitude of the complement (inverse) of the (n-1)-bit binary pattern" (hence called 1's complement).
  • 31. One’s complement  Example 1: Suppose that n=8 and the binary representation 0 100 0001. Sign bit is 0 ⇒ positive Absolute value is 100 0001 = 65 Hence, the integer is +65  Example 2: Suppose that n=8 and the binary representation 1 000 0001. Sign bit is 1 ⇒ negative Absolute value is the complement of 000 0001B, i.e., 111 1110B = 126 Hence, the integer is -126
  • 32.
  • 33. Two’s complement  Again, the most significant bit (msb) is the sign bit, with value of 0 representing positive integers and 1 representing negative integers.  The remaining n-1 bits represents the magnitude of the integer, as follows:  for positive integers, the absolute value of the integer is equal to "the magnitude of the (n-1)-bit binary pattern".  for negative integers, the absolute value of the integer is equal to "the magnitude of the complement of the (n-1)-bit binary pattern plus one" (hence called 2's complement).
  • 34. Two’s complement  Example 1: Suppose that n=8 and the binary representation 0 000 0000. Sign bit is 0 ⇒ positive Absolute value is 000 0000 = 0 Hence, the integer is +0  Example 2: Suppose that n=8 and the binary representation 1 111 1111. Sign bit is 1 ⇒ negative Absolute value is the complement of 111 1111B plus 1, i.e., 000 0000 + 1 = 1 Hence, the integer is -1
  • 35.
  • 36. Floating point representation A real number is represented in exponential form (a = +- m x re) 1 bit 8 bits 23 bits (single precision) 0 10000100 11010000000000000000000 Sign Exponent Mantissa Radix point
  • 38. COMPLEMENTS  Complements are used in digital computers for simplifying the subtraction operation and for logical manipulations  2 types for each base-r system 1) r’s complement (Radix complement) 2) (r-1)’s complement (Diminished radix Complement)
  • 39. Radix Complement  Referred to as r’s complement  The r’s complement of N is obtained as (rn)-N where r = base or radix n = number of digits N = number
  • 40. Example  Give the 10’s complement for the following number a. 583978 b. 5498 Solution: a. N = 583978 n=6 106 - 583978 1,000,000 – 583978 = 436022 b. N = 5498 n=4 104 - 5498 10, 000 – 5498 = 4502
  • 41. Diminished Radix Complements  Referred to as the (r-1)s complement  The (r-1)s complement of N is obtained as (rn- 1)-N where r = base or radix n = number of digits N = number Therefore 9’s complement of N is (10n-1)- N
  • 42. Example  Give the (r-1)’s complement for the following number if n=6 a. 567894 b. 012598
  • 43. Solution Using the formula (rn-1)-N if n = 6 r = 10 then 106 = 1, 000, 000 rn-1= 1, 000, 000 = 999, 999
  • 44.  A.) N = 567894 999,999 – 567894 = 432105 Therefore, the 9’s complement of 567894 is 432105.  B.) N = 012598 999,999 – 012598 = 987401 Therefore, the 9’s complement of 012598 is 987401.
  • 45. Diminished Radix Complement  Inthe binary number system r=2 then r-1 = 1 so the 1’s complement of N is (2n-1)-N  When a binary digit is subtracted from 1, the only possibilities are 1-0=1 or 1-1=0 Therefore, 1’s complement of a binary numeral is formed by changing 1’s to 0’s and 0’s to 1’s.
  • 46. Example  Compute for the 1’s complement of each of the following binary numbers a. 1001011 b. 010110101 Solution: a. N=1001011 The 1’s complement of 1001011 is 0110100 b. N=010110101 The 1’s complement of 010110101 is 101001010
  • 47. Subtraction with Complements  The subtraction of two n-digit unsigned numbers M – N in base r can be done as follows:  1. Add the minuend M to the r’s complement of the subtrahend N.  If the M >= N, the sum will produce an end carry, rn, which is discarded; what is left is the result M – N  If M < N, the sum does not produce an end carry ans is equal to rn – (N – M), which is the r’s complement of (N – M). To obtain the answer, take the r’s complement of the sum and place a negative sign in front.
  • 48.  Using 10’s complement, subtract 72532 – 3250. M = 72532 10’s complement of N = + 96750 Sum = 169282 Discard end carry 105 = - 100000 Answer = 69282
  • 49.  Using 10’s complement, subtract 3250 – 72532. M = 03250 10’s complement of N = + 27468 Sum = 30718 There is no end carry. Answer = -69282 Get the 10’s complement of 30718.
  • 50.  Using9’s complement, subtract 89 – 23 and 98 – 87.
  • 51. Exercise  Giventwo binary numbers X = 1010100 and Y = 1000011, perform the subtraction (a) X – Y and (b) Y – X using 2’s complements and 1’s complement.
  • 52. Binary Codes Decimal Digit (BCD) Excess-3 8421 0 0000 0011 1 0001 0100 2 0010 0101 In a digital system, 3 0011 0110 it may sometimes represent a binary 4 0100 0111 number, other 5 0101 1000 times some other 6 0110 1001 discrete quantity of information 7 0111 1010 8 1000 1011 9 1001 1100
  • 53. Non Numerical Representations  Itrefers to a representation of data other than numerical values. It refers to the representation of a character, sound or image.
  • 54. Standardizations of Character Codes Codename Description EBCDIC Computer code defined by IBM for general purpose computers. 8 bits represent one character. ASCII 7 bit code established by ANSI (American National Standards Institute). Used in PC’s. ISO Code ISO646 published as a recommendation by the International Organization for Standardization (ISO), based on ASCII 7 bit code for information exchange Unicode An industry standard allowing computers to consistently represent characters used in most of the countries. Every character is represented with 2 bytes.
  • 55. Image and Sound Representations Still Images GIF Format to save graphics, 256 colors displayable JPEG Compression format for color still images Moving Pictures Compression format for color moving pictures MPEG-1 Data stored mainly on CD ROM MPEG-2 Stored images like vide; real time images MPEG-4 Standardization for mobile terminals Sound PCM MIDI Interface to connect a musical instrument with a computer.
  • 56. Operations and Accuracy  Shift operations  It is the operation of shifting a bit string to the right or left. Arithmetic Shift Logical Shift Left Arithmetic Left Shift Logical left shift Right Arithmetic Right Shift Logical Right Shift
  • 57. Arithmetic Shift Arithmetic Shift is an operation of shifting a bit string, except for the sign bit. Example : Shift bits by 1 ALS ARS Sign bit overflow overflow 11111010 11111010 Sign bit 11110100 11111101 Insert a zero in the vacated spot
  • 58. Logical Shift  It shifts a bit string and inserts “0” in places made empty by the shift.  Perform a logical left shift. Shift by 1 bit.  01111010  Perform a logical right shift. Shift by 1 bit.  10011001
  • 59. Exercise  Perform arithmetic right and logical right shifts by 3 bits on the 8th binary number 11001100.

Notas do Editor

  1. When the value of the base is substituted… -2’s and 1’s complement for binary numbers -10’s and 9’s complement for decimal numbers