Mini-Lab: ASCII Representation of Characters

 


Reference: Binary to Hexadecimal Conversion Table

Binary
Hex
0000
0
0001
1
0010
2
0011
3
0100
4
0101
5
0110
6
0111
7
Binary
Hex
1000
8
1001
9
1010
A
1011
B
1100
C
1101
D
1110
E
1111
F

ASCII to Binary, Part I

Using the ASCII conversion chart and the Binary/Hexadecimal table above, answer the following questions. (Here's a Markdown template for this mini-lab, if you want to use it.)

  1. What is the hexadecimal representation for the string "Hello"?
     
     
  2. What is the binary representation for the string "Hello"?
     
     

Binary to ASCII, Part I

Consider the following binary code:

01000011 01001111 01001101 01010000 00100000
00110001 00110000 00110101 00100001
  1. Express the binary code above in hexadecimal (all on one line).
     
     
  2. If these numbers represent an ASCII string, what string do they represent?
     
     
  3. If they represent an array of 9 numbers, what are the numbers in the array in decimal notation? Tip for getting started:
            01000011 (binary)
               = 43 (hexadecimal)
                   = (4 x 16) + 3  =  64 + 3  =  67
    

     
     

     
     

ASCII to Binary, Part II

You are going to think up a word or short phrase in English, encode it in binary, and provide it to someone else to decode. Your word or phrase should consist of at least six letters; don't make it too long, both for your sake and for the sake of the person who will decode it. Make sure that it is appropriate to give to anyone else in the class to decode.

  1. Write down your word or phrase in English.
     
     
  2. Express your word or phrase in hexadecimal. (Question: if you chose to represent a phrase, how do you represent the spaces between words?)
     
     
  3. Express your word or phrase in binary.
     
     
  4. Copy the binary representation of your word or phrase to the ASCII to Binary Mini-Lab channel in the CS 105 Teams site. Make sure to leave spaces between each octet (i.e., leave a space after every eighth binary digit), as was done above.

Binary to ASCII, Part II

You are going to decode the message that was placed above yours in the ASCII to Binary Mini-Lab channel. (If you are the first person to enter an encoded message, you will have to wait and decode the message that is entered after yours.)

  1. What is the name of the person whose binary representation you are about to decode?
     
     
  2. Write down the binary representation of their message.
     
     
  3. Express that word or phrase in hexadecimal.
     
     
  4. Write out the word or phrase in English.