Unit 0 Assignment#
Practice numeric conversions#
Practice all of these ten possible conversions:
decimal <-> binary, octal, hexadecimal
binary <-> octal, hexadecimal
Here’s a fun way to practice hex <-> decimal
: Find an RGB color picker
(Processing, Photoshop, Google). Pick a color. Look at the hex values,
convert to decimal RGB, and check your work. Do the same in reverse.
The Unit 0 Quiz will consist of 5 numeric conversions.
Exercises for class Tuesday#
Convert 1234 decimal to hexadecimal. [0x4D2]
Convert 0x321 hexadecimal to decimal. [801]
Convert 123 decimal to octal. [173]
Convert 321 octal to decimal. [209]
Convert 123 decimal to binary. [1111011]
Convert 123 decimal to binary using your answer from #2.
Convert 801 decimal to binary. [1100100001]
Convert 801 decimal to binary using your answer from #1.
Convert binary 111011001 to octal. [731]
Convert binary 11011010 to hex. [0xDA]
Bonus. Convert 0x29A to decimal. Remind me to tell you a story about this.
Practice using the command line (after Thursday’s class)#
You won’t be tested on stuff related to the command line. However, you will be using the command line extensively this year. Think of your time spent practicing working on the command line as an investment that will save you time not only this school year, but any time you do any future work on the computer.
Here is a recommended exercise, but I also encourage you to practice on your own:
On paper, draw out a directory tree (2-3 levels deep) with some text files in various directories.
On the command line, create this directory tree. Look at your directory in Finder / Explorer to check your work.
Practice writing programs (after Thursday’s class)#
Create a new directory and write the “Hello, world!” programs for both Python and Java from scratch. Make modifications to your programs, and re-compile and run.