Mini-Lab: ASCII Representation of Characters
Reference: Binary to Hexadecimal Conversion Table
NOTE: For the last 2 sets of exercises, where it says to swap
encodings with someone else in the class,
do this by posting your message to our Collaboration Center's Teams channel in the "101 - Intro to Computers and Computing".
Then decode the message above yours and send the
decoded message to the person who posted it. (If you
post the first message, wait for the second poster and
decode their message.)
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.)
- What is the hexadecimal representation for the string "Hello"?
- 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 00110001 00100001
- Express the binary code above in hexadecimal (all on one line).
- If these numbers represent an ASCII string, what string do they
represent?
- 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.
- Write down your word or phrase in English.
- Express your word or phrase in hexadecimal.
(Question: if you chose to represent a phrase, how do
you represent the spaces between words?)
- Express your word or phrase in binary.
- Copy the binary representation of your word or phrase to the
ASCII to Binary Mini-Lab channel in the CS 101 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.)
- What is the name of the person whose binary representation you
are about to decode?
- Write down the binary representation of their message.
- Express that word or phrase in hexadecimal.
- Write out the word or phrase in English.