Lecture 3: Data Representation Flashcards

1
Q

How many bits is one hexadecimal digit?

A

4

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

How many bits is a word?

A

16

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

What is polynomial evaluation

A

1234(base 10) = 1 * 10^3 + 2 * 10^2 + 3 * 10^1 + 4 * 10^0
Basically times the face value by 10 to the power of the position that the digit is in. The right most digit is either 0, or for decimal is the smallest decimal point.

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

How do we convert binary to decimal?

A

We can use Polynomial evaluation

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

Can we use polynomial evaluation to go from decimal to binary?

A

No

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

How we convert a whole number to binary?

A
  1. Divide by the target Radix or Base (for binary this is 2)
  2. The remainder is either going to be a 1 or 0 and we use this in the binary representation.
  3. The outcome of the division then gets divided by the radix again with the remainder going into the binary number.
  4. Stop once the quotient = 0.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do we convert a decimal to binary?

A
  1. Multiply by the target radix / base.
  2. The whole number will become the digit in the binary representation.
  3. Repeat with the new fraction.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is representational rollover?

A

This occurs as a consequence of fixed precision in a computer. If we add one to a number, then we may lose digits off the left hand end giving a wayward number:
999 + 1 -> 000

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

What is overflow?

A

This is when we exceed the range of numbers that we are allowed to work in.

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

What is the radix for a hexidecimal number?

A

16

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

How many digits are there?

A

16, ranging from 0 -> 15

0->9 then A->F

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

What is the rule of thumb for twos complement?

A

Invert all bits and then add 1 on to the right.

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