0% found this document useful (0 votes)
35 views24 pages

Number System Notes 2018

This guide introduces fundamental number systems, explaining positional concepts like base and radix point. It offers step-by-step instructions for converting between decimal, binary, octal, and hexadecimal. A concise reference for students in computer science, engineering, and math.
Copyright
© Public Domain
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views24 pages

Number System Notes 2018

This guide introduces fundamental number systems, explaining positional concepts like base and radix point. It offers step-by-step instructions for converting between decimal, binary, octal, and hexadecimal. A concise reference for students in computer science, engineering, and math.
Copyright
© Public Domain
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

NUMBER SYSTEM

Rakhesh Jaghadish Lakshmanan

COMPUTER SCIENCE ENGINEERING

Date: 03-03-2018
NUMBER SYSTEM

INTRODUCTION

A number system is a well-defined, structured way of representing or expressing numbers as


a combination of elements from a finite set of mathematical symbols (i.e., digits).

Alternatively, a number system can be defined as a set of values used to represent quantity.

Types of Number Systems:

• Non-Positional Number System


• Positional Number System

1. Non-Positional Number System

Since prehistoric times, humans have counted on their fingers. For counting beyond ten, they
started using stones, pebbles, or sticks to mark or indicate values. This kind of counting uses
an additive approach, also known as a non-positional number system.

In this system, we use symbols to indicate a value. Each symbol represents the same value
regardless of its position in a number. To find the value of a number, one has to count the
number of symbols present. For example, the value one can be represented with a single line,
two with double lines, three with triple lines, and so on.
Example:

1=I 21=XXI 41=XLI 61=LXI 81=LXXXI


2=II 22=XXII 42=XLII 62=LXII 82=LXXXII
3=III 23=XXIII 43=XLIII 63=LXIII 83=LXXXIII
4=IV=IIII 24=XXIV 44=XLIV 64=LXIV 84=LXXXIV
5=V 25=XXV 45=XLV 65=LXV 85=LXXXV
6=VI 26=XXVI 46=XLVI 66=LXVI 86=LXXXVI
7=VII 27=XXVII 47=XLVII 67=LXVII 87=LXXXVII
8=VIII=IIX 28=XXVIII 48=XLVIII 68=LXVIII 88=LXXXVIII
9=IX=VIIII 29=XXIX 49=XLIX 69=LXIX 89=LXXXIX
10=X 30=XXX 50=L 70=LXX 90=XC
11=XI 31=XXXI 51=LI 71=LXXI 91=XCI
12=XII 32=XXXII 52=LII 72=LXXII 92=XCII
13=XIII 33=XXXIII 53=LIII 73=LXXIII 93=XCIII
14=XIV 34=XXXIV 54=LIV 74=LXXIV 94=XCIV
15=XV 35=XXXV 55=LV 75=LXXV 95=XCV
16=XVI 36=XXXVI 56=LVI 76=LXXVI 96=XCVI
17=XVII 37=XXXVII 57=LVII 77=LXXVII 97=XCVII
18=XVIII 38=XXXVIII 58=LVIII 78=LXXVIII 98=XCVIII
19=XIX 39=XXXIX 59=LIX 79=LXXIX 99=XCIX
20=XX 40=XL 60=LX 80=LXXX 100=C

2. Positional Number System

In positional number system there exist few symbols called digits. These digits represent
different values depending on the position they occupy in number. The value in each digit is
determined by three considerations

1. Digit itself
2. Position of digit in number
3. Base of the number system

“Base” is defined as the total number of digits available in number system.

Consider a base r number system

• Radix point separates integer & fractional components


• Finite set of r symbols called digits
• Position of digit determines weight of digit

A positive number, N, can be written in positional notation as:

(N)b = (dn dn−1 dn−2 . . … … . . d1 . d−1 d−2 … … … . . d−m ) r


Where:

. is the radix point.


r is the radix or base of the number system.
n is the number of integer digits to the left of the radix point.
m is the number of fractional digits to the right of the radix point.
d_i is the digit at position i.
The digit d_{n-1} is the most significant digit (MSD).
The digit d_{-m} is the least significant digit (LSD).

Summation Form

The value of the number N can be expressed as a sum of its digits multiplied by their
respective weights:

dn−1 ∗ bn−1 + . . . + d2 ∗ b1 + d1 ∗ b0 . d−1 ∗ b−1 + d−2 ∗ b−2 + … … … . . + d−m


∗ b−m
𝑛−1 −𝑚

(𝑁)𝑏 = ∑ 𝑑𝑖 𝑏 . ∑ 𝑑𝑖 𝑏 𝑖
𝑖

𝑖=0 𝑖=−1

Example

28.52610

2 𝑥 21 + 8 𝑥 20 + 5 𝑥 2−1 + 2 𝑥 2 −2
+ 6 𝑥 2−3

Types of positional numbers system

❖ Decimal Number system (0 - 9) base 10


❖ Binary Number system (0 - 1) base 2
❖ Octal Number system (0 - 7) base 8
❖ Hexadecimal Number system (0 – 9 and A - F) base 16

Decimal Binary Octal Hexadecimal


0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F

Summation

Mathematical formulas often require adding many variables. Summation, or sigma notation,
is a convenient and simple form of shorthand used to concisely express the sum of a
variable's values.

Let x1,x2,x3,…,xn denote a set of n numbers. Here, x1 is the first number in the set, and xi
represents the i-th number in the set.

Summation Notation involves:

The summation sign (∑): This symbol, the Greek upper-case letter Sigma, instructs us to sum
the elements of a sequence. The expression for a typical element to be summed is placed to
the right of the summation sign.

The variable of summation: This is the variable being summed, also known as the index. It is
typically represented by a letter like i, j, or t and is placed beneath the summation sign. The
index starts at the lower limit and increments by one until it reaches the upper limit.

The lower limit of summation: This is the starting value for the index.

The upper limit of summation: This is the stopping value for the index.

The standard form is:


𝑛

∑ 𝑥𝑖 = 𝑥1 + 𝑥2 + 𝑥3 + ⋯ + 𝑥𝑛
𝑖=1

Here:

i is the index of summation.


1 is the lower limit.
n is the upper limit.

Summation sign
𝑛
Summation sign
∑ 𝑥𝑖
𝑖=1

Index of Starting point lower


Summation sign limit of summation
Some typical examples of summation
𝑛

∑ xi = This expression means sum the values of x, starting at x1 and ending with xn .
𝑖=1

∑ 𝑥𝑖 = 𝑥1 + 𝑥2 + 𝑥3 + … … . . +𝑥𝑛
𝑖=1

10

∑ xi = This expression means sum the values of x, starting at x1 and ending with x10 .
𝑖=1

10

∑ 𝑥𝑖 = 𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 + 𝑥5 + 𝑥6 + 𝑥7 + 𝑥8 + 𝑥9 + 𝑥10
𝑖=1

10

∑ xi = This expression means sum the values of x, starting at x3 and ending with x10 .
𝑖=3

10

∑ 𝑥𝑖 = 𝑥3 + 𝑥4 + 𝑥5 + 𝑥6 + 𝑥7 + 𝑥8 + 𝑥9 + 𝑥10
𝑖=1

∑ 𝑥 The limits of summation are often understood to mean i = 1 through n. Then the
notation below and above the summation sign is omitted. Therefore this expression means
sum the values of x, starting at x1 and ending with xn.

∑ 𝑥 = 𝑥1 + 𝑥2 + … . + 𝑥𝑛

Conversations between each number system

Binary Decimal
Decimal { Octal Binary { Octal
Hexadecimal Hexadecimal

Binary Binary
Octal { Decimal Hexadecimal { Octal
Hexadecimal decimal
Decimal to Binary

STEPS:

❖ Divide the decimal number by 2


❖ Write the remainder (which is either 0 or 1) at the right most position
❖ Repeat the process of dividing by 2 until the quotient is 0 and keep writing the
remainder after each step of division.
❖ Write the remainders in reverse order. (Write the remainders from MSB to LSB )

1. 197110

Remainder Method

2 1971 Reminder
2 985 -1  LSB
2 492 -1
2 246 0
2 123 0
2 61 -1
2 30 -1
2 15 0
2 7 -1
2 3 -1
2 1 -1
0 -1  MSB

(1971)10 = (11110110011)2

2. 4510

2 45 Reminder
2 22 -1  LSB
2 11 -1
2 5 -1
2 2 0
2 1 0
0 -1  MSB

(45)10 = (100111)2
3. 12510

2 125 Reminder
2 62 1  LSB
2 31 0
2 15 1
2 7 1
2 3 1
2 1 1
0 1  MSB

12510 = (1111101)2

4. 2110

2 21 Reminder
2 10 1  LSB
2 5 0
2 2 1
1 0  MSB

(21)10 = (10101)2

Decimal Fraction to Binary Fraction

STEPS:

Converting a Decimal Fraction to Binary

1. Multiply the decimal fraction by 2.


2. Record the integer part of the result (which will be a 0 or 1) as the first digit of your
binary fraction.
3. Take the remaining fractional part and repeat the process, multiplying it by 2.
4. Continue this process until the fractional part becomes zero or you have reached the
desired number of decimal places.
5. To get the final result, write down the recorded integer parts from top to bottom.

1. (0.75)10

Example- Find the binary equivalent of (0.75)10.

Integer Number
0.75 × 2 = 1.50 1
0.50 × 2 = 1.00 1

(0.75)10 = (0.11)2
2. (0.625)10

Integer Fraction Coefficient


0.625 x 2 = 1 . 25 a-1 = 1

0.25 x 2 = 0 . 5 a-2 =0

0.5 x 2 = 1 . 0 a-3 =1

(0.625)10 = (0.a-1 a-2 a-3)2 = (0.101)2

3. (0.188)10

Integer Fraction Coefficient


0.188 x 2 = 0 . 376 a-1 = 0

0.376 x 2 = 0 . 752 a-2 =0

0.752 x 2 = 1 . 504 a-3 =1

0.504 x 2 = 1 . 008 a-3 =1

0.008 x 2 = 0 . 016 a-3 =0

(0.188)10 = (0.00110)2

4. (0.3125)10

Integer Fraction Integer Part


0.3125 x 2 = 0 . 625 a-1 = 0

0.625 x 2 = 1 . 25 a-2 =0

0.25 x 2 = 0 . 5 a-3 =1

0.5 x 2 = 1 . 0 a-3 =1

(0.3125)10 = (0.0011)2
Decimal to Octal

STEPS:

❖ Divide the decimal number by 8


❖ Write the remainder at the right most position
❖ Repeat the process of dividing by 8 until the quotient is 0 and keep writing the
remainder after each step of division.
❖ Write the remainders in reverse order. (Write the remainders from MSB to LSB ).

1. 4510

8 45 Reminder
8 5 5
8 0 5

(45)10 = (55)8

Decimal Fraction to Octal Fraction

STEPS:

❖ Multiply the decimal Fraction by 8.


❖ Record the first digit binary number of integer part.
❖ Now take the Fraction part and again multiply with 8 until we get the Integer part
equal to Zero.
❖ Write from top to bottom of the recorded Integer part to get the Final Result

Example- Find the octal equivalent of (0.75)10.

Integer Number

0.75 × 8 = 6.00 6

(0.75)10= (0.6)8.

1. (0.356)10
Integer Fraction Integer Part
0.356 x 8 = 2 . 848 a-1 = 2

0.848 x 8 = 6 . 784 a-2 =6

0.784 x 8 = 6 . 272 a-3 =6

0.272 x 8 = 2 . 176 a-3 =2

0.176 x 8 = 1 . 408 a-3 =1

0.408 x 8 = 3 . 264 a-3 =3


Decimal to Hexadecimal

STEPS:

❖ Divide the decimal number by 16


❖ Write the remainder at the right most position
❖ Repeat the process of dividing by 16 until the quotient is 0 and keep writing the
remainder after each step of division.
❖ Write the remainders in reverse order. (Write the remainders from MSB to LSB )

1. 4510

16 45 Reminder
16 2 13 - D
16 0 2

(45)10 = (2D) 16

Decimal Fraction to Hexadecimal Fraction

STEPS:

❖ Multiply the decimal Fraction by 16.


❖ Record the first digit binary number of integer part.
❖ Now take the Fraction part and again multiply with 16 until we get the Integer part
equal to Zero.
❖ Write from top to bottom of the recorded Integer part to get the Final Result

Example- Find the hexadecimal equivalent of (0.75)10.

Number (to be recorded)

0.75 × 16 = 12.00 C (12 = C)

(0.75)10= (0.C)16
Binary to decimal

STEPS:

❖ Write the weight of each bit. X0 = 1


❖ Get the weighted value by multiplying the weighted position with the respective bit.
❖ Add all the weighted value to get the decimal number.

1. 11012

1 1 0 1
Step 1 Step 2 Step 3
0
1x2 = 1x1 = 1
0 x 21 = 0 x 2 = 0
1 x 22 = 1 x 4 = 4
1 x 23 = 1 x 8 = 8

= 13

(1101)2 = (13)10

We want to Known

8-1 = 1/8 = 0.125

5-3 = 1/53 = 1/125 = 0.008

2-1 = ½ = 0.5
Binary Fraction to decimal Fraction

1. (101101.11)2

1 0 1 101 . 1 1 Step 1 Step 2 Step 3


1 x 2-2 = 1 x 0.25 = 0.25
1 x 2-1 = 0 x 0.5 = 0.5
0
61 x=2 0 = 1 x 1 = 11
0 x 21 = 0x2 = 0
1 x 22 = 1x4 = 4
1 x 23 = 1x8 = 8
0 x 24 = 0 x 16 = 0
1 x 25 = 1 x 32 = 32
= 45.75

(101101.11)2 = (45.75)10
(45.75)10

Binary 1 0 1 1 0 1 1 1
Number
Weight of 25 24 23 22 21 20 2-1 2-2
each value
Weighted 1x32 1x16 1x8 1x4 1x2 1x1 1x0.5 1x0.25
value
Solved 32 0 8 4 0 1 0.5 0.25
Multiplication

(101101.11)2= 32 + 0 + 8 + 4 + 0 + 1 + 0.5 + 0.25 = (45.75)10


Binary to Octal

Steps:

❖ Divide binary digits into group of three (starting from right)

❖ Then add the additional Zero’s in the Left Side to get complete three bits (if there is
no complete Group).

❖ Convert each group into one octal digit

1. 11012

001 101

1 5

11012 = (15)8

Binary Fraction to Octal Fraction

1. (101101.11)2

Binary 101 101 110


Number
Octal Number 5 5 6

(101101)2 = (55.6)8
Binary to Hexadecimal

Steps:

❖ Divide binary digits into group of four (starting from right)

❖ Then add the additional Zero’s in the Left Side to get complete 4 bits.

❖ Convert each group into one hexadecimal digit

1. 11012

8 4 2 1

1 1 0 1 = 8+4+1 = 13 = D

(1101)2= (D) 16

2. (101101)2

Do the above steps or convert the grouped bits to decimal and then converts to
Hexadecimal

8 4 2 1 8 4 2 1
Binary Number 0 0 1 0 1 1 0 1

Decimal Number 2 13

Hexadecimal 2 D

(101101)2 = (2D) 16

3. (11010011)2

1 1 0 1 0 0 1 1

11012 = 1x23 + 1x22 + 0x21 + 1x20 = 8 + 4 + 0 + 1 = 1310 =D16

00112 = 0x23 + 0x22 + 1x21 + 1x20 = 0 + 0 + 2 + 1 = 316

(11010011)2 = (D3)16
Binary Fraction to Hexadecimal Fraction

1. (101101.11)2

Binary 0010 1101 1100


Number
Decimal 2 13 12
Number
Hexadecimal 2 D C
Number

(101101)2 = (2DC) 16

Octal to Binary

Steps:

❖ Convert each octal digit to 3 digit Binary number


❖ Combine the all resulting groups

1. 5628

5 6 2

101 110 010

(562)8 = (101110010)2

Octal Fraction to Binary Fraction

1. (101101.11)2

Octal Number 5 5 6
Binary 101 101 110
Number

(55.6)8 = (101101. 110)2


Octal to Decimal

STEPS:

❖ Write the weight of each bit. (X0 = 1)


❖ Get the weighted value by multiplying the weighted position with the respective bit.
❖ Add all the weighted value to get the decimal number.

1. 11012

1 1 0 1
Step 1 Step 2 Step 3
0
1x8 = 1x1 = 1
0 x 81 = 0 x 8 = 0
1 x 82 = 1 x 64 = 64
1 x 83 = 1 x 512 = 512

= 577

(1101)2 = (577)8

Octal Fraction to Decimal Fraction

2. (55.6)8

Octal Number 5 5 6
Weight of 81 80 8-1
each bit
Weighted 5x8 5x1 6 x 1/81
value = 6 x 0.75
Solved 40 5 0.75
Multiplication

(55.6)8 = (45.75)10
Octal to Hexadecimal

❖ Convert each octal digit to 3 –bit binary form.


❖ Combine all the 3-bit binary numbers.
❖ Group them in 4-bit binary form by starting from MSB to LSB.
❖ Convert these 4-bit blocks into their hexadecimal symbols.

1. (55)8

5 5

101 101

(101101)2

0 0 1 0 1 1 0 1 (Binary Number)

2 D

Octal Fraction to Hexadecimal Fraction

1. (101101.11)2

Octal Number 5 5 6
Binary 101 101 110
Number
Now Combine the Binary number from above

101101.110

Now to get Final Result By combining the binary number


into four Groups and converting Octal to Hexadecimal

Binary 0010 1101 1100


Number
Hexadecimal 2 D C

(55.6)8 = (2. DC)16


Hexadecimal to Decimal

1. ABCD16

STEPS:

❖ Write the weight of each bit. (X0 = 1).


❖ Get the weighted value by multiplying the weighted position with the respective bit.
❖ Add all the weighted value to get the decimal number.

A B C D

D x 160 = 13 x 1 = 13
C x 161 = 12 x 16 = 192
B x 162 = 11 x 256 = 2816
A x 163 = 10 x 4096 = 40960

= 43981

(ABCD)16 = (43981)10

2. ABC16

A B C

C x 160 = 12 x 1 = 12
B x 161 = 11 x 16 = 176
A x 162 = 10 x 256 = 2560
= 2748

(ABC)16 = (2748)10
Hexadecimal Fraction to Decimal Fraction

1. (2D.C)

Hexadecimal 2 D(=13) C(=12)


Number
Weight of 161 160 16-1
each bit
Weighted 2 x 16 13 x 1 12 x 1/161
value = 12 x 0.0625
Solved 32 13 0.75
Multiplication

(2D.C)8 = (45.75)16

Converting Hexadecimal to Binary

Steps:

• Convert Each Digit: For each digit in the hexadecimal number, write its
corresponding four-digit binary equivalent.

• Combine: Join the binary groups together in their original order to get the final binary
number.

1. ABC16

A B C

1010 1011 1100

(ABC)16 = (101010111100)2

Hexadecimal Fraction to Binary Fraction

1. (2D.C)16

Hexadecimal 2 D(=13) C(=12)


Number
Binary 0010 1101 1100
Number

(2D) 16 = (00101101.1100)2= (101101.11)2


Converting Hexadecimal to Octal

Steps:

• Convert to Binary: For each digit in the hexadecimal number, write its four-digit
binary equivalent.

• Group into Threes: Combine the binary digits into a single string. Then, group them
into sets of three, starting from the right. If the leftmost group doesn't have three
digits, add one or two leading zeros.

• Convert to Octal: Find the octal digit that corresponds to each three-digit binary
group.

1. ABC16

A B C

1010 1011 1100

5 2 7 4

(ABC)16 = (5274)8
Hexadecimal Fraction to Decimal Fraction

1. (2D.C)16

Hexadecimal 2 D (=13) C (=12)


Number
Binary 0010 1101 1100
Number

Now Combine the Binary number from above

101101.11

Now to get Final Result by converting Hexadecimal to Octal

Binary 101 10 110


Number
Octal Number 5 5 6

(2D.C) 16 = (55.6)8
Power Method

Step 1: Find the highest power of 2 that is less than or equal to your decimal number.
Step 2: Subtract this value from your decimal number to get a remainder.
Step 3: Repeat Step 1 and Step 2 with the new remainder. Continue this process until the
remainder is 0.
Step 4: To build the binary number, write a '1' for each power of 2 you subtracted. Write a '0'
for any powers of 2 you skipped.

Calculation for (1971)₁₀

1. The highest power of 2 less than 1971 is 210 (1024).

1971 - 1024 = 947

2. The highest power of 2 less than 947 is 29 (512).

947 - 512 = 435

3. The highest power of 2 less than 435 is 28 (256).

435 - 256 = 179

4. The highest power of 2 less than 179 is 27 (128).

179 - 128 = 51

5. The highest power of 2 less than 51 is 25 (32). (We skip 26)

51 - 32 = 19

6. The highest power of 2 less than 19 is 24 (16).

19 - 16 = 3

7. The highest power of 2 less than 3 is 21 (2). (We skip 23 and 22)

3-2=1

8. The highest power of 2 less than 1 is 20 (1).

1-1=0
Binary Construction Table

Power Value Status Binary Digit


210 1024 Used 1
29 512 Used 1
28 256 Used 1
27 128 Used 1
26 64 Skipped 0
25 32 Used 1
24 16 Used 1
23 8 Skipped 0
22 4 Skipped 0
21 2 Used 1
20 1 Used 1

Reading the binary digits from top to bottom gives you the final result: (11110110011)₂.

Now, constructing the binary number based on the powers used (10, 9, 8, 7, 5, 4, 1, 0) and
skipped (6, 3, 2):

(1971)₁₀ = (11110110011)₂

You might also like