4.5 Data Representation Flashcards

1
Q

What do you use to represent negative numbers in binary?

A

2’s complement

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

What is it called when you have a leftover carry bit after addition in binary?

A

An overflow

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

What is the quickest way to multiply a binary number by 2?

A

Shift each column to the left by one padding the right with zeros

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

What is the quickest way to multiply a binary number by 4?

A

Shift each column to the left by two padding the right with zeros

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

When using 2’s complement what is the MSB used as?

A

A sign bit

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

What is the main method we use to convert a number into a negitave using twos compliment?

A

Starting from the LSB copy up to and including the first one after that continue down the number and invert each bit

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

What does LSB stand for?

A

Least significant bit

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

What does MSB stand for?

A

Most significant bit

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

What is the method we dont use to convert a number into a negitave using twos compliment?

A

Invert all bits then add one

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

How do we subtract one number from another in binary?

A

Convert the number you wish to subtract into 2’s compliment and then add them

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

When there is overflow when subtracting what do you do about it?

A

Nothing, you ignore it

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

What are the types of numbers?

A

Rational, Irrational, Natural, Integer, Real and Ordinal

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

What letter symbols represent irrational numbers?

A

Q and R

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

What letter symbols represents natural numbers?

A

N

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

What letter symbols represents integers?

A

Z

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

What is the basic definition for rational numbers?

A

It is a number that can be represented by two integers in a fraction.

17
Q

What is the basic definition for irational numbers?

A

It is a number that cannot be represented by two integers in a fraction.

18
Q

What is the basic definition for real numbers?

A

It is a number that is not imaginary

19
Q

What is the basic definition for intigers?

A

It is a number that has no decimal places (Whole numbers)

20
Q

What is the basic definition for ordinal numbers?

A

It is a number that is used for indexing and is thus a position on a list

21
Q

What is the basic definition for natural numbers?

A

It is a number that is greater than or equal to 0 and is whole (not negative)

22
Q

Describe a set of rational numbers

A

A set of rational numbers would be numbers where the numerator and denominators are whole numbers

23
Q

Why are all integers rational numbers?

A

Because all integers can be written as a fraction as they are all divisible by one

24
Q

How do you what do you use to represent fractions in binary?

A

You use fixed point notation

25
What are the first four colum headings in after the fixed point in both power and index form?
2^-1, 2^-2, 2^-3, 2^-4 | 1/2, 1/4, 1/8, 1/16
26
What does adding a fixed point to a binary number do to the range if you keep the same number of bits?
It reduces the range as the MSB will have a lower heading
27
What does adding a fixed point to a binary number do to the accuracy if you keep the same number of bits?
It increases the acuracy as you can make it more precise.
28
Can all fractions be represented with fixed point bits?
No, you just have to get as close to the original number as you can
29
What is the formula to calculate the largest postive number possible when using 2's compliment where n is the number of bits?
2^(n-1)-1
30
What is the formula to calculate the largest negative number possible when using 2's compliment where n is the number of bits?
2^(n-1)
31
How do you calculate the highest possible number in a normal binary number where n is the number of bits?
2^n - 1
32
How do you calculate the range of a normal binary number where n is the number of bits?
2^n