Class 5: Representing Data Flashcards

1
Q

Unsigned integer

A

= simple binary = B2U

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

If we have w bits, how many integer values can be represent with unsigned int?

A

0 - 2^w-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Signed integer

A

= two’s complement = B2T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the most significant bit for signed integer represent

A

Represents the sign bit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

For signed integer, given w bits how many integer values can be represent

A

-2^(w-1) to 2^(w-1) -1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Convert decimal to binary

A

Divide by 2 and record remainder. When you get to bottom, read the remainder from bottom up

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Convert from decimal to hexadecimal

A

Same as binary, just divide by 16 instead

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly