Class 5: Representing Data Flashcards
1
Q
Unsigned integer
A
= simple binary = B2U
2
Q
If we have w bits, how many integer values can be represent with unsigned int?
A
0 - 2^w-1
3
Q
Signed integer
A
= two’s complement = B2T
4
Q
What does the most significant bit for signed integer represent
A
Represents the sign bit
5
Q
For signed integer, given w bits how many integer values can be represent
A
-2^(w-1) to 2^(w-1) -1
6
Q
Convert decimal to binary
A
Divide by 2 and record remainder. When you get to bottom, read the remainder from bottom up
7
Q
Convert from decimal to hexadecimal
A
Same as binary, just divide by 16 instead
8
Q
A