Presentation is loading. Please wait.

Presentation is loading. Please wait.

TOPIC 2 NUMBERING SYSTEM.  Many number systems are in use in digital technology. The most common are the decimal, binary, octal, and hexadecimal systems.

Similar presentations


Presentation on theme: "TOPIC 2 NUMBERING SYSTEM.  Many number systems are in use in digital technology. The most common are the decimal, binary, octal, and hexadecimal systems."— Presentation transcript:

1 TOPIC 2 NUMBERING SYSTEM

2  Many number systems are in use in digital technology. The most common are the decimal, binary, octal, and hexadecimal systems. The decimal system is clearly the most familiar to us because it is a tool that we use every day. Examining some of its characteristics will help us to better understand the other systems.

3 DECIMAL SYSTEM  Decimal System The decimal system is composed of 10 numerals or symbols. These 10 symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; using these symbols as digits of a number, we can express any quantity. The decimal system, also called the base-10 system because it has 10 digits.

4 BINARY SYSTEM  In the binary system, there are only two symbols or possible digit values, 0 and 1. This base-2 system can be used to represent any quantity that can be represented in decimal or other number system.  In digital systems the information that is being processed is usually presented in binary form. Binary quantities can be represented by any device that has only two operating states or possible conditions. Eg. a switch has only open or closed. We arbitrarily (as we define them) let an open switch represent binary 0 and a closed switch represent binary 1. Thus we can represent any binary number by using series of switches.

5 BINARY COUNTING The Binary counting sequence is shown in the table:

6 BINARY TO DECIMAL CONVERTION  Any binary number can be converted to its decimal equivalent simply by summing together the weights of the various positions in the binary number which contain 1.  Example 1: convert 11011 2 to decimal value 11011 = 16+8+2+1= Solve:

7 Example 2 : Convert 10110101 2 to decimal value Solve: 10110 = 128 + 32 + 16 + 4 + 1= 101 You should noticed the method is find the weights (i.e., powers of 2) for each bit position that contains 1, and then to add them up.

8 DECIMAL TO BINARY CONVERTION  There are two methods to convert it:- i.Revese of Binary-To-Digital Method = 32 + 8 + 4 + 1 = 00 1 11 1 00 = 2 Decimal number write as the sum of square 0 & 1 is write on the byte Example 1: Convert 4510 to the binary value Solve =

9 ii.Repeat division method The numbers is divide by 2. Balance for the question is written until the last answer. 25 10 = ? 2 25 2 =12 balance 1 12 2 =6 balance 0 6 2 =3 balance 0 3 2 =1 balance 1 1 2 =0 balance 1MSB LSB... Answer = 11001 2 Example : convert 25 10 to binary Solve =

10 The Flow chart for repeated-division method is as follow:

11  The octal number system has a base of eight, meaning that it has eight possible digits: 0,1,2,3,4,5,6,7.  Use to represent long binary numbers in computers and microprocessors. OCTAL NUMBER SYSTEM

12  Convert from octal to decimal by multiplying each octal digit by its positional weight. Example 1: Convert 163 8 to decimal value Solve = =1 x 64 + 6 x 8 + 1 x 1 115 10 = Example 2: Convert 333 8 to decimal value Solve = =3 x 64 + 3 x 8 + 3 x 1 219 10 = OCTAL TO DECIMAL CONVERTION

13  Convert from decimal to octal by using the repeated division method used for decimal to binary conversion.  Divide the decimal number by 8  The first remainder is the LSB and the last is the MSB. 359 10 = ? 8 359 8 =44 balance 7 44 8 =5 balance 4 5 8 =0 balance 5MSB LSB...Answer = 547 8 Example : convert 359 10 to Decimal Value Solve = DECIMAL TO OCTAL CONVERTION

14  Convert from octal to binary by converting each octal digit to a three bit binary equivalent Octal digit01234567 Binary Equivalent 000  Convert from binary to octal by grouping bits in threes starting with the LSB.  Each group is then converted to the octal equivalent  Leading zeros can be added to the left of the MSB to fill out the last group. OCTAL TO BINARY CONVERTION

15

16  Can be converted by grouping the binary bit in group of three starting from LSB  Octal is a base-8 system and equal to two the power of three, so a digit in Octal is equal to three digit in binary system. BINARY TO OCTAL CONVERSION

17

18 HEXADECIMAL NUMBER SYSTEM  The hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It uses the digits 0 through 9 plus the letters A, B, C, D, E, and F as the 16 digit symbols.  Use to represent long binary numbers in computers and microprocessors.  These digits can use to program machine language.

19  Can be converted by grouping the binary bit in group of three starting from LSB  Octal is a base-8 system and equal to two the power of three, so a digit in Octal is equal to three digit in binary system. BINARY TO OCTAL CONVERSION

20  There is two ways to convert it:- i.Hexadecimal – Decimal – Octal ii.Hexadecimal – Binary – Octal i.Hexadecimal – Decimal – Octal HEXADECIMAL TO OCTAL CONVERTION

21 i.Hexadecimal – Decimal – Octal

22  Pelengkap –1 digunakan dalam nombor binari dandiperolehi dengan cara menukarkan 0 ke 1 dan 1 ke 0  Nombor yang ditukarkan hanyalah nombor negatif sahaja  Nombor yang diberi selain daripada binari perlu ditukar kepada bentuk binari terlebih dahulu. Contoh 1:Tukarkan 10011001 2 kepada bentuk pelengkap –1. Penyelesaian: 1 0 0 1 1 0 0 1 Jawapan : 01100110 Nombor asal 1 ditukar kepada 0 dan sebaliknya SISTEM PELENGKAP -1

23 Contoh2 : Tukarkan 27 10 kepada pelengkap –1. Penyelesaian: a) Tukarkan 27 10 kepada bentuk binari. b) Nombor binari kemudian di tukar dari 0 ke 1 dan 1 ke 0. a) 27 13 6 3 1 0 Baki 1 Baki 0 Baki 1 2 2 2 2 2 = 11011 b) Tukarkan 11011 kepada pelengkap -1 = 00100

24  Pelengkap –2 = pelengkap-1 +1  nombor negatif yang diberi diperolehi dengan menukar nombor negatif tersebut kepada pelengkap –1 dan dicampur dengan 1 Contoh 1: Tukarkan 10011001 2 kepada bentuk pelengkap –2. a) Tukarkan ke pelengkap-1 1 0 0 1 1 0 0 1 dalam bentuk pelengkap –1 ialah 0 1 1 0 0 1 1 0 dimana 0 → 1 dan 1 → 0. b) Tukarkan ke pelengkap-2 01100110 ditambah dengan 1 dibahagian LSB menjadi 01100111 2. SISTEM PELENGKAP -2

25 Contoh2 : Tukarkan 27 10 kepada pelengkap –2. Penyelesaian: a) Tukarkan 2710 dalam bentuk binary 27 13 6 3 1 0 Baki 1 Baki 0 Baki 1 2 2 2 2 2 = 11011 2 b) Tukarkan 11011 kepada pelengkap -1 00100 2 c) 00100 ditambah dengan 1 dibahagian LSB menjadi 00101 2.


Download ppt "TOPIC 2 NUMBERING SYSTEM.  Many number systems are in use in digital technology. The most common are the decimal, binary, octal, and hexadecimal systems."

Similar presentations


Ads by Google