Professional Documents
Culture Documents
Number Systems
Number Systems
Demo CSE
By : RK Khatri
Outlines
Introduction Common number systems. Counting Conversions Binary to Other number systems Others to Binary number system Decimal to Other number systems Others to Decimal number system Octal to Hexadecimal number system Hexadecimal to Octal number system
Demo CSE
By : RK Khatri
INTRODUCION
We are familiar with the decimal number system in which digits are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. We use these numbers in and as phone number, age, score, weight, etc. The computer uses binary digits for its operation. Binary means 2. In the binary system, there are only two digits 0 and 1. How Computer works? The programmer or user feeds instruction and data in alphabets and decimal digits through the keyboard. These are converted to binary bits. Final result is again converted back to monitor in human readable form. Other number systems are Octal n Hexadecimals. Octal means 8 and hexadecimals means 16. Octal n hexadecimals are used in Computers internal processes.
Demo CSE
By : RK Khatri
Hexadecimal
16
0, 1, 9, A, B, F
No
Demo CSE
Quantities/Counting (1 of 3)
Decimal 0 1 2 3 4 5 6 7
Demo CSE
Quantities/Counting (2 of 3)
Decimal 8 9 10 11 12 13 14 15
Demo CSE
HexaBinary Octal decimal 1000 10 8 1001 11 9 1010 12 A 1011 1100 1101 1110 1111 13 14 15 16 17 B C D E F
By : RK Khatri
Quantities/Counting (3 of 3)
Decimal 16 17 18 19 20 21 22 23
Demo CSE
HexaBinary Octal decimal 10000 20 10 10001 21 11 10010 22 12 10011 10100 10101 10110 10111 23 24 25 26 27 13 14 15 16 17 Etc.
By : RK Khatri
Quantities/Counting (3 of 3)
Decimal Binary HexaOctal decimal
24 25 26 27 28 29 30 31 32
Demo CSE
30 31 32 33 34 35 36 37 40
18 19 1A 1B 1C 1D 1E 1F 20
Etc.
By : RK Khatri
Binary
Hexadecimal
Demo CSE
By : RK Khatri
Quick Example
Demo CSE
By : RK Khatri
Binary to Others
110112 = ?10 = Sum of (bit x 2 weight ) weight = position of the bit from right. 1x24 + 1x23 + 0x22 + 1x21 + 1x20 = 27 110112 = ?8 = Make pairs of 3 bits. 011 011 = 33 110112 = ?16 = Make pairs of 4 bits. 0001 1011 = 1 B
Demo CSE
By : RK Khatri
Others to Binary
2710 = ?2 = Divide by 2 read remainders in reverse !! 2 | 27 2 |13 | 1 2 |6 | 1 2 |3 | 0 2 |1 | 1 |1 = 11011 338 = ?2 = Convert in pairs of 3 bits. 011 011 1B16 = ?2 = Convert in pairs of 4 bits. 0001 1011
Demo CSE
By : RK Khatri
Decimal to Others
2710 = ?2 = Divide by 2 read remainders in reverse !! 2 | 27 2 |13 | 1 2 |6 | 1 2 |3 | 0 2 |1 | 1 |1 = 11011
= 425
Demo CSE
By : RK Khatri
Decimal to Others
27710 = ?16 = Divide by 16 read remainders in reverse !! 16 |277 16 |17 | 5 16 |1 | 1 | |1
= 115
Demo CSE
By : RK Khatri
Others to Decimal
110112 = ?10 = Sum of (bit x 2 weight ) weight = position of the bit from right. 1x24 + 1x23 + 0x22 + 1x21 + 1x20 = 27 1238 = ?10 = Sum of (bit x 8 weight ) weight = position of the bit from right. 1x82 + 2x81 + 3x80 = 83 3B16 = ?10 = Sum of (bit x 16 weight ) weight = position of the bit from right. 3x161 + 11x160 = 59
Demo CSE
By : RK Khatri
Octal to Hexadecimal
Use binary as an intermediary
Octal > Binary > Hexadecimal
10768 = ?16 1 0 7 6
001 2
000 3
111
Demo CSE
By : RK Khatri
Hexadecimal to Octal
Use binary as an intermediary
Hexadecimal > Binary > Octal
23E16 = ?8 2 3 E
0010 1 0
0011 7
Demo CSE
By : RK Khatri
Hexadecimal
703
1AF
Dont use a calculator!
Skip answer
Demo CSE
Answer
By : RK Khatri
Exercise Convert
Answer
Decimal 33 117
Octal 41 165
Hexadecimal
21 75
451
431
111000011
110101111
703
657
1C3
1AF
Demo CSE
By : RK Khatri
Fractions
Binary to decimal
10.1011 => 1 1 0 1 0 1 x x x x x x 2-4 2-3 2-2 2-1 20 21 = = = = = = 0.0625 0.125 0.0 0.5 0.0 2.0 2.6875
By : RK Khatri
Fractions
Decimal to binary
3.14579
.14579 x 2 0.29158 x 2 0.58316 x 2 1.16632 x 2 0.33264 x 2 0.66528 x 2 1.33056 etc. p. 50 Demo CSE
11.001001...
Introduction to Number System
By : RK Khatri
Decimal 29.8
Binary
101.1101
Octal
3.07 C.82
Dont use a calculator!
Skip answer
Demo CSE
Answer
By : RK Khatri
Exercise Convert
Answer
Decimal 29.8
5.8125 3.109375 12.5078125
Demo CSE
By : RK Khatri
Thank you
Demo CSE
By : RK Khatri