CS3421 Problem Set 1

Binary Representation

Solutions

  1. 00100101

  2. 0000000000100101

  3. 11111111111111111111111111011011

  4. 2b

  5. 295fd

  6. 1100101011111110

  7. 0.0100110011

  8. 0.001001000

  9. 95

  10. 74

  11. -147

  12. 00000000

  13. 11110010

  14. 00101010

  15. 216-1 = 65,535

  16. -215 = -32,768

  17. positive + positive -> negative
    negative + negative -> positive
    positive - negative -> negative
    negative - positive -> positive

  18. -1.0 x 2-8 = -0.00390625
    1.5 x 23 = 12.0
    0.0
    -infinity
    NaN

  19. 0 10000011 10111010000000000000000 = 41dd000016
    1 01111111 10000000000000000000000 = bfc0000016
    0 10001000 11111111110000000000000 = 447fe00016

  20. The largest biased exponent is 255, but that is used for special numbers (infinity, NaN). The largest biased exponent for normal numbers is then 254, which corresponds to a real exponent of 254 - 127 = 127.

  21. Any one of a number of things. It could be an unsigned number with decimal value 2,349,793,280. It could be a two's compliment number with decimal value -1,945,174,016. It could be a MIPS R2000 instruction that loads the contents of memory word 0 into register 15. It could be four (unprintable) ascii characters. It could be part of an image, sound, or who knows what. The actual answer is that what it represents depends on how you (or the machine) interpret it.