binary fractions
Download
Skip this Video
Download Presentation
Binary Fractions

Loading in 2 Seconds...

play fullscreen
1 / 44

Binary Fractions - PowerPoint PPT Presentation


  • 125 Views
  • Uploaded on

Binary Fractions. Fractions. A radix separates the integer part from the fraction part of a number. 101.101 Columns to the right of the radix have negative powers of 2. Fractions. Fractions. Fractions. Fractions. Fractions. Fractions. Another way to assess the fraction:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Binary Fractions' - mizell


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
fractions
Fractions
  • A radix separates the integer part from the fraction part of a number.

101.101

  • Columns to the right of the radix have negative powers of 2.
fractions6
Fractions

Another way to assess the fraction:

4 2 1 . ½ ¼⅛

1 0 1 . 1 0 1

Just as this is 5

fractions7
Fractions

Another way to assess the fraction:

4 2 1 . ½ ¼ ⅛

1 0 1 . 1 0 1

Just as this is 5 so is this!

fractions8
Fractions

Another way to assess the fraction:

4 2 1 . ½ ¼ ⅛

1 0 1 . 1 0 1

Just as this is 5so is this

Except it’s not 5 ones.

It’s 5 eighths.

fractions9
Fractions

Another way to assess the fraction:

4 2 1 . ½ ¼ ⅛

1 0 1 . 1 0 1

Just as this is 5so is this

Except it’s not 5 ones.

It’s 5 eighths.

fractions10
Fractions

But there’s no dot (.) in Binary!

We need to explore a method for storing fractions without inventing another symbol.

scientific notation
Scientific Notation

Very large and very small numbers are often represented such that their orders of magnitude can be compared.

The basic concept is an exponential notation using powers of 10.

a × 10b

Where b is an integer, and a is a real number such that:

1 ≤ |a| < 10

scientific notation examples
Scientific Notation - examples

An electron\'s mass is about

0.00000000000000000000000000000091093826 kg.

In scientific notation, this is written:

9.1093826×10−31 kg.

scientific notation examples1
Scientific Notation - examples

An electron\'s mass is about

0.00000000000000000000000000000091093826 kg.

In scientific notation, this is written:

9.1093826×10−31 kg.

scientific notation examples2
Scientific Notation - examples

The Earth\'s mass is about

5,973,600,000,000,000,000,000,000 kg.

In scientific notation, this is written:

5.9736×1024 kg.

scientific notation examples3
Scientific Notation - examples

The Earth\'s mass is about

5,973,600,000,000,000,000,000,000 kg.

In scientific notation, this is written:

5.9736×1024 kg.

e notation
E Notation

To allow values like this to be expressed on calculators and early terminals

‘× 10b’

was replaced by ‘Eb’

So 9.1093826×10−31

becomes 9.1093826E−31

And 5.9736×1024

becomes 5.9736E+24

e notation1
E Notation

The ‘a’ part of the number is called the mantissa or significand.

The ‘Eb’ part is called the exponent.

Since exponents could also be negative, they would typically have a sign as well.

floating point storage
Floating Point Storage

In floating point notation the bit pattern is divided into 3 components:

Sign – 1 bit (0 for +, 1 for -)

Exponent – stored in Excess notation

Mantissa – must begin with 1

floating point storage1
Floating Point Storage

In floating point notation the bit pattern is divided into 3 components:

Sign– 1 bit (0 for +, 1 for -)

Exponent – stored in Excess notation

Mantissa – must begin with 1

floating point storage2
Floating Point Storage

In floating point notation the bit pattern is divided into 3 components:

Sign– 1 bit (0 for +, 1 for -)

Exponent– stored in Excess notation

Mantissa – must begin with 1

floating point storage3
Floating Point Storage

In floating point notation the bit pattern is divided into 3 components:

Sign– 1 bit (0 for +, 1 for -)

Exponent– stored in Excess notation

Mantissa– must begin with 1

mantissa
Mantissa

Assumes a radix point immediately left of the first digit.

The exponent will determine how far, and in which direction to move the radix.

an example in 8 bits
An example in 8 bits

If the following pattern stores a floating point value, what is it?

01101001

an example in 8 bits1
An example in 8 bits

If the following pattern stores a floating point value, what is it?

01101001

Separate it into its components:

an example in 8 bits2
An example in 8 bits

If the following pattern stores a floating point value, what is it?

01101001

Separate it into its components:signexponentmantissa

an example in 8 bits3
An example in 8 bits

If the following pattern stores a floating point value, what is it?

01101001

Separate it into its components:signexponentmantissa

an example in 8 bits4
An example in 8 bits

01101001

A sign bit of 0 means the number is…?

an example in 8 bits5
An example in 8 bits

01101001

A sign bit of 0 means the number is positive.

110 in Excess Notation converts to …?

an example in 8 bits6
An example in 8 bits

01101001

A sign bit of 0 means the number is positive.

110 in Excess Notation converts to +2.

Place the radix in the mantissa …

an example in 8 bits7
An example in 8 bits

01101001

A sign bit of 0 means the number is positive.

110 in Excess Notation converts to +2.

Place the radix in the mantissa .1001

Put it all together …

an example in 8 bits8
An example in 8 bits

01101001

A sign bit of 0 means the number is positive.

110 in Excess Notation converts to +2.

Place the radix in the mantissa .1001

Put it all together …

+.1001 * 22

an example in 8 bits9
An example in 8 bits

+.1001 * 22

Multiplying a binary number by 2 shifts the bits left (moves the radix to the right) one position.

So this exponent tells us to shift the radix 2 positions right.

+10.01

= 2¼

normal form
Normal Form
  • The rule of Normal Form guarantees a unique mapping of patterns onto values.
normal form1
Normal Form
  • Consider the following 8-bit pattern in Normal Form:
normal form2
Normal Form
  • The exponent represents 0 so the radix is moved 0 positions.
normal form3
Normal Form
  • The exponent represents 0 so the radix is moved 0 positions.
normal form4
Normal Form
  • Now consider this pattern, which is NOT in Normal Form.
normal form5
Normal Form
  • The exponent represents +1sothe radix is moved 1 position to the right.
normal form6
Normal Form
  • The exponent represents +1 so the radix is moved 1 position to the right.
normal form7
Normal Form
  • But this is the same result as the first example!
normal form8
Normal Form
  • In fact there are MANY possible ways to represent the same value:
normal form9
Normal Form
  • The first bit of the mantissa must be 1 to prevent multiple representations of the same value.
ad