1. Write the following numbers in binary: 0476, 0x2A3F, 0xBDAE. The numbers are written either in octal or hex. You can distinguish octal from hex because, by convention, hex numbers are written beginning with “0x” while octal numbers are written beginning with a zero only. For example:

    • 0476 means the octal number 476. You can tell it is an octal number because it begins with “0” but not “0x.”
    • 0x2A3F means the hex number 2A3F . You can tell it is a hex number because it begins with “0x.”
    • 438 is a decimal number because it doesn’t begin with “0” or “0x.”
  2. Write each of the following binary numbers in both octal and hex: 011011101010, 1101000110, 000101111. Follow the convention mentioned above when writing your octal and hex numbers.

  3. Write the following binary numbers in decimal: 1, 10, 11, 100, 101, 110, 1000, 1010, 1000001, 0000101.

  4. Write the following hex numbers in decimal: 0xBDAE, 0x99, 0x2A3F , 0x87. Notice that because 16 is larger than 10, some numbers can be e xpressed using fewer digits in base 16 than in base 10.

  5. Write each of the following decimal numbers in binary, octal, and hexadecimal: 8, 16, 63, 64, 128. Follow the convention mentioned above when writing your octal and hex numbers

  6. Write the binary representation of ‘A’ (capital A) in both ASCII and 16-bit Unicode. Show all bits in each encoding. Recall that ASCII is an 8-bit code. The ASCII code is shown below.

  7. Java uses 16-bit Unicode. Write the binary representation of the word ‘Apple’ as it would be stored in memory by a Java program.

  8. What text is represented by the following binary characters?

01010100 01101111 00100000 01100010 01100101 00100000 01101111 01110010
00100000 01101110 01101111 01110100 00100000 01110100 01101111 00100000
01100010 01100101