Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2: Number Systems

Similar presentations


Presentation on theme: "Chapter 2: Number Systems"— Presentation transcript:

1 Chapter 2: Number Systems
The Decimal System The number system that we use in our life is called Decimal System because it contains 10 symbols (0,1,2,3,4,5,6,7,8,9). Any number you write is a combination of these 10 symbols. Like: 9806, 5, 101,..etc. Chapter 4 - Numbering Systems

2 Chapter 4 - Numbering Systems
The Need for new system Computers are electronic devices. Since any electronic circuit has only two possible state “ON” and “OFF”. Then the decimal system is not suitable to represent information inside the computer because we need 10 different levels of representations since we have 10 symbols. It means, if you assign 0  ON, 1OFF, how can you represent 2,3,…9? Chapter 4 - Numbering Systems

3 Chapter 4 - Numbering Systems
The Binary System The Binary System has only two symbols: 0 and 1 (this is why they called it binary). Any number in the binary system is a sequence of 0 and 1 like: 10111, , ,….etc. The binary system is suitable to represent information inside the computer. Because it Chapter 4 - Numbering Systems

4 Chapter 4 - Numbering Systems
has only two possible states: 1 ON, 0OFF. These 1s and 0s are referred to as binary digits. It is from this term we got the word BIT as an abbreviation to “Binary Digit”. BIT 1 Chapter 4 - Numbering Systems

5 Chapter 4 - Numbering Systems
System’s Base When we use more than one number system, system’s base is needed: The following number is written in decimal: (1298)10 Base The following number is written in binary: (10111)2 Chapter 4 - Numbering Systems

6 Chapter 4 - Numbering Systems
Writing Decimal Numbers in the Expansion Form A decimal number like (2067)10 can be rewritten as: 1- Coefficients are: 2,0,6 and 7. 2- Put the weights: ( )10 3- Multiply each coefficient by 10it’s weight: ( )10 = 2     100 =  (2067)10 Chapter 4 - Numbering Systems

7 Chapter 4 - Numbering Systems
Another Example: A decimal number like (5179)10 can be rewritten as: 1- Coefficients are: 5,1,7 and 9. 2- Put the weights: ( ) 10 3- Multiply each coefficient by 10it’s weight: ( ) 10 = 5     100 =  (5179)10 Chapter 4 - Numbering Systems

8 Chapter 4 - Numbering Systems
Different Bases: The binary system has the base 2. For example: (11011)2, (100110)2 The Octal System has only eight symbols (0,1,2,3,4,5,6,7) and it has the base 8. For example: (12706)8, (777)8, (6007)8 The Hexadecimal System has sixteen symbols (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) where A represents 10, B represents 11…F represents 15. For example: (1FC94)16 Chapter 4 - Numbering Systems

9 Chapter 4 - Numbering Systems
Converting Integer Binary Numbers to Their Equivalent in Decimal: Put the weights. Multiply each bit by 2it’s weight Sum the results of multiplications. Ex1: Convert (1011)2 to it’s equivalent in decimal (?)10 ( ) = 123 + 022 + 121 + 120 =  (11)10 Chapter 4 - Numbering Systems

10 Chapter 4 - Numbering Systems
Ex2: Convert (111101)2 to it’s equivalent in decimal (?)10 ( )2 = 125 + 124 + 123 + 122+ 021+ 120 = = (61)10 Chapter 4 - Numbering Systems

11 Chapter 4 - Numbering Systems
Converting Fractional Binary Numbers to Their Equivalent in Decimal: Put the weights starting from the right of the point (-1, -2,….). Multiply each bit by 2it’s weight Sum the results of multiplications. Ex1: Convert (0.101)2 to it’s equivalent in decimal (?)10 ( )2 = 1  2-3 = 1 / / 8  (0.625)10 Chapter 4 - Numbering Systems

12 Chapter 4 - Numbering Systems
Ex2: Convert (0.0011)2 to it’s equivalent in decimal (?)10 ( )2 = 0  2-3 + 12-4 = / / 16 = = (0.1875)10 Chapter 4 - Numbering Systems

13 Chapter 4 - Numbering Systems
Ex3: Convert ( )2 to it’s equivalent in decimal (?)10 Integer Part (100011)2 ( )2 = 125 + 024 + 023 + 022+ 121+ 120 = = (35)10 Chapter 4 - Numbering Systems

14 Chapter 4 - Numbering Systems
Fraction Part (0.1001)2 ( )2 = 1  2-3 + 12-4 = 1 / / 16 = = (0.5625)10 Chapter 4 - Numbering Systems

15 Chapter 4 - Numbering Systems
Converting Integer Decimal Numbers to Their Equivalent in Binary: Divide the decimal number by 2 (Integer Division). Put the remainder (0 or 1) to the left of the binary number. Apply the same division but on the result from the previous step. Stop division when the result = 0 Chapter 4 - Numbering Systems

16 Chapter 4 - Numbering Systems
Ex1: Convert (11)10 to it’s equivalent in binary (?)2 11  2 = 5 Rem 1 5  2 = 2 Rem 1 2  2 = 1 Rem 0 1  2 = 0 Rem 1 ( )2 Chapter 4 - Numbering Systems

17 Chapter 4 - Numbering Systems
Ex2: Convert (61)10 to it’s equivalent in binary (?)2 61  2 = 30 Rem 1 30  2 = 15 Rem 0 15  2 = 7 Rem 1 7  2 = 3 Rem 1 3  2 = 1 Rem 1 1  2 = 0 Rem 1 ( )2 Chapter 4 - Numbering Systems

18 Chapter 4 - Numbering Systems
Converting Fractional Decimal Numbers to their Equivalent in Binary: Multiply the fraction with 2. The result in the integer part is either 1 or 0. Put this result to the right of the fraction point of the binary number. Repeat the multiplication on the fractional part until the fraction becomes equal to 0. Chapter 4 - Numbering Systems

19 Chapter 4 - Numbering Systems
Ex1: Convert (0.625)10 to it’s equivalent in binary (?)2 0.625  2 = 1.25 0.25  2 = 0.5 0.5  2 = 1.0 ( )2 Chapter 4 - Numbering Systems

20 Chapter 4 - Numbering Systems
Ex2: Convert (0.1875)10 to it’s equivalent in binary (?)2  2 = 0.375 0.375  2 = 0.75 0.75  2 = 1.5 0.5  2 = 1.0 ( ) 2 Chapter 4 - Numbering Systems

21 Chapter 4 - Numbering Systems
Ex3: Convert ( )10 to it’s equivalent in binary(?)2 Integer Part (35)10 35  2 = 17 Rem 1 17  2 = 8 Rem 1 8  2 = 4 Rem 0 4  2 = 2 Rem 0 2  2 = 1 Rem 0 1  2 = 0 Rem 1 (100011)2 Chapter 4 - Numbering Systems

22 Chapter 4 - Numbering Systems
The fraction part:  2 = 1.125 0.125  2 = 0.25 0.25  2 = 0.5 0.5  2 = 1.0 (0.1001)2 The number is ( )2 Chapter 4 - Numbering Systems

23 Chapter 4 - Numbering Systems
Binary Addition In decimal system, when you wan to add two numbers like: then the result is 9. It means that we can represent the value nine with the symbol 9. But when we add two numbers like 5+8 then we can’t represent the value thirteen with one symbol so we use two symbols 13. Chapter 4 - Numbering Systems

24 Chapter 4 - Numbering Systems
Actually 13 comes from 1* *100 The same thing is applied in the binary system. 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1  we don’t have a symbol that can represent the value two because in the binary system because the largest value is 1. Chapter 4 - Numbering Systems

25 Chapter 4 - Numbering Systems
So, 1 1 + 10 Chapter 4 - Numbering Systems

26 Chapter 4 - Numbering Systems
Chapter 4 - Numbering Systems


Download ppt "Chapter 2: Number Systems"

Similar presentations


Ads by Google