CSCI 255 Homework 1

This assignment is due in class or to my office assistant in RH 215 by 9:30 AM on 28 August.

Problem 1

Convert the following unsigned binary numbers into decimal numbers.

  1. 11111
  2. 10101
  3. 11101000

Problem 2

Convert the following decimal numbers into binary numbers.

  1. 16
  2. 255
  3. 2012

Problem 3

Convert the following signed decimal numbers into 8-bit twos-complement representation.

  1. 32
  2. -32
  3. 255
  4. -255
  5. 0
  6. -0

Problem 4

Convert the following 5-bit twos-complement numbers into signed decimal numbers.

  1. 00000
  2. 01010
  3. 10000
  4. 10110
  5. 11000

Problem 5

For numbers are stored in 5-bit words,

  1. what is the smallest unsigned number that can be stored?
  2. what is the largest unsigned number that can be stored?
  3. what is the smallest twos-complement number that can be stored?
  4. what is the largest twos-complement number that can be stored?