You are on page 1of 79

Integer • Introduction

• Modular
Arithmetic
• GCD, LCM
CSCI1303 • Number systems
Mathematics for Computing I
CSCI1303 - Mathematics for Computing I Integer – Number System

Representation of Integers
Theorem:
if 𝑏 ∈ ℤ+ , then every positive integer 𝑛 can be uniquely
expressed in the form
𝑛 = 𝑑𝑘 ⋅ 𝑏 𝑘 + 𝑑𝑘−1 ⋅ 𝑏 𝑘−1 + ⋯ 𝑑1 ⋅ 𝑏 + 𝑑0
where 0 ≤ 𝑑𝑖 < 𝑏, 𝑖 = 1,2, … , 𝑘, and 𝑑𝑘 ≠ 0.

The sequence 𝑑𝑘 𝑑𝑘−1 ⋯ 𝑑1 𝑑0 𝑏 is called


the base 𝑏 expansion of 𝑛

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Range

Base Name Digits


10 Decimal 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
2 Binary 0, 1
8 Octal 0, 1, 2, 3, 4, 5, 6, 7
16 Hexadecimal 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example
Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 11012
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
Decimal to Binary
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 11012
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
123
Binary (Base-2) 11012
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
61
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
61 1
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
30
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
30 1
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 15

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 15 0

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
7

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
7 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
3

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
3 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
2 3 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
2 3 1
1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
2 3 1
1 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
2 3 1
2 1 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
2 3 1
2 1 1
0

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
2 3 1
2 1 1
0 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 11012
2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
2 3 1
2 1 1
0 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to binary


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
2 123
Binary (Base-2) 1111011 11012 2

2 61 1
Octal (Base-8) 3728
2 30 1
Hexadecimal (Base-16) 2 15 0
2 7 1
2 3 1
12310 = 11110112 2 1 1
0 1

hyaacob@iium.edu.my
Decimal to Octal
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 3728


Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 3728


Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
123
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 3728


Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
8 123
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 3728


Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
8 123
Binary (Base-2) 1111011 11012 2

15
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
8 123
Binary (Base-2) 1111011 11012 2

15 3
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
8 123
Binary (Base-2) 1111011 11012 2

8 15 3
Octal (Base-8) 3728
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
8 123
Binary (Base-2) 1111011 11012 2

8 15 3
Octal (Base-8) 3728
1 7
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
8 123
Binary (Base-2) 1111011 11012 2

8 15 3
Octal (Base-8) 3728
8 1 7
Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
8 123
Binary (Base-2) 1111011 11012 2

8 15 3
Octal (Base-8) 3728
8 1 7
Hexadecimal (Base-16) 0 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
8 123
Binary (Base-2) 1111011 11012 2

8 15 3
Octal (Base-8) 3728
8 1 7
Hexadecimal (Base-16) 0 1

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to octal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
8 123
Binary (Base-2) 1111011 11012 2

8 15 3
Octal (Base-8) 1738 3728
8 1 7
Hexadecimal (Base-16) 0 1

12310 = 1738

hyaacob@iium.edu.my
Decimal to Hexadecimal
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16)

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16)

10, 11, 12, 13, 14, 15


hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
123
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16)

10, 11, 12, 13, 14, 15


hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
16 123
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16)

10, 11, 12, 13, 14, 15


hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
16 123
Binary (Base-2) 1111011 11012 2

7 11
Octal (Base-8) 1738 3728
Hexadecimal (Base-16)

10, 11, 12, 13, 14, 15


hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
16 123
Binary (Base-2) 1111011 11012 2

16 7 11
Octal (Base-8) 1738 3728
Hexadecimal (Base-16)

10, 11, 12, 13, 14, 15


hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
16 123
Binary (Base-2) 1111011 11012 2

16 7 11
Octal (Base-8) 1738 3728
0 7
Hexadecimal (Base-16)

10, 11, 12, 13, 14, 15


hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
16 123
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


16 7 11 =B
0 7
Hexadecimal (Base-16)

10, 11, 12, 13, 14, 15


hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
16 123
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


16 7 11 =B
0 7
Hexadecimal (Base-16)

10, 11, 12, 13, 14, 15


hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert decimal to hexadecimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 Base-N Decimal Remainder
16 123
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


16 7 11 =B
0 7
Hexadecimal (Base-16) 7B16

12310 = 7B16

10, 11, 12, 13, 14, 15


hyaacob@iium.edu.my
Binary to Decimal
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert binary to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert binary to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16

1101𝟐 = 𝟏 ∙ 𝟐𝟑 + 𝟏 ∙ 𝟐𝟐 + 𝟎 ∙ 𝟐𝟏 + 𝟏 ∙ 𝟐𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert binary to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16

1101𝟐 = 𝟏 ∙ 𝟐𝟑 + 𝟏 ∙ 𝟐𝟐 + 𝟎 ∙ 𝟐𝟏 + 𝟏 ∙ 𝟐𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert binary to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16

1101𝟐 = 𝟏 ∙ 𝟐𝟑 + 𝟏 ∙ 𝟐𝟐 + 𝟎 ∙ 𝟐𝟏 + 𝟏 ∙ 𝟐𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert binary to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16

1101𝟐 = 𝟏 ∙ 𝟐𝟑 + 𝟏 ∙ 𝟐𝟐 + 𝟎 ∙ 𝟐𝟏 + 𝟏 ∙ 𝟐𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert binary to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16

1101𝟐 = 𝟏 ∙ 𝟐𝟑 + 𝟏 ∙ 𝟐𝟐 + 𝟎 ∙ 𝟐𝟏 + 𝟏 ∙ 𝟐𝟎
=𝟖+𝟒+𝟎+𝟏

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert binary to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 1310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16

1101𝟐 = 𝟏 ∙ 𝟐𝟑 + 𝟏 ∙ 𝟐𝟐 + 𝟎 ∙ 𝟐𝟏 + 𝟏 ∙ 𝟐𝟎
=𝟖+𝟒+𝟎+𝟏
= 𝟏𝟑𝟏𝟎
hyaacob@iium.edu.my
Octal to Decimal
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert octal to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 1310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert octal to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 1310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16
372 𝟖 = 𝟑 ∙ 𝟖𝟐 + 𝟕 ∙ 𝟖𝟏 + 𝟐 ∙ 𝟖𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert octal to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 1310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16
372 𝟖 = 𝟑 ∙ 𝟖𝟐 + 𝟕 ∙ 𝟖𝟏 + 𝟐 ∙ 𝟖𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert octal to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 1310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16
372 𝟖 = 𝟑 ∙ 𝟖𝟐 + 𝟕 ∙ 𝟖𝟏 + 𝟐 ∙ 𝟖𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert octal to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 1310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16
372 𝟖 = 𝟑 ∙ 𝟖𝟐 + 𝟕 ∙ 𝟖𝟏 + 𝟐 ∙ 𝟖𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert octal to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 1310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16
372 𝟖 = 𝟑 ∙ 𝟖𝟐 + 𝟕 ∙ 𝟖𝟏 + 𝟐 ∙ 𝟖𝟎
= 𝟑 ∙ 𝟔𝟒 + 𝟕 ∙ 𝟖 + 𝟐 ∙ 𝟏

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert octal to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 1310
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16
372 𝟖 = 𝟑 ∙ 𝟖𝟐 + 𝟕 ∙ 𝟖𝟏 + 𝟐 ∙ 𝟖𝟎
= 𝟑 ∙ 𝟔𝟒 + 𝟕 ∙ 𝟖 + 𝟐 ∙ 𝟏
= 𝟏𝟗𝟐 + 𝟓𝟔 + 𝟐

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Example: Convert octal to decimal


Fill in the blanks with equivalent number expansions:
Decimal (Base-10) 12310 1310 25010
Binary (Base-2) 1111011 11012 2

Octal (Base-8) 1738 3728


Hexadecimal (Base-16) 7B16
372 𝟖 = 𝟑 ∙ 𝟖𝟐 + 𝟕 ∙ 𝟖𝟏 + 𝟐 ∙ 𝟖𝟎
= 𝟑 ∙ 𝟔𝟒 + 𝟕 ∙ 𝟖 + 𝟐 ∙ 𝟏
= 𝟏𝟗𝟐 + 𝟓𝟔 + 𝟐
= 𝟐𝟓𝟎𝟏𝟎
hyaacob@iium.edu.my
Example:
Fill in the blanks with equivalent number expansions:

Decimal (Base-10) 12310 1310 25010


Binary (Base-2) 111 10112 11012 1111 10102
Octal (Base-8) 1738 158 3728
Hexadecimal (Base-16) 7B16 D16 FA16
Hexadecimal to Decimal
CSCI1303 - Mathematics for Computing I Integer – Number System

Hexadecimal to Decimal

Convert ADAB16 to Decimal

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Hexadecimal to Decimal

Convert ADAB16 to Decimal


ADAB𝟏𝟔 = 𝑨 ∙ 𝟏𝟔𝟑 + 𝑫 ∙ 𝟏𝟔𝟐 + 𝑨 ∙ 𝟏𝟔𝟏 + 𝑩 ∙ 𝟏𝟔𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Hexadecimal to Decimal
10, 11, 12, 13, 14, 15

Convert ADAB16 to Decimal


ADAB𝟏𝟔 = 𝑨 ∙ 𝟏𝟔𝟑 + 𝑫 ∙ 𝟏𝟔𝟐 + 𝑨 ∙ 𝟏𝟔𝟏 + 𝑩 ∙ 𝟏𝟔𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Hexadecimal to Decimal
10, 11, 12, 13, 14, 15

Convert ADAB16 to Decimal


ADAB𝟏𝟔 = 𝑨 ∙ 𝟏𝟔𝟑 + 𝑫 ∙ 𝟏𝟔𝟐 + 𝑨 ∙ 𝟏𝟔𝟏 + 𝑩 ∙ 𝟏𝟔𝟎
= 𝟏𝟎 ∙ 𝟏𝟔𝟑 + 𝟏𝟑 ∙ 𝟏𝟔𝟐 + 𝟏𝟎 ∙ 𝟏𝟔𝟏 + 𝟏𝟏 ∙ 𝟏𝟔𝟎

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Hexadecimal to Decimal
10, 11, 12, 13, 14, 15

Convert ADAB16 to Decimal


ADAB𝟏𝟔 = 𝑨 ∙ 𝟏𝟔𝟑 + 𝑫 ∙ 𝟏𝟔𝟐 + 𝑨 ∙ 𝟏𝟔𝟏 + 𝑩 ∙ 𝟏𝟔𝟎
= 𝟏𝟎 ∙ 𝟏𝟔𝟑 + 𝟏𝟑 ∙ 𝟏𝟔𝟐 + 𝟏𝟎 ∙ 𝟏𝟔𝟏 + 𝟏𝟏 ∙ 𝟏𝟔𝟎
= 𝟏𝟎 ∙ 𝟒𝟎𝟗𝟔 + 𝟏𝟑 ∙ 𝟐𝟓𝟔 + 𝟏𝟎 ∙ 𝟏𝟔 + 𝟏𝟏 ∙ 𝟏

hyaacob@iium.edu.my
CSCI1303 - Mathematics for Computing I Integer – Number System

Hexadecimal to Decimal
10, 11, 12, 13, 14, 15

Convert ADAB16 to Decimal


ADAB𝟏𝟔 = 𝑨 ∙ 𝟏𝟔𝟑 + 𝑫 ∙ 𝟏𝟔𝟐 + 𝑨 ∙ 𝟏𝟔𝟏 + 𝑩 ∙ 𝟏𝟔𝟎
= 𝟏𝟎 ∙ 𝟏𝟔𝟑 + 𝟏𝟑 ∙ 𝟏𝟔𝟐 + 𝟏𝟎 ∙ 𝟏𝟔𝟏 + 𝟏𝟏 ∙ 𝟏𝟔𝟎
= 𝟏𝟎 ∙ 𝟒𝟎𝟗𝟔 + 𝟏𝟑 ∙ 𝟐𝟓𝟔 + 𝟏𝟎 ∙ 𝟏𝟔 + 𝟏𝟏 ∙ 𝟏
= 𝟒𝟎𝟗𝟔𝟎 + 𝟑𝟑𝟐𝟖 + 𝟏𝟔𝟎 + 𝟏𝟏

= 𝟒𝟒𝟒𝟓𝟗𝟏𝟎

hyaacob@iium.edu.my

You might also like