lec4
lec4
Numbers can be classified according to how they are represented or according to the
properties that they have.
➢ Decimal - d
Decimal numbers use a positional notation system. Each digit is multiplied by an appropriate
power of 10 depending on its position in the number.
➢ Octal - O
The octal numeral system (Oct) is the base-8 number system, and uses the digits 0 to 7.
1128 = 1 x 82 + 1 x 81 + 2 x 80
➢ Hexadecimal - h
Also known as just hex, is base 16 number system, and uses the digits from 0 to 9 & wit 5
characters (A,B,C,D,E,F).
Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
The binary number system is also a positional notation numbering system; the base is 2, its
only use two digit 0 and 1
1011012 = 1 x 25 + 0 x 24 + 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20
= 1 x 32 + 0 x 16 + 1 x 8 + 1 x 4 + 0 x 2 + 1 x 1
= 32 + 0 + 8 + 4 + 0 + 1
= 4510
5.1 To Binary system: decimal number can convert to binary system in different ways,
such as dividing decimal number to binary base of 2.
Decimal Binary Remain
Exp: convert 1810 to Binary
Number base value
18 2 0
step 1: divide the number by 2 ( binary base)
9 2 1
step 2: write the remain in 3rd column
4 2 0
step 3: write the result under the number
2 2 0
step 4: repeat above steps for the result of division till the result 1 2 1
less than base
step 5: rewrite remain value down to up
The result is 100102
.2 To Hex number
Decimal Hex Remain
Using Division by 16 as in 5.1 steps Number base value
Or 18 16 2
Step1: convert decimal to binary using above steps 1 16 1
Step2: convert the result from step1 to hex using Binary to Hex 4.2
The result is 1216
.3 To Oct System
Decimal Oct Remain
Using Division by 16 as in 5.1 steps
Number base value
18 8 2
2 8 2
.2 To Binary :
346A16
Step 1: convert each digit of hex to Decimal number separately 3 4 6 10
Step2: convert each decimal to four bits binary number separately 0011 0100 0110 1010
Step3: combine all binary result together 0011010001101010
.3 To Oct :
Step 1: convert the hex number to Decimal number
Step2: convert Decimal to Oct as in 5.3