CSCI 255 Homework 1

This assignment is due in class or to my office assistant in RH 215 by 4:30 pm on 29 January.

Problem 1

Convert the following unsigned binary numbers into decimal numbers.

  1. 10101111
  2. 10000101
  3. 10101000

Problem 2

Convert the following decimal numbers into binary numbers.

  1. 109
  2. 320

Problem 3

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

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

Problem 4

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

  1. 0000000
  2. 0101010
  3. 1010101
  4. 0011000
  5. 1110000
  6. 1101010

Problem 5

Add the following pairs of 5-bit twos-complement numbers. Indicate which additions result in an overflow.

  1. 01110 + 10011
  2. 00110 + 00110
  3. 01110 + 01110
  4. 11110 + 01110
  5. 11111 + 11111
  6. 10111 + 10111

Problem 6

Convert the following 16-bit binary numbers into hexadecimal notation.

  1. 1000100010110011
  2. 1010000011000000

Problem 7

Convert the following hexadecimal numbers into binary numbers.

  1. 7777
  2. BEEF

Problem 8

For each character within the following string of, write the corresponding ASCII encoding as a two hex digits.

  1. H@5t6