<s>
A	O
computer	B-Algorithm
number	I-Algorithm
format	I-Algorithm
is	O
the	O
internal	O
representation	O
of	O
numeric	B-Algorithm
values	O
in	O
digital	O
device	O
hardware	O
and	O
software	O
,	O
such	O
as	O
in	O
programmable	O
computers	O
and	O
calculators	B-Application
.	O
</s>
<s>
Numerical	O
values	O
are	O
stored	O
as	O
groupings	O
of	O
bits	O
,	O
such	O
as	O
bytes	B-Application
and	O
words	O
.	O
</s>
<s>
The	O
encoding	B-Algorithm
between	O
numerical	O
values	O
and	O
bit	O
patterns	O
is	O
chosen	O
for	O
convenience	O
of	O
the	O
operation	O
of	O
the	O
computer	O
;	O
the	O
encoding	B-Algorithm
used	O
by	O
the	O
computer	O
's	O
instruction	O
set	O
generally	O
requires	O
conversion	O
for	O
external	O
use	O
,	O
such	O
as	O
for	O
printing	O
and	O
display	O
.	O
</s>
<s>
The	O
representation	O
is	O
composed	O
of	O
bits	O
,	O
which	O
in	O
turn	O
are	O
grouped	O
into	O
larger	O
sets	O
such	O
as	O
bytes	B-Application
.	O
</s>
<s>
+	O
Table	O
2	O
:	O
Number	O
of	O
values	O
for	O
a	O
bit	B-Data_Structure
string	I-Data_Structure
.	O
</s>
<s>
Length	O
of	O
bit	B-Data_Structure
string	I-Data_Structure
(	O
b	O
)	O
Number	O
of	O
possible	O
values	O
(	O
N	O
)	O
1	O
2	O
2	O
4	O
3	O
8	O
4	O
16	O
5	O
32	O
6	O
64	O
7	O
128	O
8	O
256	O
9	O
512	O
10	O
1024	O
...	O
</s>
<s>
A	O
bit	O
is	O
a	O
binary	O
digit	O
that	O
represents	O
one	O
of	O
two	O
states	B-Application
.	O
</s>
<s>
The	O
concept	O
of	O
a	O
bit	O
can	O
be	O
understood	O
as	O
a	O
value	O
of	O
either	O
1	O
or	O
0	O
,	O
on	O
or	O
off	O
,	O
yes	O
or	O
no	O
,	O
true	O
or	O
false	O
,	O
or	O
encoded	B-Algorithm
by	O
a	O
switch	O
or	O
toggle	O
of	O
some	O
kind	O
.	O
</s>
<s>
While	O
a	O
single	O
bit	O
,	O
on	O
its	O
own	O
,	O
is	O
able	O
to	O
represent	O
only	O
two	O
values	O
,	O
a	O
string	B-Data_Structure
of	I-Data_Structure
bits	I-Data_Structure
may	O
be	O
used	O
to	O
represent	O
larger	O
values	O
.	O
</s>
<s>
A	O
byte	B-Application
is	O
a	O
bit	B-Data_Structure
string	I-Data_Structure
containing	O
the	O
number	O
of	O
bits	O
needed	O
to	O
represent	O
a	O
character	O
.	O
</s>
<s>
On	O
most	O
modern	O
computers	O
,	O
this	O
is	O
an	O
eight	O
bit	B-Data_Structure
string	I-Data_Structure
.	O
</s>
<s>
Because	O
the	O
definition	O
of	O
a	O
byte	B-Application
is	O
related	O
to	O
the	O
number	O
of	O
bits	O
composing	O
a	O
character	O
,	O
some	O
older	O
computers	O
have	O
used	O
a	O
different	O
bit	O
length	O
for	O
their	O
byte	B-Application
.	O
</s>
<s>
In	O
many	O
computer	B-General_Concept
architectures	I-General_Concept
,	O
the	O
byte	B-Application
is	O
the	O
smallest	O
addressable	B-General_Concept
unit	I-General_Concept
,	O
the	O
atom	O
of	O
addressability	O
,	O
say	O
.	O
</s>
<s>
This	O
is	O
called	O
byte-addressable	B-General_Concept
memory	O
.	O
</s>
<s>
Historically	O
,	O
many	O
CPUs	B-Device
read	O
data	O
in	O
some	O
multiple	O
of	O
eight	O
bits	O
.	O
</s>
<s>
Because	O
the	O
byte	B-Application
size	O
of	O
eight	O
bits	O
is	O
so	O
common	O
,	O
but	O
the	O
definition	O
is	O
not	O
standardized	O
,	O
the	O
term	O
octet	O
is	O
sometimes	O
used	O
to	O
explicitly	O
describe	O
an	O
eight	O
bit	O
sequence	O
.	O
</s>
<s>
Being	O
a	O
half-byte	O
,	O
the	O
nibble	O
was	O
named	O
as	O
a	O
play	O
on	O
words	O
.	O
</s>
<s>
A	O
person	O
may	O
need	O
several	O
nibbles	O
for	O
one	O
bite	O
from	O
something	O
;	O
similarly	O
,	O
a	O
nybble	O
is	O
a	O
part	O
of	O
a	O
byte	B-Application
.	O
</s>
<s>
Octal	O
and	O
hexadecimal	O
encoding	B-Algorithm
are	O
convenient	O
ways	O
to	O
represent	O
binary	O
numbers	O
,	O
as	O
used	O
by	O
computers	O
.	O
</s>
<s>
This	O
form	O
of	O
encoding	B-Algorithm
cannot	O
represent	O
some	O
values	O
in	O
binary	O
.	O
</s>
<s>
While	O
both	O
unsigned	O
and	O
signed	O
integers	O
are	O
used	O
in	O
digital	O
systems	O
,	O
even	O
a	O
32-bit	O
integer	O
is	O
not	O
enough	O
to	O
handle	O
all	O
the	O
range	O
of	O
numbers	O
a	O
calculator	B-Application
can	O
handle	O
,	O
and	O
that	O
's	O
not	O
even	O
including	O
fractions	O
.	O
</s>
<s>
To	O
approximate	O
the	O
greater	O
range	O
and	O
precision	O
of	O
real	O
numbers	O
,	O
we	O
have	O
to	O
abandon	O
signed	O
integers	O
and	O
fixed-point	O
numbers	O
and	O
go	O
to	O
a	O
"	O
floating-point	B-Algorithm
"	O
format	O
.	O
</s>
<s>
In	O
the	O
decimal	O
system	O
,	O
we	O
are	O
familiar	O
with	O
floating-point	B-Algorithm
numbers	I-Algorithm
of	O
the	O
form	O
(	O
scientific	O
notation	O
)	O
:	O
</s>
<s>
We	O
have	O
a	O
certain	O
numeric	B-Algorithm
value	O
(	O
1.1030402	O
)	O
known	O
as	O
a	O
"	O
significand	B-Algorithm
"	O
,	O
multiplied	O
by	O
a	O
power	O
of	O
10	O
(	O
E5	O
,	O
meaning	O
105	O
or	O
100,000	O
)	O
,	O
known	O
as	O
an	O
"	O
exponent	O
"	O
.	O
</s>
<s>
The	O
advantage	O
of	O
this	O
scheme	O
is	O
that	O
by	O
using	O
the	O
exponent	O
we	O
can	O
get	O
a	O
much	O
wider	O
range	O
of	O
numbers	O
,	O
even	O
if	O
the	O
number	O
of	O
digits	O
in	O
the	O
significand	B-Algorithm
,	O
or	O
the	O
"	O
numeric	B-Algorithm
precision	O
"	O
,	O
is	O
much	O
smaller	O
than	O
the	O
range	O
.	O
</s>
<s>
Similar	O
binary	B-Algorithm
floating-point	I-Algorithm
formats	O
can	O
be	O
defined	O
for	O
computers	O
.	O
</s>
<s>
The	O
IEEE	O
754-2008	O
standard	O
specification	O
defines	O
a	O
64	O
bit	O
floating-point	B-Algorithm
format	I-Algorithm
with	O
:	O
</s>
<s>
Let	O
's	O
see	O
what	O
this	O
format	O
looks	O
like	O
by	O
showing	O
how	O
such	O
a	O
number	O
would	O
be	O
stored	O
in	O
8	O
bytes	B-Application
of	O
memory	O
:	O
</s>
<s>
where	O
"	O
S	O
"	O
denotes	O
the	O
sign	O
bit	O
,	O
"	O
x	O
"	O
denotes	O
an	O
exponent	O
bit	O
,	O
and	O
"	O
m	O
"	O
denotes	O
a	O
significand	B-Algorithm
bit	O
.	O
</s>
<s>
The	O
specification	O
also	O
defines	O
several	O
special	O
values	O
that	O
are	O
not	O
defined	O
numbers	O
,	O
and	O
are	O
known	O
as	O
NaNs	O
,	O
for	O
"	O
Not	O
A	O
Number	O
"	O
.	O
</s>
<s>
Some	O
programs	O
also	O
use	O
32-bit	O
floating-point	B-Algorithm
numbers	I-Algorithm
.	O
</s>
<s>
The	O
most	O
common	O
scheme	O
uses	O
a	O
23-bit	O
significand	B-Algorithm
with	O
a	O
sign	O
bit	O
,	O
plus	O
an	O
8-bit	O
exponent	O
in	O
"	O
excess-127	O
"	O
format	O
,	O
giving	O
seven	O
valid	O
decimal	O
digits	O
.	O
</s>
<s>
The	O
bits	O
are	O
converted	O
to	O
a	O
numeric	B-Algorithm
value	O
with	O
the	O
computation	O
:	O
</s>
<s>
Such	O
floating-point	B-Algorithm
numbers	I-Algorithm
are	O
known	O
as	O
"	O
reals	O
"	O
or	O
"	O
floats	B-Algorithm
"	O
in	O
general	O
,	O
but	O
with	O
a	O
number	O
of	O
variations	O
:	O
</s>
<s>
A	O
32-bit	O
float	B-Algorithm
value	O
is	O
sometimes	O
called	O
a	O
"	O
real32	O
"	O
or	O
a	O
"	O
single	O
"	O
,	O
meaning	O
"	O
single-precision	O
floating-point	B-Algorithm
value	O
"	O
.	O
</s>
<s>
A	O
64-bit	O
float	B-Algorithm
is	O
sometimes	O
called	O
a	O
"	O
real64	O
"	O
or	O
a	O
"	O
double	O
"	O
,	O
meaning	O
"	O
double-precision	O
floating-point	B-Algorithm
value	O
"	O
.	O
</s>
<s>
The	O
relation	O
between	O
numbers	O
and	O
bit	O
patterns	O
is	O
chosen	O
for	O
convenience	O
in	O
computer	O
manipulation	O
;	O
eight	O
bytes	B-Application
stored	O
in	O
computer	O
memory	O
may	O
represent	O
a	O
64-bit	O
real	O
,	O
two	O
32-bit	O
reals	O
,	O
or	O
four	O
signed	O
or	O
unsigned	O
integers	O
,	O
or	O
some	O
other	O
kind	O
of	O
data	O
that	O
fits	O
into	O
eight	O
bytes	B-Application
.	O
</s>
<s>
If	O
a	O
very	O
small	O
floating-point	B-Algorithm
number	I-Algorithm
is	O
added	O
to	O
a	O
large	O
one	O
,	O
the	O
result	O
is	O
just	O
the	O
large	O
one	O
.	O
</s>
<s>
The	O
precision	O
limit	O
is	O
different	O
from	O
the	O
range	O
limit	O
,	O
as	O
it	O
affects	O
the	O
significand	B-Algorithm
,	O
not	O
the	O
exponent	O
.	O
</s>
<s>
The	O
significand	B-Algorithm
is	O
a	O
binary	O
fraction	O
that	O
does	O
n't	O
necessarily	O
perfectly	O
match	O
a	O
decimal	O
fraction	O
.	O
</s>
<s>
Programming	O
in	O
assembly	B-Language
language	I-Language
requires	O
the	O
programmer	O
to	O
keep	O
track	O
of	O
the	O
representation	O
of	O
numbers	O
.	O
</s>
<s>
High-level	O
programming	O
languages	O
such	O
as	O
Ruby	B-Language
and	O
Python	B-Language
offer	O
an	O
abstract	O
number	O
that	O
may	O
be	O
an	O
expanded	O
type	O
such	O
as	O
rational	O
,	O
bignum	B-Algorithm
,	O
or	O
complex	O
.	O
</s>
<s>
A	O
given	O
mathematical	O
symbol	O
in	O
the	O
source	O
code	O
,	O
by	O
operator	O
overloading	O
,	O
will	O
invoke	O
different	O
object	O
code	O
appropriate	O
to	O
the	O
representation	O
of	O
the	O
numerical	O
type	O
;	O
mathematical	O
operations	O
on	O
any	O
number	O
—	O
whether	O
signed	O
,	O
unsigned	O
,	O
rational	O
,	O
floating-point	B-Algorithm
,	O
fixed-point	O
,	O
integral	O
,	O
or	O
complex	O
—	O
are	O
written	O
exactly	O
the	O
same	O
way	O
.	O
</s>
<s>
Some	O
languages	O
,	O
such	O
as	O
REXX	B-Language
and	O
Java	B-Language
,	O
provide	O
decimal	O
floating-points	B-Algorithm
operations	O
,	O
which	O
provide	O
rounding	O
errors	O
of	O
a	O
different	O
form	O
.	O
</s>
