Skip to content

Instantly share code, notes, and snippets.

@rtoal
Last active January 17, 2018 00:04
Show Gist options
  • Save rtoal/a9453dc8ca870781f7c37e162ed1f502 to your computer and use it in GitHub Desktop.
Save rtoal/a9453dc8ca870781f7c37e162ed1f502 to your computer and use it in GitHub Desktop.
CMSI 284 Spring 2018 Homework 1

Do all these problems without the aid of a computer. The purpose of these exercises is for you to develop skills. If you spend the time to practice with pencil and paper (or a whiteboard) you will learn the material much better.

To submit your answers, copy the text below into a secret gist on GitHub and fill in the answers at the end of the same line. Email or DM me the url of the secret gist.

Make sure your Gist filename is CMSI284S2018HW1.md.

Your submission will be autograded so it is imperative that your answers are formmatted as expected; for example, if a 32-bit hex value is required, you are to use 8 hex digits, without ever doing silly things like removing leading zeros or putting spaces or commas between digits. Same with binary values (never omit leading zeros) and with decimals (no spaces, no commas). MAKE SURE YOUR GIST HAS EXACTLY 64 LINES, NO MORE, NO LESS. Answers that are "correct" but not in the proper format will receive zero points, since answers that follow instructions are better than those that do not. Again, make sure your gist has exactly 64 lines, or the autograder may get confused and you very well may end up with zero points. Don't risk it.

Oh, questions about carry and overflow assume signed (modular) arithmetic.

  1. Hex FAC3 in binary is:
  2. Hex FAC3 as an unsigned decimal is:
  3. Hex FAC3 as a signed decimal is:
  4. Hex 9876 in binary is:
  5. Hex 9876 as an unsigned decimal is:
  6. Hex 9876 as a signed decimal is:
  7. Hex 0064 in binary is:
  8. Hex 0064 as an unsigned decimal is:
  9. Hex 0064 as a signed decimal is:
  10. Hex 8000 in binary is:
  11. Hex 8000 as an unsigned decimal is:
  12. Hex 8000 as a signed decimal is:
  13. Decimal 8000 encoded in 16-bits (unsigned) is in hex:
  14. Decimal 8000 encoded in 16-bits (signed) is in hex:
  15. Decimal -11 encoded in 16-bits (signed) is in hex:
  16. Decimal -32717 encoded in 16-bits (signed) is in hex:
  17. Binary 10111101 in hex is:
  18. Binary 1011110100000001 as an unsigned decimal is:
  19. Binary 1011110100000001 as a signed decimal is:
  20. If we had 20-bit registers, the smallest signed decimal value would be:
  21. If we had 20-bit registers, the largest signed decimal value would be:
  22. 1000000 bytes in mebibytes (exactly, no rounding) is:
  23. 131072 bytes in mebibytes (exactly, no rounding) is:
  24. 512 tebibytes in pebibytes (exactly, no rounding) is:
  25. 247 bytes in mebibytes (exactly, no rounding) is:
  26. 231 bytes in mebibytes (exactly, no rounding) is:
  27. 768 kibibytes in mebibytes (exactly, no rounding) is:
  28. The modular sum of 16-bit hex values 3511 + 4FFC is:
  29. The saturated sum of 16-bit hex values 3511 + 4FFC is:
  30. The 16-bit operation 3511 + 4FFC has a carry (Y or N):
  31. The 16-bit operation 3511 + 4FFC has a overflows (Y or N):
  32. The modular sum of 16-bit hex values 6159 + F702 is:
  33. The saturated sum of 16-bit hex values 6159 + F702 is:
  34. The 16-bit operation 6159 + F702 has a carry (Y or N):
  35. The 16-bit operation 6159 + F702 has a overflows (Y or N):
  36. The modular sum of 16-bit hex values EEEE + C00C is:
  37. The saturated sum of 16-bit hex values EEEE + C00C is:
  38. The 16-bit operation 9EEE + AB0C has a carry (Y or N):
  39. The 16-bit operation 9EEE + AB0C has a overflows (Y or N):
  40. The modular sum of 16-bit hex values 201C + A333 is:
  41. The saturated sum of 16-bit hex values 201C + A333 is:
  42. The 16-bit operation 201C + A333 has a carry (Y or N):
  43. The 16-bit operation 201C + A333 has a overflows (Y or N):
  44. The negation of 16-bit word B00F is:
  45. The negation of 16-bit word 2232 is:
  46. The negation of 16-bit word 8000 is:
  47. The negation of 32-bit word FFF329BA is:
  48. The largest finite IEEE-754 single precision float, in hex is:
  49. The smallest finite IEEE-754 single precision float, in hex is:
  50. The largest nonzero negative IEEE-754 single precision float, in hex is:
  51. The smallest nonezero positive IEEE-754 single precision float, in hex is:
  52. -5.125 × 290 as a 32-bit float, in hex is:
  53. 75.25 × 2112 as a 32-bit float, in hex is:
  54. 96.03125 as a 32-bit float, in hex is:
  55. 2-138 as a 32-bit float, in hex is:
  56. 1.5 × 2-143 as a 32-bit float, in hex is:
  57. -5 as a 32-bit float, in hex is:
  58. -16777216 as a 32-bit float, in hex is:
  59. Hex 43700000, when iterpreted as an IEEE-754 pattern, is in decimal:
  60. Hex 3F800000, when iterpreted as an IEEE-754 pattern, is in decimal:
  61. Hex 419C0000, when iterpreted as an IEEE-754 pattern, is in decimal:
  62. Hex C0FF0000, when iterpreted as an IEEE-754 pattern, is in decimal:
  63. Hex 00040000, when iterpreted as an IEEE-754 pattern, is in decimal, 2 to the power:
  64. Hex C059000000000000, when iterpreted as an IEEE-754 pattern, is in decimal:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment