Practice Problems 1

Note: for questions like these, your process for finding the solution is often more important than the final answer. Write out what you are doing, and include an explanation in words.

The Irvine notes showed an example of converting 37 decimal to binary (100101). What do you get when you convert 42 to binary? What do you get when you take that binary result and convert it to decimal? Use the way that we did it in class, i.e. bit2 x 2^2 + bit1 x 2^1 + bit0 x 2^0

We saw an example of addition with two binary numbers. What result do you get when you add 0011 to 0110? What are the equivalents of these in decimal? What is the equivalent of the result in decimal?

What result do you get when you add 0010 to 0111? What are the equivalents of these in decimal? What is the equivalent of the result in decimal? If these 4-bit numbers are considered signed, does that change your answer to the decimal equivalents (of the operands and the result)?

What is 100110101 in hexadecimal?

What is the hexadecimal value 450C in binary?

Suppose that we have the binary number 10000001 (assume that it is unsigned). What is this in decimal? What is this in hexadecimal? Now suppose that you flip the MSB. What do the decimal and hexadecimal change to? Suppose that instead you flip the LSB. What do the decimal and hexadecimal change to?

What is the result of 10010101 AND 00111100 ?

What is the result of 10010101 OR 00111100 ?

Why does a question asking for the result of 10010101 NOT 00111100 make no sense?

What is the result of NOT 10010101 ?