Number systems and floating point numbers Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is normalised form of floating point numbers?

A

A floating point number needs an implied binary point after most significant bit.

Always in twos complement.

The first two values are always different

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

Problem with FP numbers?

A

FP numbers can only represent a finite amount of real numbers. Some numbers such as 3.8 cannot be represented as .8 cannot be represented in binary. Therefore a loss in precision

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

Define Absolute error and Relative error?

A

Absolute error: The difference between the actual value and the nearest representable value for a given number of bits.

Relative error: Percentage of the actual value

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

For FP numbers, how do you get:
Largest positive
Smallest positive
Largest magnitude negative
Smallest magnitude negative

A

Largest positive: Most positive mantissa and Most positive exponent

Smallest positive: Least positive mantissa and Most negative exponent

Largest magnitude negative: Most negative mantissa and Most positive exponent

Smallest magnitude negative: Least negative mantissa and Most negative exponent

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

Define an overflow and an underflow

A

Overflow: Number too large to be represented by number of bits

Underflow: Number too small to be represented by number of bits

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

What are the different number systems and what letters are attributed to them

A

Real number: R
Rational number: Q
Integer: Z
Natural numbers: N
Irrational numbers: R/Q
Ordinals numbers (describes position like 1n, 2n): N/a

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

Define binary, denary and Hexadecimal

A

Denary is counting in base 10, each digit is multiple of 10

Binary is in base 2, each digit is multiple of 2

Hexadecimal is in base 16, each digit is multiple of 16 (0-9 and A-F)

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

How do you add and multiply binary numbers.

A

ADD: Put in columns and then for 0 and 1 put down a 1. For 0 and 0 put down a 0. For 1 and 1 put down a 0 and carry over a 1.

MULTIPLY: Exactly like normal column method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. 0111 0010 + 0111 0010
  2. 0000 0011 + 0000 1110
  3. 1101 1001 + 0011 1101
A
  1. 1110 0100
  2. 0001 0001
  3. 1 0001 0110 (the first digit is an overflow)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. 1101 * 11
  2. 10101 * 101
  3. 11101 * 10111
A
  1. 10 0111
  2. 110 1001
  3. 101 0011 011
How well did you know this?
1
Not at all
2
3
4
5
Perfectly