5.4 Binary Number Systems Flashcards

1
Q

What’s the difference between signed and unsigned binary?

A

Unsigned binary values can only be used to represent positive numbers whilst signed binary can be used to represent both positive and negative numbers.

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

How do you add 2 unsigned binary numbers?

A

add the values in each column and put the value below. If the the value is more than 1 carry the digit to the next column. Then the final result is on the bottom row.

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

How do you work out the amount of permutations and range of unsigned numbers for n bits?

A

there are 2^n possible permutations. Giving a range of 0 to 2^n - 1.

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

How do you multiply 2 unsigned binary numbers?

A

Write out one of the two numbers starting under each occurrence of a 1 in the second number and then add the contents of the columns.

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

What is unique about signed binary

A

Allows for the representation of both positive and negative numbers.

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

How do you subtract using two’s complement?

A

The computer will add negative numbers

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

How do you work the range of signed binary numbers for n bits?

A

The range is (2^n-1) - 1 to - 2^n-1

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

What are the 2 ways a fraction can be represented in binary

A

Floating point and fixed point

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

How do you convert floating point (binary to decimal)

A

Convert the exponent to decimal. then treat the number as if there were a binary point between the first and second digits of the mantissa

Move the binary points the number of positions specified by the exponent.

Treat the mantissa as fixed point binary number and convert to decimal

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

How do you convert floating point into decimal?

A

Convert the decimal number to fixed point binary

Normalise the number is that it starts with 01 (positive) or 10 (negative)

The binary point is assumed to be between the first two digits in the mantissa. Move the binary point until this is achieved.

(negative = move left), (positive = move right)

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

Why do rounding errors occur in binary?

A

There are some numbers that cannot be represented in binary
Binary must approximate these numbers.

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

What is a relative error?

A

A measure of uncertainty in a given value compared to the actual size of the value

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

How do you calculate a relative error

A

absolute error / actual error

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

What is an absolute error?

A

The actual amount by which a value is inaccurate

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

How do you calculate an absolute error?

A

Finding the difference between the given value and the actual value

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

discuss the benefit of floating point over fixed point

A

Floating point allows for the representation of a greater range of numbers with a given amount of bits

17
Q

What is normalisation?

A

Floating points are normalised to provide the maximum level of precision for a given number of bits.
Involves ensuring that the mantissa starts with 01 or 10

18
Q

When does Underflow occur?

A

Underflow occurs when very small numbers are to be represented but there are not enough bits available.

19
Q

When does overflow occur?

A

Overflow occurs when a number is too large to be represented with the available bits.