2. A number system defines how a number can
be represented using distinct symbols. A
number can be represented differently in
different system.
Several number systems have been used in
the past and can be categorized into two
groups: positional and non-positional
systems.
3. Roman numerals are a good example of a
non-positional number system. This number
system has a set of symbols
S = {I, V, X, L, C, D, M}. The values of each
symbol are shown in Table.
4. To find the value of a number, we need to
add the value of symbols subject to specific
rules
5. In positional number system, there are only
few symbols called digits, and these symbols
represent different values depending on the
position they occupy in the number.
Commonly used number systems are:
Decimal
Binary
Octal
Hexadecimal
6. Why do we need more number systems?
• Humans understand decimal
• Digital electronics (computers) understand binary
• Since computers have 32, 64, and even 128 bit
busses, displaying numbers in binary is cumbersome
• Data on a 32 bit data bus would look like the
following:
0110 1001 0111 0001 0011 0100 1100 1010
• Hexadecimal (base 16) and octal (base 8) number
systems are used to represent binary data in a more
compact form.
7. The word decimal is a derivative of decem,
which is the Latin word for ten.
The number system that we use day-to-day life
is called the Decimal number system.
The most popular & commonly used number
system is the Decimal number system as it
supports the entire mathematical & accounting
concept in the world.
The base is equal to ten because there are
altogether ten digits (1,2, 3, 4, 5, 6, 7, 8, 9)10
8. The binary number system uses two digits to
represent numbers, the values are 0 & 1. This
numbering system is sometime called the Base 2
numbering system (0,1).
Binary digit is often referred to by the common
abbreviation BIT. Thus, a “bit” in a computer
terminology means either a 0 or a 1.
This number system is natural to an electronic
machines or devices as their mechanism based on the
OFF or ON switching of the circuits.
Therefore, 0 represent the OFF & 1 represent ON
state of the circuit.
9. The octal number system uses eight values to
represent numbers. The values are (0, 1, 2,
3, 4, 5, 6, 7)8 and the base of this system is
eight.
10. The hexadecimal number system has 16-
digits or symbols (hexa means six & decimal
means 10 so sum is sixteen) are (0, 1, 2, 3, 4,
5,6, 7, 8, 9, A, B, C, D, E, F)16, so it has the
base 16.
This system uses numerical values from 0 to
9 & alphabets from A to F.
Alphabets A to F represent decimal numbers
from 10 to 15.
11. System Base Symbols
Used by
humans?
Used in
computers?
Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa-
decimal
16 0, 1, … 9,
A, B, … F
No No
21. Technique
Multiply each bit by 2n, where n is the “weight”
of the bit
The weight is the position of the bit, starting
from 0 on the right
Add the results
22. 1010112 => 1 x 20 = 1
1 x 21 = 2
0 x 22 = 0
1 x 23 = 8
0 x 24 = 0
1 x 25 = 32
4310
Bit “0”
24. Technique
Multiply each bit by 8n, where n is the “weight”
of the bit
The weight is the position of the bit, starting
from 0 on the right
Add the results
25. 7248 => 4 x 80 = 4
2 x 81 = 16
7 x 82 = 448
46810
27. Technique
Multiply each bit by 16n, where n is the “weight”
of the bit
The weight is the position of the bit, starting
from 0 on the right
Add the results
28. ABC16 => C x 160 = 12 x 1 = 12
B x 161 = 11 x 16 = 176
A x 162 = 10 x 256 = 2560
274810
30. Technique
Divide by two, keep track of the remainder
First remainder is bit 0 (LSB, least-significant bit)
Second remainder is bit 1
Etc.
58. Base 10
Power Preface Symbol
10-12 pico p
10-9 nano n
10-6 micro
10-3 milli m
103 kilo k
106 mega M
109 giga G
1012 tera T
Value
.000000000001
.000000001
.000001
.001
1000
1000000
1000000000
1000000000000
59. Base 2
Power Preface Symbol
210 kilo k
220 mega M
230 Giga G
Value
1024
1048576
1073741824
• What is the value of “k”, “M”, and “G”?
• In computing, particularly w.r.t. memory,
the base-2 interpretation generally applies
60. For common bases, add powers
26 210 = 216 = 65,536
or…
26 210 = 64 210 = 64k
ab ac = ab+c
61. Two 1-bit values
A B A + B
0 0 0
0 1 1
1 0 1
1 1 10
“two”