number system conversion
TRANSCRIPT
![Page 1: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/1.jpg)
Name: ID:
Md. Ilias Bappi 131-15-2266Md.Kawsar Hamid 131-15-2223
Introducing my group members
![Page 2: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/2.jpg)
PRESENTATIONON
NUMBER SYSTEM
&
CONVERSION
![Page 3: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/3.jpg)
WHAT IS 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.
![Page 4: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/4.jpg)
COMPLEMENT OF NUMBER
One's complement: In binary system, if each 1 is
replaced by 0 and each 0 by 1, then resulting number is called as one's complement of the that number.
• If first number is positive then resulting will be negative with the same magnitude and vice versa.
• In binary arithmetic 1’s complement of a binary number N is obtained by the formula = (2^n – 1) – N
Where n is the no of bits in binary number N.
![Page 5: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/5.jpg)
EXAMPLE Convert binary number 111001101 to 1’s complement.
Method:
N = 111001101
n = 9
2^n = 256 = 100000000
2^n -1 = 255 = 11111111
1’s complement of N = (100000000 – 1) -111001101
011111111
– 111001101
= 000110010
Answer:
1’s complement of N is 000110010
![Page 6: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/6.jpg)
TWO'S COMPLEMENT
Two's complement: If 1 is added to the complement of a number then resulting number is known as two's complement.
• If MSB is 0 then the number is positive else if MSB is 1 then the number is negative.
• 2’s complement of a binary number N is obtained by the formula (2^n) – N ,Where n is the no of bits in number N
![Page 7: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/7.jpg)
EXAMPLE• Convert binary number 111001101 to 2’s complement
• Method:
2’s complement of a binary no can be obtained by two step process
Step 1
1’s complement of number N = 000110010
Step 2
1’s complement + 1
000110010
+ 000000001
= 000110011
Answer
2’s complement of a binary no 111001101 is 000110011
![Page 8: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/8.jpg)
CONVERSION
![Page 9: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/9.jpg)
CONVERSION AMONG BASES
• The possibilities:
Hexadecimal
Decimal Octal
Binary
![Page 10: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/10.jpg)
EXAMPLE
(25)10 = 110012 = 318 = 1916
Base
![Page 11: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/11.jpg)
BINARY TO DECIMAL
Hexadecimal
Decimal Octal
Binary
![Page 12: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/12.jpg)
BINARY TO DECIMAL
• Technique
• Multiply each bit by 2n, where n is the “weight” of the bit
• The weight is the position of the bit, starting from 0 on the right
• Add the results
![Page 13: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/13.jpg)
EXAMPLE
1010112 => 1 x 20 = 11 x 21 =
20 x 22 =
01 x 23 =
80 x 24 =
01 x 25 =
32
4310
Bit “0”
![Page 14: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/14.jpg)
OCTAL TO DECIMAL
Hexadecimal
Decimal Octal
Binary
![Page 15: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/15.jpg)
OCTAL TO DECIMAL
• Technique
• Multiply each bit by 8n, where n is the “weight” of the bit
• The weight is the position of the bit, starting from 0 on the right
• Add the results
![Page 16: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/16.jpg)
EXAMPLE
7248 => 4 x 80 = 42 x 81 = 167 x 82 = 448
46810
![Page 17: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/17.jpg)
HEXADECIMAL TO DECIMAL
Hexadecimal
Decimal Octal
Binary
![Page 18: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/18.jpg)
HEXADECIMAL TO DECIMAL
• Technique
• Multiply each bit by 16n, where n is the “weight” of the bit
• The weight is the position of the bit, starting from 0 on the right
• Add the results
![Page 19: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/19.jpg)
EXAMPLE
ABC16 => C x 160 = 12 x 1 = 12 B x 161 = 11 x 16 = 176 A x 162 = 10 x 256 = 2560
274810
![Page 20: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/20.jpg)
HEXADECIMAL TO BINARY
Hexadecimal
Decimal Octal
Binary
![Page 21: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/21.jpg)
HEXADECIMAL TO BINARY
• Technique
• Convert each hexadecimal digit to a 4-bit equivalent binary representation
![Page 22: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/22.jpg)
EXAMPLE
10AF16 = ?2
1 0 A F
0001 0000 1010 1111
10AF16 = 00010000101011112
![Page 23: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/23.jpg)
DECIMAL TO BINARY
Hexadecimal
Decimal Octal
Binary
![Page 24: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/24.jpg)
DECIMAL TO BINARY
• Technique
• Divide by two, keep track of the remainder
• First remainder is bit 0 (LSB, least-significant bit)
• Second remainder is bit 1
• Etc.
![Page 25: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/25.jpg)
EXAMPLE
12510 = ?22 125 62 12 31 02 15 12 7 12 3 12 1 12 0 1
12510 = 11111012
![Page 26: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/26.jpg)
OCTAL TO BINARY
Hexadecimal
Decimal Octal
Binary
![Page 27: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/27.jpg)
OCTAL TO BINARY
• Technique
• Convert each octal digit to a 3-bit equivalent binary representation
![Page 28: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/28.jpg)
EXAMPLE
7058 = ?2
7 0 5
111 000 101
7058 = 1110001012
![Page 29: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/29.jpg)
OCTAL TO HEXADECIMAL
•132 8 = (?) 16
• Octal ↔ Binary ↔ Hex
0 0 1 0 1 1 0 1 0 2
1 3 2
= 5 A 16
0 1 0 1 1 0 1 0
![Page 30: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/30.jpg)
FRACTIONS
• Binary to decimal
10.1011 => 1 x 2-4 = 0.06251 x 2-3 = 0.1250 x 2-2 = 0.01 x 2-1 = 0.50 x 20 = 0.01 x 21 = 2.0 2.6875
![Page 31: Number system conversion](https://reader035.vdocuments.us/reader035/viewer/2022062420/55d2bd8dbb61eb612b8b47fb/html5/thumbnails/31.jpg)
Thank You
all