🐻
berkeley
  • #Despair
  • 16A/B
    • Thevenin and Norton Equivalence
    • Resistive Touchscreen
    • Trilateration and Correlation
    • RC Circuits & Transient Analysis
  • 61B
    • Testing
    • References in Java
    • Linked Lists in Java
    • Implementation Inheritance
    • Comparables and Iterators
    • Casting
    • Lists and Sets
    • Asymptotics
    • Trees
    • Hashing
    • PriorityQueue and Heap
    • Graphs, Tree Traversals
    • Tries
    • Sorting
  • Discrete Mathematics
    • Sets + Mathematical Notation
    • Logic and Proofs
    • Induction
    • Cryptography/RSA
    • Modular Arithmetic
    • Discrete Probability
  • Linear Algebra
    • Linear Equations
    • Matrix Algebra
    • Determinants
    • Vector Spaces
    • Eigenvectors and Eigenvalues
    • Projections and Orthogonality
    • SVD/PCA
  • Math 275 — Ordinary Differential Equations
    • Math 275 — Overview
    • Modeling via Differential Equations
    • Linear Systems
  • INTEGBI 35AC
    • Humans Came From Fish
    • Evolution's History
    • Typology
    • The Human Diaspora
  • 170
    • Basics
    • Divide and Conquer
    • Fast Fourier Transform
    • Graphs
    • Greedy
  • 61C
    • Pointers and Memory
    • Floating Point
    • Compliation, Assembly, Linking, Loading
    • RISC-V, Assembly
Powered by GitBook
On this page
  • Representing Fractions
  • Addition with a fixed point:
  • Multiplication with a fixed point:
  • Floating Binary Points

Was this helpful?

  1. 61C

Floating Point

Representing Fractions

We have a binary point that signifies the boundary between the integer and fractional portion. That is, the number to the right of the decimal point represents 2āˆ’12^{-1}2āˆ’1, and the number to the right of the decimal number represents 212^121. 10.10102=21+2āˆ’1+2āˆ’310.1010_2 = 2^1 + 2^{-1} + 2^{-3}10.10102​=21+2āˆ’1+2āˆ’3 .

Addition with a fixed point:

Same as traditional addition.

Multiplication with a fixed point:

Same as traditional multiplication.

Floating Binary Points

If we could just move the binary point wherever we wanted, we could store much more varied information. To do this we use a variant on scientific notation. It has a few components: given a scientific number aƗ223a \times 2^{23}aƗ223, aaais the mantissa, 232323is the exponent, 222is the radix, or base. In IEEE 754 Floating Point Standard, we dedicate one bit to the sign, 8 bits for our exponent, 23 bits for our significand.

We can use bias notation to represent more numbers, where the bias is a number subtracted to get the real number.

PreviousPointers and MemoryNextCompliation, Assembly, Linking, Loading

Last updated 3 years ago

Was this helpful?