SlideShare ist ein Scribd-Unternehmen logo
1 von 67
Chapter 2.0:
Data Representation on CPU
FP203 : Computer Organization
Topic Cover
2.1   Number System (decimal, binary,
      octal, and hexadecimal)
2.2   Arithmetic Operation in number
      system.
2.3   Convert Decimal, Binary, Octal
      and Hexadecimal Numbers to
      different bases.
2.4   Coding system:
      Sign and magnitude,
      1‟s Complement and 2‟s Complement
      Binary Coded Decimal (BCD system)
      ASCII and EBCDIC
INTRODUCTION
             Examples
Real World                       Computer

  Data         Input device        Data




Dear Mom:       Keyboard      10110010…



                  Digital     10110010…
                 camera
2.1 Number System
• Many number system are in use in digital
  technology.
• Most common are:
  – Decimal, N10
  – Binary, N2
  – Octal, N8
  – Hexadecimal, N16
2.2 ARITHMETIC OPERATION
• Arithmetic operation in number system
  consist of:
   – Addition        Only cover this 2 topics
   – Subtraction
   – Multiplication
   – Division
Decimal
number system

 • Decimal system is composed of 10
   numerals or symbol.
 • Symbol: 0,1,2,3,4,5,6,7,8,9

                        10 Symbol

 • Example: 23410
  Multiplier:
      103       102        101      100   .   10-1
    = 1000      = 100     = 10      =1    .   = 0.1
Example:

                        2746.210
          This number is came from this calculation:

    2           7        4        2         .          2
    103         102      101      100       .          10-1
  = 1000       = 100     = 10     =1        .          = 0.1



2746.210 = (2x1000) + (7x100) + (4x10) + (2x1) + (2x0.1)
         = 2000 + 700 + 40 + 2 + 0.2
             = 2746.2

              Decimal number = Natural Number
Arithmetic Operation
       Decimal



   + -
Decimal Addition
Example:

a. 89310 + 32110 =             b. 75710 + 24510 =
      89310                         75710
                                  + 24510
     +32110
                                  100210
     121410

Try this : 73310 + 79910 = ?
Decimal Subtraction
Example:

a. 5410 - 1710 =               b. 15710 - 8910 =
       5410                          15710
     - 1710                          - 8910
       3710                            6810


Try this : 533310 - 3710 = ?
Octal
number system

 • Octal system is composed of 8 numerals
   or symbol.
 • Symbol: 0,1,2,3,4,5,6,7

                       8 Symbol

 • Example: 658
  Multiplier:
      83         82       81      80   .     8-1
     = 512      = 64      =8      =1   .   = 0.125
Example:

                          107.158
  This number can be convert to decimal value using this calculation:


    1           0           7            .          1           5
    82          81          80           .          8-1          8-2
   = 64         =8          =1           .        = 0.1250    = 0.0156



107.158    = (1x64)+(0x8)+(7x1)+(1x0.1250)+(5x0.0156)
           = 64 + 0 + 7 + 0.1250 + 0.078
           = 71.20310
Arithmetic Operation
        Octal



   + -
Octal Addition
Sekiranya setiap hasil perjumlahan yang melebihi atau sama
dengan 8 mestilah ditolak dengan 8.

Example:

a. 1238 + 3218 =
                              b. 4578 + 2458 =
      1238                         4578
     +3218                       + 2458
      4448                         7248


Try this : 7338 + 748 = ?
Octal Subtraction
Sekiranya terdapat peminjam, nombor peminjam mestilah
dijumlahkan dengan 8.

Example:

a. 5248 - 1678 =
                              b. 1678 - 248 =
       5248                        1678
     - 1678                        - 248
       3358                        1438


Try this : 15238 - 3648 = ?
Binary
number system

 • Binary system is composed of 2 numerals
   or symbol.
 • Symbol: 0,1

                2 Symbol

 • Example: 1012
  Multiplier:
      25           24      23   22   21   20
     = 32         = 16     =8   =4   =2   =1
Example:

                          10.1012
  This number can be convert to decimal value using this calculation:


    1           0            .          1           0           1
    21          20           .          2-1         2-2          2-3
    =2          =1           .        = 0.5000    = 0.2500    = 0.1250



10.1012    = (1x2)+(0x1)+(1x0.5)+(0x0.25)+(1x0.125)
           = 2 + 0 + 0.5 + 0 + 0.125
           = 2.62510
Arithmetic Operation
        Binary



   + -
Binary Addition
The four basic rules for adding binary digits are as follows:

                               0+0=0
                               0+1=1
                               1+0=1
                               1 + 1 = 0 carry 1

Example:
110112 + 100012 =

  110112
+ 100012
  1011002

Try this : 101112 + 1112 = ?
Binary Subtraction
The four basic rules for subtracting binary digits are as follows:-

                          0-0=0
                          0 - 1 = 1 borrow 1
                          1-0=1
                          1-1=0

Example:
10012 -102 =

   10012
 -   102
    1112

Try this : 1010112 – 11112 =?
Binary Subtraction
Have previously looked at the subtraction operation. A
quick review.
Just like subtraction in any other base
         10110
        -10010
         00100

• And when a borrow is needed. Note that the borrow
  gives us 2 in the current bit position.




.
Example
In General
• When there is no borrow into the msb position, then the
  subtrahend in not larger than the minuend and the result is
  positive and correct.




• If a borrow into the msb does occur, then the subtrahend is
  larger than the minuend.
Consider
• Now do the operation 4 – 6




• Correct difference is -2 or -0010
• Different because 2n was brought in and made the operation M-
  N+2n
Hexadecimal
number system

 • Hexadecimal system is composed of 16
   numerals or symbol.         10 11 12 13 14 15


 • Symbol: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

                               16 Symbol

 • Example: 7A16
  Multiplier:
      163       162     161       160      .     16-1
    = 4096      = 256   = 16      =1       .   = 0.0626
Example:

                         B6F.7C16
  This number can be convert to decimal value using this calculation:


    B           6           F            .          7           C
    162         161         160          .          16-1        16-2
   = 256       = 16         =1           .         0.0625     = 0.0039



B6F.7C16   = (11x256) + (6x16) + (15x1) + (7x0.0625) + (12x0.0039)
           = 2816 + 96 + 15 + 0.4375 + 0.0468

           = 2927.484310
Arithmetic Operation
     Hexadecimal



   + -
Hexadecimal Addition
Sekiranya setiap hasil perjumlahan yang melebihi atau sama
dengan 16 mestilah ditolak dengan 16.

Example:

a. 3316 + 4716 =              b. 20D316 + 12BC16 =
       3316                        20D316
    + 4716                       + 12BC16
                                   338F16
       7A16

Try this : DF16 + AB16 = ?
Hexadecimal Subtraction
Nilai yang kecil daripada 16 boleh dipinjam dari sebelah dengan
nilai 16.

Example:

a. 4416 - 1716 =               b. 20D316 - 12BC16 =
                                    20D316
       4416
                                  - 12BC16
    - 1716                          0E1716
       2D16

Try this : DF16 - AB16 = ?
2.3: Convert Decimal, Binary, Octal
     and Hexadecimal Numbers to
     different bases
Convert Binary to Decimal (N2 – N10)
Example:

                          1111012
   This number can be convert to decimal value using this calculation:
     1          1          1            1           0             1
      25         24          23           22          21          20
     = 32       = 16         =8          =4          =2          =1


 1111012 = (1x32)+(1x16)+(1x8)+(1x4)+(0x2)+(1x1)
         = 32 + 16 + 8 + 4 + 0 + 1
            = 6110
 Try this: Convert 1100.10112 to decimal?
           Convert 100.10112 to decimal?
Convert Binary to Octal (N2 - N8)
Convert Binary to Octal adalah dengan membahagikan nombor
Binary tersebut kepada 3 bit bermula dari sebelah kanan (LSB)
                                     LSB
                         1111012
   1          1          1               1    0         1
   22         21         20              22   21         20
   =4         =2         =1              =4   =2        =1

 1111012 = [(1x4)+(1x2)+(1x1)] [(1x4)+(0x2)+(1x1)]
         = [4 + 2 + 1][ 4 + 0 + 1]
            = 758
 Try this: Convert 110010112 to Octal?
Convert Binary to Hexadecimal
             (N2 – N16)
Convert Binary to Hexadecimal adalah dengan membahagikan
nombor binary kepada 4 bit bermula dari LSB. Sekiranya bit tersebut
tidak mencukupi, maka digit „0‟ perlu ditambah pada MSB
                                      LSB

                              01012
                        0       1           0    1
                         23      22         21   20
                        =8      =4          =2   =1


 01012 = (0x8)+(1x4)+(0x2)+(1x1)
           =0+4+0+1
            = 516
 Try this: Convert 101111012 to Hexadecimal?
Convert Decimal to Binary (N10 – N2)
Example: Convert 1810 to binary

                     2
                     2
                           18
                           9
                                181
                                 0
                     2     4      1
                     2     2      0
                     2     1      0
                           0      1


 1810   = 100102
 Try this: Convert 32.20210 to binary?
           Convert 8910 to binary?
Convert Decimal to Octal (N10 – N8)
Example: Convert 300.3410 to Octal
         i. 300 Divide by 8
         ii. 0.34 Multiply by 8
                                       8     300
                                       8      37      4
                                       8      4       5
                                       8      0       4        454


          0.3410 = 0.34 x 8 = 2.72 ( 2+0.72 )
                                  0.72 x 8 = 5.76 ( 5+0.76 )
                                  0.76 x 8 = 6.08 ( 6+0.08 )
                                  0.08 x 8 = 0.64 ( 0+0.64 )
                                                               0.25605
                                  0.64 x 8 = 5.12 ( 5+0.12 )

         300.3410 = 454.256058
Try this: Convert 32.20210 to Octal?
Convert Decimal to Hexadecimal
           (N10 – N16)
Example: Convert 2010 to Hexadecimal

              16       20      Balance
              16        1         4
                        0         1


2010= 1416

Try this: Convert 343410 to hexadecimal?
Convert Octal to Binary (N8 – N2)
Convert Octal to Binary adalah dengan menukar setiap digit oktal
kepada nilai 3 bit binary nya



             MSB
                              4 58             LSB


    1         0          0               1      0         1
    22        21         20              22     21         20
    =4        =2         =1              =4     =2        =1

 1001018 = [(1x4)+(0x2)+(0x1)] [(1x4)+(0x2)+(1x1)]
         = [4 + 0 + 0][ 4 + 0 + 1]
            = 100   1012
 Try this: Convert 110010112 to Octal?
Convert Hexadecimal to Binary
               (N16 – N2)
 Convert Octal to Binary adalah dengan menukar setiap digit
 hexadecimal kepada nilai 4 bit binary nya



                   MSB
                              3 A16               LSB


    0         0          1    1      1      0           1     0
     23       22         21   20     23      22         21    20
    =8        =4         =2   =1     =8     =4          =2    =1

  3A16 = [(0x8)+(0x4)+(1x2)+(1x1)][(1x8)+(0x4)+(1x2)+(0x1)]
       = [0 + 0 + 2 + 1][ 8 + 0 + 2 + 0]
          =   0011 10102
Try this: Convert EFA16 to Binary?
2.4: Coding System
 Sign and magnitude,
 1‟s Complement & 2‟s Complement
8-Bit Binary Number System
Apply what you have learned to the         +127   01111111
                                                             pos(+)
binary number systems. How do you          +126   01111110
represent negative numbers in this 8-bit
                                           +125   01111101
binary system?

Cut the number system in half.             +1    00000001
                                            0     00000000
Use 00000001 – 01111111 to indicate
                                            -1    11111111
positive numbers.
                                            -2    11111110
Use 10000000 – 11111111 to indicate
negative numbers.                          -127   10000001
                                                             neg(-)
                                           -128   10000000
Notice that 00000000 is not positive or
negative.
Representing Negative Numbers

• As there is no third symbol available to
  store a negative symbol explicitly we must
  use a bit to show if a number is negative
  or not.
  – We name this bit the „Sign Bit‟
  – We use the leftmost bit.
  – If the „Sign Bit‟ is 1 then the number is
    negative, if it is 0 then it is positive.
Sign Bit
•   What did do you notice about the     +127   01111111
                                                           pos(+)
    most significant bit of the binary   +126   01111110
    numbers?                             +125   01111101
•   The MSB is (0) for all positive
    numbers.                              +1    00000001

•   The MSB is (1) for all negative       0     00000000

    numbers.                              -1    11111111
                                          -2    11111110
•   The MSB is called the sign bit.
•   In a signed number system, this      -127   10000001
    allows you to instantly determine    -128   10000000
                                                           neg(-)
    whether a number is positive or
    negative.
1‟s Complement

• This is just inverting each bit.
                      flip the
      0000010         number.




     1 1 11 1 0 1
 1‟s compliment of 00000010
  is 1111101
2‟S Complement Process

The steps in the 2’s Complement process
First, complement all of the digits in a number.
  – A digit‟s complement is the number you add to the digit to
    make it equal to the largest digit in the base (i.e., 1 for
    binary). In binary language, the complement of 0 is 1, and
    the complement of 1 is 0.
Second, add 1.
  – Without this step, our number system would have two
    zeroes (+0 & -0), which no number system has.
2‟s Complement Examples

Example #1
         5 = 00000101
                        Complement Digits
             
             11111010
                   +1
                        Add 1
        -5 = 11111011

Example #2
       -13 = 11110011
                        Complement Digits
             
             00001100
                   +1
        13 = 00001101
Using The 2‟s Compliment Process
Use the 2‟s complement process to add together
the following numbers.

  POS          9          NEG          (-9)
+ POS       + 5        + POS        + 5
  POS         14          NEG          -4


  POS          9          NEG         (-9)
+ NEG     + (-5)       + NEG      + (-5)
  POS          4          NEG         -4
POS + POS → POS Answer
If no 2‟s complement is needed, use regular binary
addition.

            9            00001001
         + 5           + 00000101
           14             00001110
POS + NEG → POS Answer
Take the 2‟s complement of the negative number and
use regular binary addition.

         9             00001001
     + (-5)            + 11111011
         4           1]00000100
                             8th Bit = 0: Answer is Positive
                                     Disregard 9th Bit

                            00000101
                                                    2’s
                            11111010                    Complement
                                                          Process
                                  +1
                            11111011
POS + NEG → NEG Answer
     Take the 2‟s complement of the negative number and
     use regular binary addition.

               (-9)             11110111
              + 5           + 00000101
                -4            11111100
                                 8th Bit = 1: Answer is Negative



              11111100           00001001
 To Check:                                       2’s
Perform 2’s
Complement
              00000011           11110110                    Complement
                                                               Process
On Answer           +1                 +1
              00000100           11110111
NEG + NEG → NEG Answer
     Take the 2‟s complement of both negative numbers and
     use regular binary addition.
                                                                   2’s Complement
                (-9)          11110111                           Numbers, See
                                                                   Conversion Process

              + (-5)        + 11111011                           In Previous Slides



                -14         1]11110010
                                 8th Bit = 1: Answer is Negative
                                         Disregard 9th Bit

              11110010
 To Check:    
Perform 2’s
Complement
              00001101
On Answer           +1
              00001110
2.4: Coding System
 Binary Coded Decimal (BCD System)
 ASCII and EBCDIC
Binary-Coded Decimal (BCD)
    Four bits per digit       Digit   Bit pattern
    Note: the following bit    0        0000
    patterns are not used:     1        0001
          1010                 2        0010
          1011
          1100                 3        0011
          1101                 4        0100
          1110
                               5        0101
          1111
                               6        0110
                               7        0111
                               8        1000
                               9        1001
Example
• 709310 = ? (in BCD)

         7    0         9   3




       0111 0000 1001 0011
ASCII
• ASCII = American National Standard
  Code for Information Interchange
• 7-bit code
• 8th bit is unused (or used for a parity bit)
• 27 = 128 codes
• Two general types of codes:
  – 95 are “Graphic” codes (displayable on a
    console)
  – 33 are “Control” codes (control features of the
    console or communications channel)
ASCII Chart
        000   001   010   011   100   101   110   111
0000   NULL   DLE          0     @     P     `     p
0001   SOH    DC1   !      1     A     Q     a     q
0010   STX    DC2   "      2     B     R     b     r
0011   ETX    DC3   #      3     C     S     c     s
0100   EDT    DC4   $      4     D     T     d     t
0101   ENQ    NAK   %      5     E     U     e     u
0110   ACK    SYN   &      6     F     V     f     v
0111    BEL   ETB   '      7     G     W     g     w
1000    BS    CAN   (      8     H     X     h     x
1001    HT    EM    )      9     I     Y     i     y
1010     LF   SUB   *      :     J     Z     j     z
1011    VT    ESC   +      ;     K     [     k     {
1100     FF    FS   ,      <     L          l     |
1101    CR     GS   -      =     M     ]     m     }
1110    SO     RS   .      >     N     ^     n     ~
1111     SI    US   /      ?     O     _     o    DEL
000        001    010        011        100   101   110   111
0000     NULL         DLE                 0         @     P     `     p
0001      SOH         DC1     !           1         A     Q     a     q
0010      STX         DC2     "           2         B     R     b     r
0011      ETX         DC3     #           3         C     S     c     s
0100      EDT         DC4   Most significant bit
                              $           4         D     T     d     t
0101      ENQ        NAK     %            5         E     U     e     u
0110      ACK         SYN    &            6         F     V     f     v
0111      BEL         ETB     '           7         G     W     g     w
1000       BS        CAN      (           8         H     X     h     x
1001       HT         EM      )           9         I     Y     i     y
1010       LF         SUB     *           :         J     Z     j     z
1011Least significant ESC
           VT         bit    +            ;         K     [     k     {
1100       FF          FS     ,          <          L          l     |
1101       CR          GS     -          =          M     ]     m     }
1110       SO          RS     .          >          N     ^     n     ~
1111        SI         US     /           ?         O     _     o    DEL
e.g., ‘a’ = 1100001



        000   001   010      011        100   101   110   111
0000   NULL   DLE             0          @     P     `     p
0001   SOH    DC1   !         1          A     Q     a     q
0010   STX    DC2   "         2          B     R     b     r
0011   ETX    DC3   #         3          C     S     c     s
0100   EDT    DC4   $         4          D     T     d     t
0101   ENQ    NAK   %         5          E     U     e     u
0110   ACK    SYN   &         6          F     V     f     v
0111    BEL   ETB   '         7          G     W     g     w
1000    BS    CAN   (         8          H     X     h     x
1001    HT    EM    )         9          I     Y     i     y
1010     LF   SUB   *         :          J     Z     j     z
1011    VT    ESC   +         ;          K     [     k     {
1100     FF    FS   ,         <          L          l     |
1101    CR     GS   -         =          M     ]     m     }
1110    SO     RS   .         >          N     ^     n     ~
1111     SI    US   /         ?          O     _     o    DEL
95 Graphic codes



        000   001   010       011      100   101   110   111
0000   NULL   DLE              0        @     P     `     p
0001   SOH    DC1   !          1        A     Q     a     q
0010   STX    DC2   "          2        B     R     b     r
0011   ETX    DC3   #          3        C     S     c     s
0100   EDT    DC4   $          4        D     T     d     t
0101   ENQ    NAK   %          5        E     U     e     u
0110   ACK    SYN   &          6        F     V     f     v
0111    BEL   ETB   '          7        G     W     g     w
1000    BS    CAN   (          8        H     X     h     x
1001    HT    EM    )          9        I     Y     i     y
1010     LF   SUB   *          :        J     Z     j     z
1011    VT    ESC   +          ;        K     [     k     {
1100     FF    FS   ,          <        L          l     |
1101    CR     GS   -          =        M     ]     m     }
1110    SO     RS   .          >        N     ^     n     ~
1111     SI    US   /          ?        O     _     o    DEL
33 Control codes



        000   001   010         011          100   101   110   111
0000   NULL   DLE                0            @     P     `     p
0001   SOH    DC1   !            1            A     Q     a     q
0010   STX    DC2   "            2            B     R     b     r
0011   ETX    DC3   #            3            C     S     c     s
0100   EDT    DC4   $            4            D     T     d     t
0101   ENQ    NAK   %            5            E     U     e     u
0110   ACK    SYN   &            6            F     V     f     v
0111    BEL   ETB   '            7            G     W     g     w
1000    BS    CAN   (            8            H     X     h     x
1001    HT    EM    )            9            I     Y     i     y
1010     LF   SUB   *            :            J     Z     j     z
1011    VT    ESC   +            ;            K     [     k     {
1100     FF    FS   ,            <            L          l     |
1101    CR     GS   -            =            M     ]     m     }
1110    SO     RS   .            >            N     ^     n     ~
1111     SI    US   /            ?            O     _     o    DEL
Alphabetic codes




        000   001   010       011      100   101   110   111
0000   NULL   DLE              0        @     P     `     p
0001   SOH    DC1   !          1        A     Q     a     q
0010   STX    DC2   "          2        B     R     b     r
0011   ETX    DC3   #          3        C     S     c     s
0100   EDT    DC4   $          4        D     T     d     t
0101   ENQ    NAK   %          5        E     U     e     u
0110   ACK    SYN   &          6        F     V     f     v
0111    BEL   ETB   '          7        G     W     g     w
1000    BS    CAN   (          8        H     X     h     x
1001    HT    EM    )          9        I     Y     i     y
1010     LF   SUB   *          :        J     Z     j     z
1011    VT    ESC   +          ;        K     [     k     {
1100     FF    FS   ,          <        L          l     |
1101    CR     GS   -          =        M     ]     m     }
1110    SO     RS   .          >        N     ^     n     ~
1111     SI    US   /          ?        O     _     o    DEL
Numeric codes




        000   001   010        011        100   101   110   111
0000   NULL   DLE               0          @     P     `     p
0001   SOH    DC1   !           1          A     Q     a     q
0010   STX    DC2   "           2          B     R     b     r
0011   ETX    DC3   #           3          C     S     c     s
0100   EDT    DC4   $           4          D     T     d     t
0101   ENQ    NAK   %           5          E     U     e     u
0110   ACK    SYN   &           6          F     V     f     v
0111    BEL   ETB   '           7          G     W     g     w
1000    BS    CAN   (           8          H     X     h     x
1001    HT    EM    )           9          I     Y     i     y
1010     LF   SUB   *           :          J     Z     j     z
1011    VT    ESC   +           ;          K     [     k     {
1100     FF    FS   ,           <          L          l     |
1101    CR     GS   -           =          M     ]     m     }
1110    SO     RS   .           >          N     ^     n     ~
1111     SI    US   /           ?          O     _     o    DEL
Punctuation, etc.




        000   001   010        011          100   101   110   111
0000   NULL   DLE               0            @     P     `     p
0001   SOH    DC1   !           1            A     Q     a     q
0010   STX    DC2   "           2            B     R     b     r
0011   ETX    DC3   #           3            C     S     c     s
0100   EDT    DC4   $           4            D     T     d     t
0101   ENQ    NAK   %           5            E     U     e     u
0110   ACK    SYN   &           6            F     V     f     v
0111    BEL   ETB   '           7            G     W     g     w
1000    BS    CAN   (           8            H     X     h     x
1001    HT    EM    )           9            I     Y     i     y
1010     LF   SUB   *           :            J     Z     j     z
1011    VT    ESC   +           ;            K     [     k     {
1100     FF    FS   ,           <            L          l     |
1101    CR     GS   -           =            M     ]     m     }
1110    SO     RS   .           >            N     ^     n     ~
1111     SI    US   /           ?            O     _     o    DEL
The Problem


• Representing text strings, such as
  “Hello, world”, in a computer
“Hello, world” Example


         Binary        Hexadecimal       Decimal
H   =   01001000   =       48        =     72
e   =   01100101   =       65        =     101
l   =   01101100   =       6C        =     108
l   =   01101100   =       6C        =     108
o   =   01101111   =       6F        =     111
,   =   00101100   =       2C        =     44
    =   00100000   =       20        =     32
w   =   01110111   =       77        =     119
o   =   01100111   =       67        =     103
r   =   01110010   =       72        =     114
l   =   01101100   =       6C        =     108
d   =   01100100   =       64        =     100
EBCDIC

Extended BCD Interchange Code
(pronounced ebb’-se-dick)
• 8-bit code
• Developed by IBM
• Rarely used today
• IBM mainframes only
EBCDIC “Extended Binary Coded
Decimal Interchange Code” code table
EBCDIC “Extended Binary Coded
Decimal Interchange Code” code table
Example:                       MSB  LSB

1111 1111 1110 1001 1111 0111 1101 0111EBCDIC CODE

                   Z             6             P

Message below are represented in EBCDIC code. What is the message?
Please convert by using EBCDIC Code table given:

i) 1111 1100 1011 0101 1101 1001 EBCDIC CODE

Weitere ähnliche Inhalte

Was ist angesagt?

IEEE floating point representation
 IEEE floating point representation IEEE floating point representation
IEEE floating point representationMaskurAlShalSabil
 
Computer number systems
Computer number systemsComputer number systems
Computer number systemsRevi Shahini
 
Floating point representation
Floating point representationFloating point representation
Floating point representationmissstevenson01
 
Math1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex ConversionMath1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex Conversiongcmath1003
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notesKurenai Ryu
 
Lecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionLecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionMubashir Ali
 
Number system and codes
Number system and codesNumber system and codes
Number system and codesAbhiraj Bohra
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languagesparmeet834
 
binary number system
 binary number system binary number system
binary number systemvishal gupta
 
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
 
Lecture 6 data structures and algorithms
Lecture 6 data structures and algorithmsLecture 6 data structures and algorithms
Lecture 6 data structures and algorithmsAakash deep Singhal
 
電子學Ii 教師手冊ch7
電子學Ii 教師手冊ch7電子學Ii 教師手冊ch7
電子學Ii 教師手冊ch7lungtengtech
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete MathematicsMeghaj Mallick
 

Was ist angesagt? (20)

Circuits logiques1
Circuits logiques1Circuits logiques1
Circuits logiques1
 
Assignment on alp
Assignment on alpAssignment on alp
Assignment on alp
 
IEEE floating point representation
 IEEE floating point representation IEEE floating point representation
IEEE floating point representation
 
Computer number systems
Computer number systemsComputer number systems
Computer number systems
 
Mips
MipsMips
Mips
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Math1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex ConversionMath1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex Conversion
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notes
 
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 and codes
Number system and codesNumber system and codes
Number system and codes
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
binary number system
 binary number system binary number system
binary 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...
 
Lecture 6 data structures and algorithms
Lecture 6 data structures and algorithmsLecture 6 data structures and algorithms
Lecture 6 data structures and algorithms
 
Binary true ppt
Binary true pptBinary true ppt
Binary true ppt
 
電子學Ii 教師手冊ch7
電子學Ii 教師手冊ch7電子學Ii 教師手冊ch7
電子學Ii 教師手冊ch7
 
01.number systems
01.number systems01.number systems
01.number systems
 
Heap sort
Heap sortHeap sort
Heap sort
 
Number system
Number systemNumber system
Number system
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
 

Ähnlich wie 2.1 data represent on cpu

Lesson plan on data representation
Lesson plan on data representationLesson plan on data representation
Lesson plan on data representationPooja Tripathi
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptxAminaZahid16
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptxamudhak10
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptxamudhak10
 
01.number systems
01.number systems01.number systems
01.number systemsrasha3
 
Video lectures
Video lecturesVideo lectures
Video lecturesEdhole.com
 
W2 Chapter 2A Notes CCB1223 Digital Logic.pdf
W2 Chapter 2A Notes CCB1223 Digital Logic.pdfW2 Chapter 2A Notes CCB1223 Digital Logic.pdf
W2 Chapter 2A Notes CCB1223 Digital Logic.pdfMOHDZAMRIBINIBRAHIM1
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptxsulekhasaxena2
 
Unit 1 PDF.pptx
Unit 1 PDF.pptxUnit 1 PDF.pptx
Unit 1 PDF.pptxChandraV13
 
Data representation
Data representationData representation
Data representationChew Hoong
 
More on number system
More on number systemMore on number system
More on number systemsamina khan
 
digital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptxdigital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptxRameshK531901
 
Binary octal
Binary octalBinary octal
Binary octaldrdipo4
 
Number Systems
Number SystemsNumber Systems
Number Systemsstudent
 
Number Systems
Number SystemsNumber Systems
Number Systemsstudent
 

Ähnlich wie 2.1 data represent on cpu (20)

Lesson plan on data representation
Lesson plan on data representationLesson plan on data representation
Lesson plan on data representation
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
 
NUMBER BASE SYSTEM.pptx
NUMBER BASE SYSTEM.pptxNUMBER BASE SYSTEM.pptx
NUMBER BASE SYSTEM.pptx
 
Cse115 lecture01numbersystems
Cse115 lecture01numbersystemsCse115 lecture01numbersystems
Cse115 lecture01numbersystems
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
01.number systems
01.number systems01.number systems
01.number systems
 
Video lectures
Video lecturesVideo lectures
Video lectures
 
Mba ebooks
Mba ebooksMba ebooks
Mba ebooks
 
Chapter 1
Chapter   1Chapter   1
Chapter 1
 
W2 Chapter 2A Notes CCB1223 Digital Logic.pdf
W2 Chapter 2A Notes CCB1223 Digital Logic.pdfW2 Chapter 2A Notes CCB1223 Digital Logic.pdf
W2 Chapter 2A Notes CCB1223 Digital Logic.pdf
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
L 2.10
L 2.10L 2.10
L 2.10
 
Unit 1 PDF.pptx
Unit 1 PDF.pptxUnit 1 PDF.pptx
Unit 1 PDF.pptx
 
Data representation
Data representationData representation
Data representation
 
More on number system
More on number systemMore on number system
More on number system
 
digital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptxdigital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptx
 
Binary octal
Binary octalBinary octal
Binary octal
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Number Systems
Number SystemsNumber Systems
Number Systems
 

Kürzlich hochgeladen

Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...
5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...
5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...Apsara Of India
 
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service NashikCall Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna... Shivani Pandey
 
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...ritikasharma
 
👙 Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
👙  Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service👙  Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
👙 Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Serviceanamikaraghav4
 
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...noor ahmed
 
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...noor ahmed
 
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...rahim quresi
 
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...ritikasharma
 
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur EscortsVIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448ont65320
 
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment BookingCall Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Bookingnoor ahmed
 
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...noor ahmed
 
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...rahim quresi
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...aamir
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...aamir
 
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...Call Girls in Nagpur High Profile
 

Kürzlich hochgeladen (20)

Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
 
5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...
5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...
5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...
 
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
 
Desi Bhabhi Call Girls In Goa 💃 730 02 72 001💃desi Bhabhi Escort Goa
Desi Bhabhi Call Girls  In Goa  💃 730 02 72 001💃desi Bhabhi Escort GoaDesi Bhabhi Call Girls  In Goa  💃 730 02 72 001💃desi Bhabhi Escort Goa
Desi Bhabhi Call Girls In Goa 💃 730 02 72 001💃desi Bhabhi Escort Goa
 
Call Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service NashikCall Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
 
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
 
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
 
👙 Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
👙  Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service👙  Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
👙 Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
 
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
 
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
 
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
 
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
 
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur EscortsVIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
 
Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448
 
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment BookingCall Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
 
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
 
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
 
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
 

2.1 data represent on cpu

  • 1. Chapter 2.0: Data Representation on CPU FP203 : Computer Organization
  • 2. Topic Cover 2.1 Number System (decimal, binary, octal, and hexadecimal) 2.2 Arithmetic Operation in number system. 2.3 Convert Decimal, Binary, Octal and Hexadecimal Numbers to different bases. 2.4 Coding system: Sign and magnitude, 1‟s Complement and 2‟s Complement Binary Coded Decimal (BCD system) ASCII and EBCDIC
  • 3. INTRODUCTION Examples Real World Computer Data Input device Data Dear Mom: Keyboard 10110010… Digital 10110010… camera
  • 4. 2.1 Number System • Many number system are in use in digital technology. • Most common are: – Decimal, N10 – Binary, N2 – Octal, N8 – Hexadecimal, N16
  • 5. 2.2 ARITHMETIC OPERATION • Arithmetic operation in number system consist of: – Addition Only cover this 2 topics – Subtraction – Multiplication – Division
  • 6. Decimal number system • Decimal system is composed of 10 numerals or symbol. • Symbol: 0,1,2,3,4,5,6,7,8,9 10 Symbol • Example: 23410 Multiplier: 103 102 101 100 . 10-1 = 1000 = 100 = 10 =1 . = 0.1
  • 7. Example: 2746.210 This number is came from this calculation: 2 7 4 2 . 2 103 102 101 100 . 10-1 = 1000 = 100 = 10 =1 . = 0.1 2746.210 = (2x1000) + (7x100) + (4x10) + (2x1) + (2x0.1) = 2000 + 700 + 40 + 2 + 0.2 = 2746.2 Decimal number = Natural Number
  • 8. Arithmetic Operation Decimal + -
  • 9. Decimal Addition Example: a. 89310 + 32110 = b. 75710 + 24510 = 89310 75710 + 24510 +32110 100210 121410 Try this : 73310 + 79910 = ?
  • 10. Decimal Subtraction Example: a. 5410 - 1710 = b. 15710 - 8910 = 5410 15710 - 1710 - 8910 3710 6810 Try this : 533310 - 3710 = ?
  • 11. Octal number system • Octal system is composed of 8 numerals or symbol. • Symbol: 0,1,2,3,4,5,6,7 8 Symbol • Example: 658 Multiplier: 83 82 81 80 . 8-1 = 512 = 64 =8 =1 . = 0.125
  • 12. Example: 107.158 This number can be convert to decimal value using this calculation: 1 0 7 . 1 5 82 81 80 . 8-1 8-2 = 64 =8 =1 . = 0.1250 = 0.0156 107.158 = (1x64)+(0x8)+(7x1)+(1x0.1250)+(5x0.0156) = 64 + 0 + 7 + 0.1250 + 0.078 = 71.20310
  • 13. Arithmetic Operation Octal + -
  • 14. Octal Addition Sekiranya setiap hasil perjumlahan yang melebihi atau sama dengan 8 mestilah ditolak dengan 8. Example: a. 1238 + 3218 = b. 4578 + 2458 = 1238 4578 +3218 + 2458 4448 7248 Try this : 7338 + 748 = ?
  • 15. Octal Subtraction Sekiranya terdapat peminjam, nombor peminjam mestilah dijumlahkan dengan 8. Example: a. 5248 - 1678 = b. 1678 - 248 = 5248 1678 - 1678 - 248 3358 1438 Try this : 15238 - 3648 = ?
  • 16. Binary number system • Binary system is composed of 2 numerals or symbol. • Symbol: 0,1 2 Symbol • Example: 1012 Multiplier: 25 24 23 22 21 20 = 32 = 16 =8 =4 =2 =1
  • 17. Example: 10.1012 This number can be convert to decimal value using this calculation: 1 0 . 1 0 1 21 20 . 2-1 2-2 2-3 =2 =1 . = 0.5000 = 0.2500 = 0.1250 10.1012 = (1x2)+(0x1)+(1x0.5)+(0x0.25)+(1x0.125) = 2 + 0 + 0.5 + 0 + 0.125 = 2.62510
  • 18. Arithmetic Operation Binary + -
  • 19. Binary Addition The four basic rules for adding binary digits are as follows: 0+0=0 0+1=1 1+0=1 1 + 1 = 0 carry 1 Example: 110112 + 100012 = 110112 + 100012 1011002 Try this : 101112 + 1112 = ?
  • 20. Binary Subtraction The four basic rules for subtracting binary digits are as follows:- 0-0=0 0 - 1 = 1 borrow 1 1-0=1 1-1=0 Example: 10012 -102 = 10012 - 102 1112 Try this : 1010112 – 11112 =?
  • 21. Binary Subtraction Have previously looked at the subtraction operation. A quick review. Just like subtraction in any other base 10110 -10010 00100 • And when a borrow is needed. Note that the borrow gives us 2 in the current bit position. .
  • 23. In General • When there is no borrow into the msb position, then the subtrahend in not larger than the minuend and the result is positive and correct. • If a borrow into the msb does occur, then the subtrahend is larger than the minuend.
  • 24. Consider • Now do the operation 4 – 6 • Correct difference is -2 or -0010 • Different because 2n was brought in and made the operation M- N+2n
  • 25. Hexadecimal number system • Hexadecimal system is composed of 16 numerals or symbol. 10 11 12 13 14 15 • Symbol: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F 16 Symbol • Example: 7A16 Multiplier: 163 162 161 160 . 16-1 = 4096 = 256 = 16 =1 . = 0.0626
  • 26. Example: B6F.7C16 This number can be convert to decimal value using this calculation: B 6 F . 7 C 162 161 160 . 16-1 16-2 = 256 = 16 =1 . 0.0625 = 0.0039 B6F.7C16 = (11x256) + (6x16) + (15x1) + (7x0.0625) + (12x0.0039) = 2816 + 96 + 15 + 0.4375 + 0.0468 = 2927.484310
  • 27. Arithmetic Operation Hexadecimal + -
  • 28. Hexadecimal Addition Sekiranya setiap hasil perjumlahan yang melebihi atau sama dengan 16 mestilah ditolak dengan 16. Example: a. 3316 + 4716 = b. 20D316 + 12BC16 = 3316 20D316 + 4716 + 12BC16 338F16 7A16 Try this : DF16 + AB16 = ?
  • 29. Hexadecimal Subtraction Nilai yang kecil daripada 16 boleh dipinjam dari sebelah dengan nilai 16. Example: a. 4416 - 1716 = b. 20D316 - 12BC16 = 20D316 4416 - 12BC16 - 1716 0E1716 2D16 Try this : DF16 - AB16 = ?
  • 30. 2.3: Convert Decimal, Binary, Octal and Hexadecimal Numbers to different bases
  • 31. Convert Binary to Decimal (N2 – N10) Example: 1111012 This number can be convert to decimal value using this calculation: 1 1 1 1 0 1 25 24 23 22 21 20 = 32 = 16 =8 =4 =2 =1 1111012 = (1x32)+(1x16)+(1x8)+(1x4)+(0x2)+(1x1) = 32 + 16 + 8 + 4 + 0 + 1 = 6110 Try this: Convert 1100.10112 to decimal? Convert 100.10112 to decimal?
  • 32. Convert Binary to Octal (N2 - N8) Convert Binary to Octal adalah dengan membahagikan nombor Binary tersebut kepada 3 bit bermula dari sebelah kanan (LSB) LSB 1111012 1 1 1 1 0 1 22 21 20 22 21 20 =4 =2 =1 =4 =2 =1 1111012 = [(1x4)+(1x2)+(1x1)] [(1x4)+(0x2)+(1x1)] = [4 + 2 + 1][ 4 + 0 + 1] = 758 Try this: Convert 110010112 to Octal?
  • 33. Convert Binary to Hexadecimal (N2 – N16) Convert Binary to Hexadecimal adalah dengan membahagikan nombor binary kepada 4 bit bermula dari LSB. Sekiranya bit tersebut tidak mencukupi, maka digit „0‟ perlu ditambah pada MSB LSB 01012 0 1 0 1 23 22 21 20 =8 =4 =2 =1 01012 = (0x8)+(1x4)+(0x2)+(1x1) =0+4+0+1 = 516 Try this: Convert 101111012 to Hexadecimal?
  • 34. Convert Decimal to Binary (N10 – N2) Example: Convert 1810 to binary 2 2 18 9 181 0 2 4 1 2 2 0 2 1 0 0 1 1810 = 100102 Try this: Convert 32.20210 to binary? Convert 8910 to binary?
  • 35. Convert Decimal to Octal (N10 – N8) Example: Convert 300.3410 to Octal i. 300 Divide by 8 ii. 0.34 Multiply by 8 8 300 8 37 4 8 4 5 8 0 4 454 0.3410 = 0.34 x 8 = 2.72 ( 2+0.72 ) 0.72 x 8 = 5.76 ( 5+0.76 ) 0.76 x 8 = 6.08 ( 6+0.08 ) 0.08 x 8 = 0.64 ( 0+0.64 ) 0.25605 0.64 x 8 = 5.12 ( 5+0.12 ) 300.3410 = 454.256058 Try this: Convert 32.20210 to Octal?
  • 36. Convert Decimal to Hexadecimal (N10 – N16) Example: Convert 2010 to Hexadecimal 16 20 Balance 16 1 4 0 1 2010= 1416 Try this: Convert 343410 to hexadecimal?
  • 37. Convert Octal to Binary (N8 – N2) Convert Octal to Binary adalah dengan menukar setiap digit oktal kepada nilai 3 bit binary nya MSB 4 58 LSB 1 0 0 1 0 1 22 21 20 22 21 20 =4 =2 =1 =4 =2 =1 1001018 = [(1x4)+(0x2)+(0x1)] [(1x4)+(0x2)+(1x1)] = [4 + 0 + 0][ 4 + 0 + 1] = 100 1012 Try this: Convert 110010112 to Octal?
  • 38. Convert Hexadecimal to Binary (N16 – N2) Convert Octal to Binary adalah dengan menukar setiap digit hexadecimal kepada nilai 4 bit binary nya MSB 3 A16 LSB 0 0 1 1 1 0 1 0 23 22 21 20 23 22 21 20 =8 =4 =2 =1 =8 =4 =2 =1 3A16 = [(0x8)+(0x4)+(1x2)+(1x1)][(1x8)+(0x4)+(1x2)+(0x1)] = [0 + 0 + 2 + 1][ 8 + 0 + 2 + 0] = 0011 10102 Try this: Convert EFA16 to Binary?
  • 39. 2.4: Coding System  Sign and magnitude,  1‟s Complement & 2‟s Complement
  • 40. 8-Bit Binary Number System Apply what you have learned to the +127 01111111 pos(+) binary number systems. How do you +126 01111110 represent negative numbers in this 8-bit +125 01111101 binary system? Cut the number system in half. +1 00000001 0 00000000 Use 00000001 – 01111111 to indicate -1 11111111 positive numbers. -2 11111110 Use 10000000 – 11111111 to indicate negative numbers. -127 10000001 neg(-) -128 10000000 Notice that 00000000 is not positive or negative.
  • 41. Representing Negative Numbers • As there is no third symbol available to store a negative symbol explicitly we must use a bit to show if a number is negative or not. – We name this bit the „Sign Bit‟ – We use the leftmost bit. – If the „Sign Bit‟ is 1 then the number is negative, if it is 0 then it is positive.
  • 42. Sign Bit • What did do you notice about the +127 01111111 pos(+) most significant bit of the binary +126 01111110 numbers? +125 01111101 • The MSB is (0) for all positive numbers. +1 00000001 • The MSB is (1) for all negative 0 00000000 numbers. -1 11111111 -2 11111110 • The MSB is called the sign bit. • In a signed number system, this -127 10000001 allows you to instantly determine -128 10000000 neg(-) whether a number is positive or negative.
  • 43. 1‟s Complement • This is just inverting each bit. flip the 0000010 number. 1 1 11 1 0 1  1‟s compliment of 00000010 is 1111101
  • 44. 2‟S Complement Process The steps in the 2’s Complement process First, complement all of the digits in a number. – A digit‟s complement is the number you add to the digit to make it equal to the largest digit in the base (i.e., 1 for binary). In binary language, the complement of 0 is 1, and the complement of 1 is 0. Second, add 1. – Without this step, our number system would have two zeroes (+0 & -0), which no number system has.
  • 45. 2‟s Complement Examples Example #1 5 = 00000101 Complement Digits  11111010 +1 Add 1 -5 = 11111011 Example #2 -13 = 11110011 Complement Digits  00001100 +1 13 = 00001101
  • 46. Using The 2‟s Compliment Process Use the 2‟s complement process to add together the following numbers. POS 9 NEG (-9) + POS  + 5 + POS  + 5 POS 14 NEG -4 POS 9 NEG (-9) + NEG  + (-5) + NEG  + (-5) POS 4 NEG -4
  • 47. POS + POS → POS Answer If no 2‟s complement is needed, use regular binary addition. 9  00001001 + 5  + 00000101 14  00001110
  • 48. POS + NEG → POS Answer Take the 2‟s complement of the negative number and use regular binary addition. 9  00001001 + (-5) + 11111011 4  1]00000100 8th Bit = 0: Answer is Positive Disregard 9th Bit 00000101  2’s 11111010 Complement Process +1 11111011
  • 49. POS + NEG → NEG Answer Take the 2‟s complement of the negative number and use regular binary addition. (-9) 11110111 + 5  + 00000101 -4  11111100 8th Bit = 1: Answer is Negative 11111100 00001001 To Check:   2’s Perform 2’s Complement 00000011 11110110 Complement Process On Answer +1 +1 00000100 11110111
  • 50. NEG + NEG → NEG Answer Take the 2‟s complement of both negative numbers and use regular binary addition. 2’s Complement (-9)  11110111 Numbers, See Conversion Process + (-5)  + 11111011 In Previous Slides -14  1]11110010 8th Bit = 1: Answer is Negative Disregard 9th Bit 11110010 To Check:  Perform 2’s Complement 00001101 On Answer +1 00001110
  • 51. 2.4: Coding System  Binary Coded Decimal (BCD System)  ASCII and EBCDIC
  • 52. Binary-Coded Decimal (BCD) Four bits per digit Digit Bit pattern Note: the following bit 0 0000 patterns are not used: 1 0001 1010 2 0010 1011 1100 3 0011 1101 4 0100 1110 5 0101 1111 6 0110 7 0111 8 1000 9 1001
  • 53. Example • 709310 = ? (in BCD) 7 0 9 3 0111 0000 1001 0011
  • 54. ASCII • ASCII = American National Standard Code for Information Interchange • 7-bit code • 8th bit is unused (or used for a parity bit) • 27 = 128 codes • Two general types of codes: – 95 are “Graphic” codes (displayable on a console) – 33 are “Control” codes (control features of the console or communications channel)
  • 55. ASCII Chart 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 56. 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 Most significant bit $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011Least significant ESC VT bit + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 57. e.g., ‘a’ = 1100001 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 58. 95 Graphic codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 59. 33 Control codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 60. Alphabetic codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 61. Numeric codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 62. Punctuation, etc. 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 63. The Problem • Representing text strings, such as “Hello, world”, in a computer
  • 64. “Hello, world” Example Binary Hexadecimal Decimal H = 01001000 = 48 = 72 e = 01100101 = 65 = 101 l = 01101100 = 6C = 108 l = 01101100 = 6C = 108 o = 01101111 = 6F = 111 , = 00101100 = 2C = 44 = 00100000 = 20 = 32 w = 01110111 = 77 = 119 o = 01100111 = 67 = 103 r = 01110010 = 72 = 114 l = 01101100 = 6C = 108 d = 01100100 = 64 = 100
  • 65. EBCDIC Extended BCD Interchange Code (pronounced ebb’-se-dick) • 8-bit code • Developed by IBM • Rarely used today • IBM mainframes only
  • 66. EBCDIC “Extended Binary Coded Decimal Interchange Code” code table
  • 67. EBCDIC “Extended Binary Coded Decimal Interchange Code” code table Example: MSB LSB 1111 1111 1110 1001 1111 0111 1101 0111EBCDIC CODE Z 6 P Message below are represented in EBCDIC code. What is the message? Please convert by using EBCDIC Code table given: i) 1111 1100 1011 0101 1101 1001 EBCDIC CODE

Hinweis der Redaktion

  1. Introduction to the 8-Bit Binary Number system and how negative numbers are represented.
  2. Explanation of the sign bit.
  3. This slide describes the 2’s complement conversion process.
  4. Examples of the 2’s Complement Process.
  5. This slide show that there are only four possible combinations for adding together two signed numbers. The next four slides demonstrate each of these examples.
  6. Addition of two Positive numbers.
  7. This example shows the addition of one positive and one negative numbers. Note that this is done in the same way as subtracting a positive number from a positive number. In this case, the answer is positive.
  8. This slide demonstrates the addition of one positive and one negative number. Again, this is is the same a subtracting a positive number from a positive number. In this case the answer happens to be negative.
  9. This slide demonstrates the addition of two negative numbers.