{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Date: July 30, 2019\n", "\n", "### Representation of numbers on a computer\n", "\n", "Given that any computer has limited storage capacity, we can represent only finitely many numbers on a computer. Thus, inevitably, we have to deal with approximations of the real number system using finite computer representations. To arrive at a consistent representation of floating point numbers across different computer architecture, the most widely used and accepted standard is the Institute of Electrical and Electronics Engineers (IEEE-754) standard for representing real numbers. First note that all numbers are stored in binary (base $2$) format. Any *normal* number on the machine is represented as\n", "\t$$x = \\pm 1.d_1d_2\\ldots d_s \\times 2^{e}$$\n", "where $1.d_1d_2\\ldots d_s$ is the significand and $e$ is the exponent (both represented using $0$'s and $1$'s). For example, consider the number $77$ in decimal. We have\n", "\t$$77_{10} = 2^6 + 2^3 + 2^2 + 2^0 = 1001101_2 = 1.001101_2 \\times 2^{6} = 1.001101_2 \\times 2^{110_{2}}$$\n", " \n", "As indicated in the Figure above, the first bit is the sign bit, the next $e$ bits are for the exponent and the last $s$ bits are for the significand. We will now list the general conventions followed in accordance with the IEEE-754 standard.\n", "\n", "