CS21b Introduction to Computing II
Number Representations
November 21, 2002
Quiz: Answer the following questions correctly. Place your
answers in a 1/2 sheet of paper and show all your solutions. You may use
the decimal-binary-hexadecimal table.
- Convert the number 127 to binary. (2)
- Convert the binary number 0b11010011 to decimal. (2)
- Convert the hex number 0x8CF to binary and decimal. (4)
- What is the sum of these two hex numbers? (Answer in hex) (4)
0x2C
+0x9E
- What is the result of the following operation assuming you are working
with a 9-bit word length? (use 2's complement for subtraction) (4)
(01010101 + 10110111) - 100001011 = ?
- Use 2's complement to find the difference of the following signed binary
numbers: (4)
01111101
- 01100100
Return to Main