Database representation Flashcards

1
Q

What is the key defining feature of two’s complement

A

The most significant bit (leftmost bit) is negative

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

What are the three steps to Logical shifts (left or right)

A
  1. Move each bit the designated number of bits
  2. Discard any bits beyond the scope of data
  3. Insert zeros into vacant positions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the new number represent from logical left and right shifts

A

Left the original number being multiplied by 2
Right the original number being divided by 2

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

What is the difference between left arithmetic shifts and left logical shifts

A

In the arithmetic shifts very left bit is negative, whereas in logical shifts it is positive

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

What is the difference between right arithmetic shifts and left logical shifts

A

In arithmetic shifts the very left bit is signed and, instead of replacing the vacant spots with a zero they are replaced with a one

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

Truncating

A

Removes the least significant bits from the number

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

What kind of bias does truncating introduce

A

A downwards bias i.e. Numbers are smaller

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

Rounding

A

Approximates the number to the nearest whole number/tenth/hundredth etc.

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

What might truncation be used to do

A

Ensure that a value doesn’t exceed a limited length

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

What industries may have regulations and standards related to truncating and rounding

A

Financial reporting

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