119

Click here to load reader

Math1003 1.16 - Real Numbers

Embed Size (px)

Citation preview

Page 1: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

1.16Real Numbers

Page 2: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Goal

To be able to represent real numbers in IEEE standard form.

Page 3: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Page 4: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

35.0

Page 5: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Real Numbers are stored by a totally different method from integers.

35.0

Page 6: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Real Numbers are stored by a totally different method from integers.

Although many schemes are possible, we will explore a scheme that is widely used and accepted by the IEEE (Institute for Electrical and Electronic Engineering).

35.0

Page 7: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

35.0

Page 8: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Real numbers are stored as 32 bits (usually referred to as the type ‘float’) or64 bits (usually referred to as the type ‘double’).

35.0

Page 9: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Real numbers are stored as 32 bits (usually referred to as the type ‘float’) or64 bits (usually referred to as the type ‘double’).

For our discussions, we’ll use 32 bitsto represent a real number.

35.0

Page 10: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

35.0The 32 bits are divided into 3 sections.

Page 11: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

35.0The 32 bits are divided into 3 sections.

Page 12: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

35.0signbit

The 32 bits are divided into 3 sections.

Page 13: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

35.0signbit

The 32 bits are divided into 3 sections.

exponent

8 bits

Page 14: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

35.0signbit

The 32 bits are divided into 3 sections.

exponent

8 bitsnumber

23 bits

Page 15: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

35.0signbit

The 32 bits are divided into 3 sections.This is the 1-8-23 pattern.

exponent

8 bitsnumber

23 bits

Page 16: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

35.0signbit

The 32 bits are divided into 3 sections.This is the 1-8-23 pattern.

sign bit : 0 for a positive number, 1 for negative

Page 17: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Page 18: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Steps to represent a number in IEEE standard form

Page 19: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Steps to represent a number in IEEE standard form1. calculate the binary form of the number

Page 20: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form

Page 21: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit

Page 22: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary)

Page 23: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary)5. store the normalized binary form without the first 1

Page 24: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Page 25: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Page 26: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

1. 25.010 = 11001.02

Real Numbers

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Page 27: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

1. 25.010 = 11001.02

2. normalize 11001.02

Real Numbers

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Page 28: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

1. 25.010 = 11001.02

2. normalize 11001.02

Real Numbers

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1.1001 x 24

Page 29: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

1. 25.010 = 11001.02

2. normalize 11001.02

Real Numbers

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1.1001 x 24

this is similar to scientific notation except that we use

powers of 2

Page 30: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

1. 25.010 = 11001.02

2. normalize 11001.02

Real Numbers

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1.1001 x 24

we moved the point 4 positions to

the left, so our exponent is 4

Page 31: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

1. 25.010 = 11001.02

2. normalize 11001.02

3. set the sign bit

Real Numbers

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1.1001 x 24

Page 32: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 25.010 in IEEE standard1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

25.010

is a positive number

1.1001 x 24

Page 33: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit 25.010

is a positive number

1.1001 x 24

Page 34: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section

1.1001 x 24

Page 35: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section

1.1001 x 24we want to store both negative and positive exponents

Page 36: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section

1.1001 x 24we’ll store it so that it corresponds to the

following table

00000000 -12700000001 -12600000010 -125

… …01111111 010000000 110000001 210000010 310000011 4

… …11111111 128

Page 37: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section

1.1001 x 24we’ll store it so that it corresponds to the

following table

00000000 -12700000001 -12600000010 -125

… …01111111 010000000 110000001 210000010 310000011 4

… …11111111 128

Page 38: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section

1.1001 x 24

00000000 -12700000001 -12600000010 -125

… …01111111 010000000 110000001 210000010 310000011 4

… …11111111 128

to correspond to the table, we’ll add 127

to the exponent

Page 39: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section

1.1001 x 24

00000000 -12700000001 -12600000010 -125

… …01111111 010000000 110000001 210000010 310000011 4

… …11111111 128

4 + 127 = 131131 = 100000112

to correspond to the table, we’ll add 127

to the exponent

Page 40: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 1 1

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section

1.1001 x 24

4 + 127 = 131131 = 100000112

Page 41: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 1 1

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section5. store the normalized binary form

1.1001 x 24

Page 42: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 1 1

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section5. store the normalized binary form

1.1001 x 24

1.1001

Page 43: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 1 1

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section5. store the normalized binary form

1.1001 x 24

1.1001

the normalized form will always have a 1 to the left

of the point, so let’s ignore the 1 (but when we use this number in a

calculation, we’ll put it “back”)

Page 44: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 1 1

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section5. store the normalized binary form

1.1001 x 24

1.1001

the normalized form will always have a 1 to the left

of the point, so let’s ignore the 1 (but when we use this number in a

calculation, we’ll put it “back”)

Page 45: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 1 1 1 0 0 1

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section5. store the normalized binary form

1.1001 x 24

1.1001

Page 46: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 1 1 1 0 0 1

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section5. store the normalized binary form

1.1001 x 24

1.1001

we’ll fill in the rest

with 0s

Page 47: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Represent 25.010 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 25.010 = 11001.02

2. normalize 11001.02 = 1.1001 x 24

3. set the sign bit4. store 4 in the exponent section5. store the normalized binary form

1.1001 x 24

1.1001

we’ll fill in the rest

with 0s

Page 48: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard

Page 49: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard

Page 50: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

Page 51: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112 3410 = 1000102

Page 52: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112 3410 = 1000102

.2 x 2 = 0.4

Page 53: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112 3410 = 1000102

.2 x 2 = 0.4

.4 x 2 = 0.8

Page 54: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112 3410 = 1000102

.2 x 2 = 0.4

.4 x 2 = 0.8

.8 x 2 = 1.6

Page 55: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112 3410 = 1000102

.2 x 2 = 0.4

.4 x 2 = 0.8

.8 x 2 = 1.6

.6 x 2 = 1.2

Page 56: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112 3410 = 1000102

.2 x 2 = 0.4

.4 x 2 = 0.8

.8 x 2 = 1.6

.6 x 2 = 1.2

.2 x 2 = 0.4

Page 57: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112 3410 = 1000102

.2 x 2 = 0.4

.4 x 2 = 0.8

.8 x 2 = 1.6

.6 x 2 = 1.2

.2 x 2 = 0.4

34.210 = 100010.00112

Page 58: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

Page 59: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

Page 60: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

Page 61: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

1.000100011 x 25

Page 62: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

3. set the sign bit

1.000100011 x 25

Page 63: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers1 1

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

3. set the sign bit

1.000100011 x 25

Page 64: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers1 1

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

3. set the sign bit4. store 5 in the exponent section as (5 + 127 = 132) 100001002

1.000100011 x 25

Page 65: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers1 1 0 0 0 0 1 0 0 0

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

3. set the sign bit4. store 5 in the exponent section as (5 + 127 = 132) 100001002

1.000100011 x 25

Page 66: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers1 1 0 0 0 0 1 0 0 0

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

3. set the sign bit4. store 5 in the exponent section as (5 + 127 = 132) 100001002

5. store the normalized binary form

1.000100011 x 25

Page 67: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

3. set the sign bit4. store 5 in the exponent section as (5 + 127 = 132) 100001002

5. store the normalized binary form

1.000100011 x 25

Page 68: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

3. set the sign bit4. store 5 in the exponent section as (5 + 127 = 132) 100001002

5. store the normalized binary form

1.000100011 x 25

we’ll fill in the rest with the repeating

pattern

Page 69: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Real Numbers1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0

Represent -34.210 in IEEE standard1. 34.210 = 100010.00112

2. normalized as 1.000100011 x 25

3. set the sign bit4. store 5 in the exponent section as (5 + 127 = 132) 100001002

5. store the normalized binary form

1.000100011 x 25

we’ll fill in the rest with the repeating

pattern

Page 70: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Page 71: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

Page 72: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

Page 73: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112 .025 x 2 = 0.05

Page 74: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112 .025 x 2 = 0.05.05 x 2 = 0.1

Page 75: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112 .025 x 2 = 0.05.05 x 2 = 0.1.1 x 2 = 0.2

Page 76: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112 .025 x 2 = 0.05.05 x 2 = 0.1.1 x 2 = 0.2.2 x 2 = 0.4

Page 77: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112 .025 x 2 = 0.05.05 x 2 = 0.1.1 x 2 = 0.2.2 x 2 = 0.4.4 x 2 = 0.8

Page 78: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112 .025 x 2 = 0.05.05 x 2 = 0.1.1 x 2 = 0.2.2 x 2 = 0.4.4 x 2 = 0.8.8 x 2 = 1.6

Page 79: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112 .025 x 2 = 0.05.05 x 2 = 0.1.1 x 2 = 0.2.2 x 2 = 0.4.4 x 2 = 0.8.8 x 2 = 1.6.6 x 2 = 1.2

Page 80: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112 .025 x 2 = 0.05.05 x 2 = 0.1.1 x 2 = 0.2.2 x 2 = 0.4.4 x 2 = 0.8.8 x 2 = 1.6.6 x 2 = 1.2.2 x 2 = 0.4

Page 81: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112 .025 x 2 = 0.05.05 x 2 = 0.1.1 x 2 = 0.2.2 x 2 = 0.4.4 x 2 = 0.8.8 x 2 = 1.6.6 x 2 = 1.2.2 x 2 = 0.4

0.02510 = 0.00000112

Page 82: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

Page 83: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.000001120.000001100110011

Page 84: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

2. normalized as 1.1001 x 2-6

0.000001100110011

Page 85: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

2. normalized as 1.1001 x 2-6

1.100110011001

Page 86: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

2. normalized as 1.1001 x 2-6

1.1001 x 2-6

Page 87: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

2. normalized as 1.1001 x 2-6

3. set the sign bit

1.1001 x 2-6

Page 88: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 0

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

2. normalized as 1.1001 x 2-6

3. set the sign bit

1.1001 x 2-6

Page 89: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 0

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

2. normalized as 1.1001 x 2-6

3. set the sign bit4. store -6 in the exponent section as (-6 + 127 = 121) 011110012

1.1001 x 2-6

Page 90: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 0 1 1 1 1 0 0 1 1

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

2. normalized as 1.1001 x 2-6

3. set the sign bit4. store -6 in the exponent section as (-6 + 127 = 121) 011110012

1.1001 x 2-6

Page 91: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 0 1 1 1 1 0 0 1 1

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

2. normalized as 1.1001 x 2-6

3. set the sign bit4. store -6 in the exponent section as (-6 + 127 = 121) 011110012

5. store the normalized binary form

1.1001 x 2-6

Page 92: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0

Represent 0.02510 in IEEE standard

Steps to represent a number in IEEE standard form1. calculate the binary form of the number2. calculate the normalized binary form3. set the sign bit4. store the exponent (+127, store as an 8-bit binary) 5. store the normalized binary form without the first 1

1. 0.02510 = 0.00000112

2. normalized as 1.1001 x 2-6

3. set the sign bit4. store -6 in the exponent section as (-6 + 127 = 121) 011110012

5. store the normalized binary form

1.1001 x 2-6

Page 93: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number

Page 94: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number

Page 95: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10001010 (= 138)

Page 96: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10001010 (= 138)3. the decimal exponent is 138 - 127 = 11

Page 97: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10001010 (= 138)3. the decimal exponent is 138 - 127 = 114. from the number section, we have 1.112

Page 98: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10001010 (= 138)3. the decimal exponent is 138 - 127 = 114. from the number section, we have 1.112

5. therefore the number is 1.112 x 211

Page 99: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10001010 (= 138)3. the decimal exponent is 138 - 127 = 114. from the number section, we have 1.112

5. therefore the number is 1.112 x 211

6. 1.112 = 1.75 and 211 = 2048

Page 100: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10001010 (= 138)3. the decimal exponent is 138 - 127 = 114. from the number section, we have 1.112

5. therefore the number is 1.112 x 211

6. 1.112 = 1.75 and 211 = 20487. 1.75 x 2048 = 3584

Page 101: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10001010 (= 138)3. the decimal exponent is 138 - 127 = 114. from the number section, we have 1.112

5. therefore the number is 1.112 x 211

6. 1.112 = 1.75 and 211 = 20487. 1.75 x 2048 = 3584

3584

Page 102: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number

Page 103: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number

Page 104: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10000000 (= 128)

Page 105: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10000000 (= 128)3. the decimal exponent is 128 - 127 = 1

Page 106: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10000000 (= 128)3. the decimal exponent is 128 - 127 = 14. from the number section, we have 1.11001

Page 107: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10000000 (= 128)3. the decimal exponent is 128 - 127 = 14. from the number section, we have 1.110015. therefore the number is 1.11001 x 21

Page 108: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10000000 (= 128)3. the decimal exponent is 128 - 127 = 14. from the number section, we have 1.110015. therefore the number is 1.11001 x 21

6. 1.11001 = 1.78125 and 21 = 2

Page 109: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10000000 (= 128)3. the decimal exponent is 128 - 127 = 14. from the number section, we have 1.110015. therefore the number is 1.11001 x 21

6. 1.11001 = 1.78125 and 21 = 27. 1.78125 x 2 = 3.5625

Page 110: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 0, we know this is a positive number2. the exponent section is 10000000 (= 128)3. the decimal exponent is 128 - 127 = 14. from the number section, we have 1.110015. therefore the number is 1.11001 x 21

6. 1.11001 = 1.78125 and 21 = 27. 1.78125 x 2 = 3.5625

3.5625

Page 111: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number

Page 112: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 1, we know this is a negative number

Page 113: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 1, we know this is a negative number2. the exponent section is 01111000 (= 120)

Page 114: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 1, we know this is a negative number2. the exponent section is 01111000 (= 120)3. the decimal exponent is 120 - 127 = -7

Page 115: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 1, we know this is a negative number2. the exponent section is 01111000 (= 120)3. the decimal exponent is 120 - 127 = -74. from the number section, we have 1.001001

Page 116: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 1, we know this is a negative number2. the exponent section is 01111000 (= 120)3. the decimal exponent is 120 - 127 = -74. from the number section, we have 1.0010015. therefore the number is 1.001001 x 2-7

Page 117: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 1, we know this is a negative number2. the exponent section is 01111000 (= 120)3. the decimal exponent is 120 - 127 = -74. from the number section, we have 1.0010015. therefore the number is 1.001001 x 2-7

6. 1.001001 = 1.140625 and 2-7 = 0.0078125

Page 118: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 1, we know this is a negative number2. the exponent section is 01111000 (= 120)3. the decimal exponent is 120 - 127 = -74. from the number section, we have 1.0010015. therefore the number is 1.001001 x 2-7

6. 1.001001 = 1.140625 and 2-7 = 0.00781257. 1.140625 x 0.0078125 = -0.008911132813

Page 119: Math1003 1.16 - Real Numbers

MATH1003

10110100101011010100101010111010101111011011101111011101110111101110111011110111111010110100101011110110110101111011010100111111011010100110101001

Real Numbers1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Determine the real number1. since the sign bit is 1, we know this is a negative number2. the exponent section is 01111000 (= 120)3. the decimal exponent is 120 - 127 = -74. from the number section, we have 1.0010015. therefore the number is 1.001001 x 2-7

6. 1.001001 = 1.140625 and 2-7 = 0.00781257. 1.140625 x 0.0078125 = -0.008911132813

-0.008911132813