1S3 1S3
  1. ASCII
  2. Fractions
  3. Problems

  1. Problems(will do in class tomorrow, but try it yourself. Look at the notes):
    1. What is (315)6?
    2. Convert 711 into base 3.
    3. If we used base 16 computers, what range of integers could we express? What range of numbers using floating points?
    4. What is 1/5 in binary?
    5. Convert (2769)16 into octal.


  1. (315)6 = 3*62+1*6+5 = 3*36+6+5 = 108+11 = 119.
  2. 711 in base 3: Divide and recored the remainders:
    711 / 3
    = 237
    Remainder
    0
    237 / 3
    = 79
    Remainder
    0
    79 / 3
    = 26
    Remainder
    1
    26 / 3
    = 8
    Remainder
    2
    8 / 3
    = 2
    Remainder
    2
    2 / 3
    = 0
    Remainder
    2.
    So the remainders are 0,0,1,2,2,2 and 711 in base 3 is
    222100.
    We can check that this is the case:
    2*35+2*34+2*33+1*32 = 2*243+2*81+2*27+9

    = 486+162+54+9 = 486+225 = 711.
  3. If we use base 16 then:

  4. What is 1/5 in binary? We'll work out the first few decimal places. We have
    1/5 = 0.b1b2b3....
    To determine b1 we multiply both sides by 2. Then we have
    2/5 = b1.b2b3....
    Since this is less than 1, b1 = 0 and we have
    2/5 = 0.b2b3....
    Again we multiply both sides by two to get
    4/5 = b2.b3....
    So b2 = 0 and
    8/5 = b3.b4....
    This means that b3 = 1 and
    3/5 = 0.b4b5....
    So
    6/5 = b4.b5...
    and b4 = 1 too.
    1/5 = 0.b5b6...,
    which is back where we started. So b1 = 0, b2 = 0, b3 = 1 and b4 = 1 which repeats:
    2/5 = 0.
    0011
     
  5. Convert (2769)16 into octal. This is not that easy, but easy enough if you don't try to do it in one step. First convert the hex to binary, then convert it to octal.
    (2769)16 = (0010011101101001)2.
    Now this has 16 digits, since each hex digit corresponds to 4 binary ones. Every 3 binary digits then corresponds to one octal one so we need 6 octal ones. The trick is to pad two 0's to the start!
    (000010011101101001)2 = (023551)8


File translated from TEX by TTH, version 2.70.
On 16 Oct 2002, 10:09.