100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Floating Point Binary $8.51   Add to cart

Other

Floating Point Binary

 18 views  0 purchase
  • Course
  • Institution

This document contains notes on binary floating point numbers, including basic arithmetic, conversion to and from base-10, error calculations, signed floating point numbers, and more.

Preview 2 out of 7  pages

  • April 20, 2023
  • 7
  • 2022/2023
  • Other
  • Unknown
avatar-seller
Binary Arithmetic
#computer-science #binary #bases #arithmetic


Addition
There are only five necessary operations in binary:

02 + 02 = 02

02 + 12 = 12

12 + 02 = 12

12 + 12 = 102

12 + 12 + 12 = 112




Carry Bits

In the last two cases above, the left-hand bit is a carry bit. There are
three options for dealing with these:

1. Carry it into the next calculation
2. Ignore it
3. Throw an exception

, Fixed Point Binary
Run Code Block
Run Code Block
#computer-science #binary #bases #arithmetic

See also: Floating Point Binary

In denary, place values right of the decimal point have negative index
values . This is the same in binary

Index: 2 1 0 -1 -2 -3
3 4 1 . 1 0 2

This is base 10 ^^^



Index: 2 1 0 -1 -2 -3 -4 -5
0 1 0 . 1 0 1 1 0
Place 4 1 1/2 1/8 1/32
Value: 2 1/4 1/16

Result: = 2.6875 (base 10)


This representation works for both signed and unsigned integers.


An Issue

Some decimals, such as 0.1, cannot be represented exactly in binary.

0.12 ≡ 0.000110011001100110011. . .2




Fixed Point Representation
When encoding fractional numbers in binary, there are two main constraints:

1. There are a set number of bits available for encoding the data
2. There is no special character for where the binary point goes

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller pencilcaseman. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $8.51. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

62890 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$8.51
  • (0)
  Add to cart