Name:

Date:

Username:

1) Convert the binary number 10110101 to decimal by hand, showing all steps. Use scrap paper from the recycling bin if needed. Write the final result here, i.e. the decimal representation.

2) Also convert the number 10110101 to hexadecimal (base 16). Remember that to do this, take each 4-bit part of the number, starting with the least significant bits (the right), and figure out what number from 0 to 15 those 4 bits equals. That number or letter will be the next digit (starting from the right) for the hexadecimal number. Show your answer here.

3) Using the binary number converter applet, type 10110101 into the Binary area. Verify your answers for 1 and 2 above. Take a screenshot (press the keys “Alt + PrintScreen”) and paste (Ctrl+V) it here.

4) One way to convert a decimal number to binary is to repeatedly divide the number by 2, writing down the remainder at each step. To see how to do this in binary, type a positive number, such as 42, into the 2’s complement applet and press Convert. (Nothing to write here)

5) To learn how to do this yourself, convert the decimal number 51 to binary using this method of repeated division, just like the applet did. Use scrap paper from the recycling bin if needed. Write the final result here, i.e. the binary representation.

6) Use the binary number converter applet to check your result. Type 51 into the Decimal area. Take a screenshot and paste it here.

7) The base for a number can by anything, not just 2, 10, or 16. For example, the number 101 in base 5 would be 1 + 25 = 26. Try to convert 121 from base 5 to decimal.

8) Add the two binary numbers together by hand, showing all carries:

0 1 1 0 1 1 0 1

+ 1 0 0 0 1 0 1 1

Use the scrap paper if needed. Write the final result here.

9) Now enter the numbers 01101101 and 10001011 into the binary addition applet. Click on Add and verify your answer with the applet’s result. Take a screenshot.

10) Use the binary addition applet to add the numbers 01101101 and 10101011 instead (note that only 1 bit has changed). What happened to the leftmost bit in the addition?

10 cont.) What are the limits of the binary addition applet? What is the largest result it can produce correctly? Record your answer below, in both binary and decimal values.

11) We can use the addition applet to perform subtraction. This is done by adding a negative number. We will use 2s complement to represent the negative numbers. Now try 5 – 3, first with paper and pen, then paste a screenshot of the applet verifying your answer. Do the same for 3 – 5. Remember to use 8-bit representations of the numbers, as this is what the addition applet uses. To represent a negative number in 2’s complement, first get the 8-bit representation of the positive number, then flip all the bits (0 becomes 1, 1 becomes 0), and add 1 to the result.

12) Convert the 2’s complement number 11101010 to decimal. Note that the most significant bit is 1, meaning this is a negative number.