Number Sys
Number Sys
Number Sys
INTRODUCTION
*Read as 2 power10.
In a 2GB (Gigabytes) storage device (hard disk), totally
21,47,483,648 bytes can be stored.
Compiled by: Enihe Raphael O. 213
COMPUTER NUMBER SYSTEMS
DECIMAL NUMBER SYSTEM
The number system that we use in our day-to-day life is the
decimal number system.
Decimal number system has base 10 as it uses 10 digits from
0 to 9.
In decimal number system, the successive positions to the left
of the decimal point represent units, tens, hundreds, thousands
and so on.
Each position represents a specific power of the base (10).
For example, the decimal number 1234 consists of the digit 4 in
the units position, 3 in the tens position, 2 in the hundreds
position, and 1 in the thousands position, and its value can be
written as:
(1x1000)+ (2x100)+ (3x10)+ (4x1)
(1x103)+ (2x102)+ (3x101)+ (4x100)
1000 + 200 + 30 + 4 Compiled by: Enihe Raphael O. 214
1234
COMPUTER NUMBER SYSTEMS
DECIMAL NUMBER SYSTEM
Example
Octal Number : 125708
Calculating Decimal Equivalent:
Step Octal Number Decimal Number
Step 1 125708 ((1 x 84) + (2 x 83) + (5 x 82) + (7 x 81) + (0 x 80))10
Step 2 125708 (4096 + 1024 + 320 + 56 + 0)10
Step 3 125708 549610
Note : 125708 is normally written as 12570.
Example
Hexadecimal Number : 19FDE16
Calculating Decimal Equivalent:
Step Hexa Number Decimal Number
Step 1 19FDE16 ((1 x 164) + (9 x 163) + (F x 162) + (D x 161) + (E x 160))10
Step 2 19FDE16 ((1 x 164) + (9 x 163) + (15 x 162) + (13 x 161) + (14 x 160))10
Step 3 19FDE16 (65536+ 36864 + 3840 + 208 + 14)10
Step 4 19FDE16 10646210
Note : 19FDE16 is normally written as 19FDE.
Repeated Division by 2
Any decimal number divided by 2 will leave a
remainder of 0 or 1. Repeated division by 2 will
leave a string of 0s and 1s that become the binary
Compiled by: Enihe Raphael O. 222
equivalent of the decimal number.
COMPUTER NUMBER SYSTEMS
DECIMAL TO BINARY CONVERSION - Repeated Division by 2
Example:
Example
Binary Number : 111012
Calculating Decimal Equivalent:
Example
Octal Number : 258
Calculating Binary Equivalent:
Compiled by: Enihe Raphael O. 230
COMPUTER NUMBER SYSTEMS
OTHER BASE SYSTEM TO NON-DECIMAL SYSTEM
Example cont…
Octal Number : 258
Calculating Binary Equivalent:
Steps
Step 1 - Divide the binary digits into groups of
three (starting from the right).
Example
Binary Number : 101012
Calculating Octal Equivalent:
Compiled by: Enihe Raphael O. 233
COMPUTER NUMBER SYSTEMS
SHORTCUT METHOD - BINARY TO OCTAL
Example
Binary Number : 101012
Calculating Octal Equivalent:
Steps
Step 1 - Convert each octal digit to a 3 digit binary
number (the octal digits may be treated as decimal
for this conversion).
Example
Octal Number : 258
Calculating Binary Equivalent:
Compiled by: Enihe Raphael O. 235
COMPUTER NUMBER SYSTEMS
SHORTCUT METHOD - OCTAL TO BINARY
Example
Octal Number : 258
Calculating Binary Equivalent:
Steps
Step 1 - Divide the binary digits into groups of four
(starting from the right).
Example
Binary Number : 101012
Calculating hexadecimal Equivalent:
Compiled by: Enihe Raphael O. 237
COMPUTER NUMBER SYSTEMS
SHORTCUT METHOD - BINARY TO HEXADECIMAL
Example
Binary Number : 101012
Calculating hexadecimal Equivalent:
steps
Step 1 - Convert each hexadecimal digit to a 4 digit
binary number (the hexadecimal digits may be
treated as decimal for this conversion).
Example
Hexadecimal Number : 1516
Calculating Binary Equivalent:
Compiled by: Enihe Raphael O. 239
COMPUTER NUMBER SYSTEMS
SHORTCUT METHOD - HEXADECIMAL TO BINARY
Example
Hexadecimal Number : 1516
Calculating Binary Equivalent: