Computer Science 150
Spring 1998

CS150 Spring 1998 Problem Set 4 Solutions

Written by Terry Ng

Problem 5.1

  • a) 0101
  • b) 1101
  • c) 0001
  • d) 1101

    Problem 5.2

  • a) 0101
  • b) 0010
  • c) 1101
  • d) Overflow!

    Problem 5.3

  • a) 0101
  • b) 0001
  • c) 1101
  • d) Overflow!

    Extra Question

  • a) 31
  • b) 1023
  • c) 1,048,575
  • d) 32 sec; 1024 sec; 1,048,576 sec
  • e) About 584 Years
  • f) To represent N-bit decimal number, you need b bits: b = CELING[N/log2]
  • g) To represent nN-bit base b number, you need x bits: x = CELING[N(logB/logA)]
    Maintained by Jon Aytac
    orpheo@cory.eecs.berkeley.edu
    3/6/1998