0% found this document useful (0 votes)
19 views31 pages

Sec 4

Sgshhs shhshs sush

Uploaded by

bshsgshs68
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views31 pages

Sec 4

Sgshhs shhshs sush

Uploaded by

bshsgshs68
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Mansoura University

Faculty of Computers and Information


Department of Information Technology
First Semester- 2023-2024

Computing Basics
Grade: 1
Hadeel Elsisi
OUTLINES

 Introduction
 Number System Types
➢ Decimal Number System
➢ Binary Number System
➢ Octal Number System
➢ Hexadecimal Number System

 Number system conversions


➢ Decimal to Binary ,Octal and Hexadecimal Conversions
➢ Binary ,Octal and Hexadecimal to Decimal Conversions
➢ Binary to Octal and Hexadecimal conversions
 Conclusion 2
INTRODUCTION

 Number system
❖ The way to represent or express a number in different forms . In other words, it is a technique
used in representing numbers in daily life and in the computer system architecture.

❖ Allow us to operate arithmetic operations like addition, subtraction and division.

❖ The total number of digits used in a number system is called its base or radix.

❖ The base is written after the number as subscript;


for instance 10001102 (1000110 base 2), 5610 (56 to base of 10), 718 (71 base 8) etc. 3
NUMBER SYSTEM TYPES

 The Most Common Number System Types are:


➢ Decimal number system (Base 10) .
➢ Binary number system (Base 2).
➢ Octal number system (Base 8).
➢ Hexadecimal number system (Base 16).

4
NUMBER SYSTEM TYPES

Decimal Number System (Base 10 Number System):


➢ The number system that we use in daily 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.
➢ It’s Value can be written as:

5
NUMBER SYSTEM TYPES

Binary Number System (Base 2 Number System):


➢ BINARY is the number system form which the system/machine accepts.
➢ Number system has only two digits which are 0 and 1.
➢ The base of binary number system is 2
➢ Example:
Binary Number: (1010)2

6
NUMBER SYSTEM TYPES

Octal Number System (Base 8 Number System):


➢ Number system uses numbers from 0 to 7 to represent numbers.
➢ The base of octal number system is 8
➢ Octal numbers are commonly used in computer applications.
➢ Example
Octal Number: (1573)8

7
NUMBER SYSTEM TYPES

Hexadecimal Number System (Base 16 Number System):


➢ Number system has sixteen (16) alphanumeric .
➢ The first Numbers represented like in decimal system, i.e. from 0 to 9.
➢ But from 10, we have A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15.
➢ The base of hexadecimal number system is 16.

8
NUMBER SYSTEM CONVERSIONS

Decimal to Binary ,Octal and Hexadecimal Conversions.


❖ Division-Remainder Method:
❑ Step 1:
Divide the decimal number to be converted by the value of the new base.
❑ Step 2:
Record the remainder from Step 1 as the rightmost the new base digit (least
significant digit) of number.
❑ Step 3:
Divide the quotient of the previous divide by the new base.
9
NUMBER SYSTEM CONVERSIONS

Decimal to Binary ,Octal and Hexadecimal Conversions.


❖ Division-Remainder Method:
❑ Step 4:
Record the remainder from Step 3 as the next digit (to the left) of the new base number.
❑ Repeat Steps 3 and 4, recording remainders from right to left,
until the quotient becomes zero in Step 3.

Note that the last remainder thus new obtained will


be the most significant digit (MSD) of the base
number 10
NUMBER SYSTEM CONVERSIONS

Decimal to Binary ,Octal and Hexadecimal Conversions.


❑ Example:
(348)10 = ? (Binary)2 =?(Octal)8 =?(Hexa)16 .
348 ÷ 2 174 R 0
174 ÷ 2 87 R 0 Read the number from the Bottom (Most
87 ÷ 2 43.5 ~= 43 R 1 Significant Bit) To the top (least Significant Bit)
And
43 ÷ 2 21.5 ~= 21 R 1
Write from left to right
21 ÷ 2 10.5 ~= 10 R 1
10 ÷ 2 5 R 0
5 ÷2 2.5 ~= 2 R 1
2 ÷2 1 R 0 11

1 ÷2 0 R 1 (348)10 = (101011100)2
NUMBER SYSTEM CONVERSIONS

Decimal to Binary ,Octal and Hexadecimal Conversions.


❑ Example:
How To Get Remainder?
(348)10 = =?(Octal)8 To find the remainder multiply
348 ÷ 8 43.5 ~= 43 R 4 The base by the decimal fraction.
43 ÷ 8 5.375 ~= 5 R 3 In this case for ex:
8 × .5 = 4 so R is 4
5 ÷8 0 R 5 (348)10 = (534)8 8 × .375 = 3 so R is 3

12
NUMBER SYSTEM CONVERSIONS

Decimal to Binary ,Octal and Hexadecimal Conversions.


❑ Example:

(348)10 = =?(Hexa)16 The remainder:


16 × 0.75 = 12.
348 ÷ 16 21.75 ~= 21 R 12 (c) 16 × 0.3125 = 5.
21 ÷ 16 1.3125 ~= 1 R 5

1 ÷ 16 0 R 1 (348)10 = (15C)16

13
NUMBER SYSTEM CONVERSIONS

 Binary ,Octal and Hexadecimal to Decimal Conversions.


❖ Method:

❑ Step 1:
Determine the column (positional) value of each digit.
❑ Step 2:
Multiply the obtained column values by the digits in the corresponding columns.
❑ Step 3:
Calculate the sum of these products.

14
NUMBER SYSTEM CONVERSIONS

 Binary ,Octal and Hexadecimal to Decimal Conversions.


❑ Example:
( 101011100)2 = ?(Decimal)10

1 0 1 0 1 1 1 0 0
×
28 27 2 6 25 24 23 22 2 1 20

28 × 1 +27 × 0 + 26 × 1 + 25 × 0 + 24× 1 + 23× 1 + 22× 1 + 21 × 0 + 20 × 0 = (348)10

15
NUMBER SYSTEM CONVERSIONS

 Binary ,Octal and Hexadecimal to Decimal Conversions.


❑ Example:

( 534)8= ?(Decimal)10

5 3 4
× = 5× 82 + 3 × 81 + 4 × 80 = (348)10
82 81 80

16
NUMBER SYSTEM CONVERSIONS

 Binary ,Octal and Hexadecimal to Decimal Conversions.


❑ Example:

( 15C)16= ?(Decimal)10

1 5 c
× = 1× 162 + 5 × 161 + 12 × 160 = (348)10
162 161 160

17
NUMBER SYSTEM CONVERSIONS

 Binary to Octal and Hexadecimal conversions.


❖ Method:
 To convert binary to octal ,separate each 3 binary digit in a group
 Convert each group in a decimal number.
 To convert binary to Hexadecimal ,separate each 4 binary digit in a group.
 Convert each group in a decimal number.

18
NUMBER SYSTEM CONVERSIONS

 Binary to Octal and Hexadecimal conversions.


❑ Example:

( 101011100)2 = ?(Octal)8

1 0 1 0 1 1 1 0 0
22 21 20 23 21 20 22 21 20
5 3 4

Ans ( 101011100)2 = (534)8

19
NUMBER SYSTEM CONVERSIONS

 Binary to Octal and Hexadecimal conversions.


❑ Example:

( 101011100)2 = ?(Hexa)16

1 0 1 0 1 1 1 0 0
20 23 22 21 20 23 22 21 20
1 5 C
Ans (01011100) = (15C)16
2

20
CONCLUSION

21
THE DECIMAL NUMBER SYSTEM:

22
BINARY-TO-DECIMAL CONVERSION:

23
OCTAL-TO-DECIMAL CONVERSION

24
HEXADECIMAL TO DECIMAL

 0.8 in base 16:


 0.816 = 0×160+8×16-1 = 0+0.5 = 0.510

25
DECIMAL TO BINARY

Note:
➢ Any further multiplication by 2 in example 5 will equal to 0;
therefore, the multiplication can be terminated.
➢ However, this, is not so. Often it will be necessary to terminate
the multiplication when an acceptable degree of accuracy is 26
obtained.
➢ The binary number obtained will then be an approximation[5]
DECIMAL TO OCTAL

 Example 9: Convert the decimal fraction 0.432 to octal equivalent.

27
DECIMAL TO HEAXDECIMAL

28
BINARY TO OCTAL

29
BINARY TO HEXADECIMAL

30
QUESTIONS

31

You might also like