Number Systems

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 47

Number

Systems
Is it a number?

2005
No!!

• No! It is not a number!!


• It is a representation of a number.
• Then, what information is restored in
the representation 2005?
What is the definition of a
number?
• In ordinary English, the word "number" has two
different meanings (at least). One meaning is
the concept, the other meaning is how the
concept is represented. For example, think
about

"the number of eggs in an egg carton"

You know the number I mean. Now write it down


on paper.
Unit and Number
The terms unit and number when used with the decimal
system are almost self-explanatory. By definition the unit
is a single object; that is, an apple, a dollar, a day. A
number is a symbol representing a unit or a quantity.
The figures 0, 1, 2, and 3 through 9 are the symbols
used in the decimal system. These symbols are called
Arabic numerals or figures. Other symbols may be used
for different number systems. For example, the symbols
used with the Roman numeral system are letters ¾ V is
the symbol for 5, X for 10, M for 1,000, and so forth. We
will use Arabic numerals and letters in the number
system discussions in this chapter.
Another definition of
number
The idea of “number” is a mathematical abstraction. The
word "number" is a general term which refers to a
member of a given (possibly ordered) set. The meaning
of "number" is often clear from context (i.e., does it refer
to a complex number, integer, real number, etc.?).
Wherever possible in this work, the word "number" is
used to refer to quantities which are integers, and
"constant" is reserved for nonintegral numbers which
have a fixed value. Because terms such as real number,
Bernoulli number, and irrational number are commonly
used to refer to nonintegral quantities, however, it is not
possible to be entirely consistent in nomenclature.
Number representations
• There are many types of representations.
• In some representations position is not
strictly important.
• In some representation position is strictly
important. These types of representation
are called positional notations.
Positional notation

• In positional notation each digit of a multi-


digit number has a fixed value (weight)
determined by its position.
In how many ways a
number can be
represented?
• 200510 is a decimal representation of a
number.
• This number could also be represented as
– two thousand and five or, two thousand-five.
– MMV (Roman Notation)
and so on.
XII, ///// ///// //, 11002 and 12 are different
ways to represent the same number.
Early number
representation.1
• Egyptian hieroglyphics 2500 B.C.
• How to represent 1999
Early number
representation.2
• How do you represent 1999?
• This representation is additive.
• Position is not strictly important.
Early number
representation.3
• Similar to Roman Numerals..
• 1999
– MDCCCCLXXXXVIIII
• VLD 5, 50, 500
• Subtractive notation
– Position becomes important
– MCMXCIX
– M = 1000
– CM = M-C = 1000 – 100 = 900
– XC = C-X = 500 – 10 = 490
– C = 50
– IX = X-I = 9
Early number
representation.4
• Based on powers of 10 up to 106
• How many of each symbol is needed?
Numerals
• We use Arabic numerals in decimal
system. These are 0,1,2,3,4,5,6,7,8 & 9.
• These are also called digits.
• A number x is said to have "n figures" if it
takes n digits to express it.
• In systems with a radix larger than 10
A,B,C,D,…… are used to represent
10,11,12,13,…… .
Number System
• The idea of “number” is a mathematical
abstraction. To use numbers, we must represent
them in some way, whether by piles of pebbles
or in some other way. It is common to create a
code for representing numbers. Such codes are
called number systems.
• Every number system uses symbols to convey
information about the value of a number.
Positional Number
Systems
A positional (or radix) number system is one in
which the value that a symbol contributes to a
number is determined by the both symbol itself
and the position of the symbol within the
number. That's just a fancy way of saying that
300 is far different from 3. Compare the idea of a
positional number system with Roman numbers,
where X means 10 no matter where in a number
it appears.
This is often referred to as a weighted
numbering system because each position is
weighted by a power of the radix.
Numbers – Positional
Notation
• Decimal
• Every positive integer has a unique
representation in the form
– ak ak-1 … a0
– Where
ak ak-1 … a0 =
ak x 10k + ak-1 x 10k-1 + … + a0 x 100

with 0 < ak < 10 and 0 ≤ ai < 10 for 0 ≤ i < k


Numbers – Positional
Notation
• Number representation
– d31d30 ... d2d1d0 is a 32 digit number
– value =
d31x B31 + d30 x B30 + ... + d2 x B2 + d1 x B1 + d0 x B0
• Binary Example
1011010 = 1x26 + 0x25 + 1x24 + 1x23 + 0x22 + 1x2 + 0x1
= 64 +
16 + 8 + 2 = 90

• What is a base that converts to binary easily?


What is radix?
• The base of a number system, i.e., 2 for
binary, 8 for octal, 10 for decimal, and 16
for hexadecimal.
• The radix is sometimes called the base or
scale.
More about Base.1
• A real number x can be represented using any
integer number b as a base (sometimes also
called a radix or scale). The choice of a base
yields to a representation of numbers known as
a number system. In base b, the digits 0, 1, ...,
are used (where, by convention, for bases larger
than 10, the symbols A, B, C, ...are generally
used as symbols representing the decimal
numbers 10, 11, 12, ...).
More about Base.2
• The base, or radix, of a number system tells you
the number of symbols used in that system. The
base of any system is always expressed in
decimal numbers.
• The base of a number system is indicated by a
subscript (decimal number) following the value
of the number. The following are examples of
numerical values in different bases with the
subscript to indicate the base:
759210 2145 or, (123)4 (656)7
Number Representation Base
10 = 10102 2
= 1013 3
= 224 4
= 205 5
= 146 6
= 137 7
= 128 8
= 119 9
= 1010 10
= A11 11
Names of some number
systems with different
base
• Binary(2) • Nonary(9)
• Ternary(3) • Decimal(10)
• Quaternary(4) • Undenary(11)
• Quinary(5) • Duodecimal(12)
• Senary(6) • Hexadecimal(16)
• Septenary(7) • Vigesimal(20)
• Octal(8) • Sexagesimal(60)
Sys. Name Base Digits Employed

Binary 2 0,1

Ternary 3 0,1,2

Octal 8 0,1,2,3,4,5,6,7

Decimal 10 0,1,2,3,4,5,6,7,8,9

Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,
F
Vigesimal 20 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,
F,G,H,I,J
Some Facts About Num.
Systems
• Binary is used in representing data and in
operational activities of computers.
• Ternary numbers arise in a number of problems
in mathematics, including some problems of
weighing.
• A ternary representation can be used to uniquely
identify totalistic cellular automaton rules, where
the three colors (white, gray, and black)
correspond to the three numbers 0, 1 and 2
(Wolfram 2002, pp. 60-70 and 886).
Some Facts About Num.
Systems
• We use decimal system in real life.
• Some aspects of a base-12 system are
preserved in the terms dozen and gross.
Some Facts About Num.
Systems
• The hexadecimal system is particularly important
in computer programming, since four bits (each
consisting of a one or zero) can be succinctly
expressed using a single hexadecimal digit. Two
hexadecimal digits represent numbers from 0 to
255, a common range used, for example, to
specify colors. Thus, in the HTML language of
the web, colors are specified using three pairs of
hexadecimal digits RRGGBB, where RR is the
amount of red, GG the amount of green, and BB
the amount of blue.
Some Facts About Num.
Systems
• A base-20 number system was used by
the Aztecs and Mayans. The Mayans
compiled extensive observations of
planetary positions in base-20 notation.
• A base-60 number system was used by
the Babylonians and is preserved in the
modern measurement of time (hours,
minutes, and seconds) and angles
(degrees, arc minutes, and arc seconds).
Mixture of Bases
• Some number systems use a mixture of
bases for counting. Examples include the
Mayan calendar and the old British
monetary system (in which ha'pennies,
pennies, threepence, sixpence, shillings,
half crowns, pounds, and guineas
corresponded to units of 1/2, 1, 3, 6, 12,
30, 240, and 252, respectively).
Irrational Base
• Bergman (1957/58) considered an
irrational base, and Knuth (1998)
considered transcendental bases. This
leads to some rather unfamiliar results,
such as equating π to 1 in "base π,"
π=10π. Even more unexpectedly, the
representation of a given integer in an
irrational base may be nonunique, for
example
Num. Rep. Base

10 = 10100.010010101011Ф 18

= 10100.0101Ф 19

Where Ф is the golden ratio.


Index of the leading digit
• The index of the leading digit needed to represent
the number is

where is the floor function.


Successive Digits
Now, recursively compute the successive digits

where and
for i = n, n-1, ..., 1, 0, .... This gives the base b
representation of x. Note that if x is an integer, then
i need only run through 0, and that if x has a
fractional part, then the expansion may or may not
terminate. For example, the hexadecimal
representation of 0.1 (which terminates in decimal
notation) is the infinite expression
Number length.1
• The length of a number n in base b is the
number of digits in the base-b numeral for
n, given by the formula

where is the floor function.


The multiplicative persistence of an n-digit is
sometimes also called its length.
Number Length.2
• If L is the number length, R is the radix & N is the
number, then the maximum number that could
be represented is,
N=RL – 1
By simplifying this equation we get,

This is a ceiling function.


Significant Digits &
Insignificant Digits

Digits whose removal changes the value


of the number are significant.
Digits whose removal don’t changes the
value of the number are insignificant.
Most Significant Bit
• Most Significant Bit (MSB) is also known
as high-order bit.
– Left most, Highest order
– Bit n-1
d31d30 ... d2d1d0

• Note : Bit. Not digit.


Least Significant Bit
• Least Significant Bit (LSB) is also known
as low-order bit.
– Right most, Lowest-order
– Bit 0
d31d30 ... d2d1d0
What is an integer, a
fraction or a mixed
number ?
Radix Point
• The period placed to the right of the units
place in a decimal number is called the
decimal point (or, in the case that a
comma is instead used for this purpose as
is the case in continental Europe, the
decimal comma).
Fixed Point Number
Floating Point Number
What we use?
• In real life we use decimal number system.
»It’s easy for human.
»Easy to start with.
»Easy to get skilled in.
»Especially when doing
arithmetic.
Which is more convenient
for computers?
• For computers binary system is used.
– Most information-processing systems are
constructed from switches, which are binary
devices.
– The basic decision-making processes
required of digital systems are binary.
– Binary signals are more reliable than those
formed by more than two quantization levels.
Why Binary not
Hexadecimal?(1)
• Hexadecimal notation is clearly the most
compact of the three ways to represent
numbers. Here are those larger numbers:
• 110,0100 binary is100 decimal and 64
hexadecimal
• 1111,1111,1111,1111,1111,1111 binary is
16,777,215 decimal and FFFFFF hexadecimal.

• It is these six hexadecimal digits that are used to


represent the 16+million colors in HTML.
Why Binary not
Hexadecimal?(2)
In everyday life, we use the base 10 decimal
number system. But the basic number system in
computers is base two, or binary. This is
because of mathematician John V. Atanasoff's
decision in 1938 to try building an all-electronic
computing device using the simplest numbering
system available. Base two has only two digits: 0
and 1. These can easily be represented in many
devices, and from Atanasoff's successful
experiment using vacuum tubes has come our
entire world of digital electronics.
Decimal Expansion &
fraction

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy