cse 112 number system-[id_142-15-3472]

31
Number System

Upload: jumaed-tanbeen

Post on 12-Nov-2014

243 views

Category:

Technology


0 download

DESCRIPTION

Briefing and Conversations of Number systems.

TRANSCRIPT

Page 1: Cse 112 number system-[id_142-15-3472]

Number System

Page 2: Cse 112 number system-[id_142-15-3472]

Presented byName : Md. Abu Noman JumaedID : 142-15-3472Dept. : CSEFaculty : FSIT

Page 3: Cse 112 number system-[id_142-15-3472]

CONTENTS

Introduction Decimal Number System Binary Number System Why Binary? Octal Number System Hexadecimal Number System Relationship between Hexadecimal,

Octal, Decimal, and Binary Number Conversions

Page 4: Cse 112 number system-[id_142-15-3472]

INTRODUCTION

In early days when there were no means of counting, people use to count with the help of fingers, stones, sticks, etc.These methods were not adequate and had many limitations.Many number system were introduced with the passage of time like: Decimal Number System Binary Number System Octal Number System Hexadecimal Number System

Page 5: Cse 112 number system-[id_142-15-3472]

Decimal Number System

• It consist of ten digit i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 with the base 10.

• Each number can be used individually or they can be grouped to form a numeric value as 85,48,35,456 etc.

Page 6: Cse 112 number system-[id_142-15-3472]

BINARY NUMBER SYSTEM

• The Binary Number System consist of only two digits– 0 and 1.

• Since this system use two digits, it has the base 2.

• All digital computer use this number system and convert the data input from the decimal format into its binary equivalent.

Page 7: Cse 112 number system-[id_142-15-3472]

Why Binary?

Since the computer is made up of electronic components; it can have only two states, either• On(1)• Off(0)The data which is given to the computer is converted into binary form because a computer understand only binary language.It further converts the binary results into their decimal equivalents for output.

Page 8: Cse 112 number system-[id_142-15-3472]

Octal Number System

In the Octal Number System it consist of 8 digits i.e. 0, 1, 2, 3, 4, 5, 6, 7 with a base 8.

The sequence of octal number goes as 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, …..as go on.

See each successive number after 7 is a combination of two or more unique symbols of octal system.

Page 9: Cse 112 number system-[id_142-15-3472]

Hexadecimal Number System

The Hexadecimal system use base 16. It has 16 possible digit symbol. It use the digit 0 through 9 plus the

letters A, B, C, D, E, and F as the 16 digit symbols.

Page 10: Cse 112 number system-[id_142-15-3472]

Relationship between Hexadecimal, Octal, Decimal, and Binary

Notice that each hexadecimal digit represent a group of four binary digit. It Is important to remember that Hex(Abbreviation for Hexadecimal) digit A through F are equivalent to the decimal value 10 through 15.

Hexadecimal

Octal Decimal Binary

0 0 0 0000

1 1 1 0001

2 2 2 0010

3 3 3 0011

4 4 4 0100

5 5 5 0101

6 6 6 0110

7 7 7 0111

8 10 8 1000

9 11 9 1001

A 12 10 1010

B 13 11 1011

C 14 12 1100

D 15 13 1101

E 16 14 1110

F 17 15 1111

Page 11: Cse 112 number system-[id_142-15-3472]

NUMBER CONVERSIONS

Page 12: Cse 112 number system-[id_142-15-3472]

Decimal-to-Binary Conversion

The method of converting Decimal to binary is repeated-division method. For conversion follow the rules:1. Divide the given decimal number with

the base 2.2. Write down the remainder and divide

the quotient by 2.3. Repeat step 2 till the quotient is zero.

Page 13: Cse 112 number system-[id_142-15-3472]

Convert to Binary Number

Reading the remainders from the bottom to top, the result is

2 200 Remainders

2 100 0 LSB

2 50 0

2 25 0 Write

2 12 1 in

2 6 0 this

2 3 0 order

2 1 1

0 1 MSB

Page 14: Cse 112 number system-[id_142-15-3472]

Binary-to-Decimal Conversion

To convert a binary number follow the steps:1. Multiply each binary number with 2

having the power 0 for last position, starting from the right digit.

2. Increase the power one by one, with base as 2.

3. Sum up all the products to get decimal number.

Page 15: Cse 112 number system-[id_142-15-3472]

Convert to Decimal Number

= 1 X

= 256 + 128 + 0 + 0 + 0 + 8 +

0 + 0 + 1 = 393

Thus, =

Page 16: Cse 112 number system-[id_142-15-3472]

Decimal-to-Octal

The method of converting Decimal to Octal is repeated-division method. For conversion follow the rules:1. Divide the given decimal number with

the base 8,2. Write down the remainder and divide

the quotient by 8,3. Repeat step 2 till the quotient is zero.

Page 17: Cse 112 number system-[id_142-15-3472]

Convert to Octal Number

Reading the remainders from the bottom to top, the result is

=

8 266 Remainders

8 33 2 LSB

8 4 1

0 4 MSB

Page 18: Cse 112 number system-[id_142-15-3472]

Octal-to-Decimal Conversion

To convert a octal number follow the steps:1. Multiply each Octal number with 8

having the power 0 for last position, starting from the right digit.

2. Increase the power one by one, with base as 8.

3. Sum up all the products to get decimal number.

Page 19: Cse 112 number system-[id_142-15-3472]

Convert ( to Decimal Number

= 3 X = 3 X 64 + 7 X 8 + 2 X 1 = 192 + 56 + 2 =

Thus,

So, an octal number can be easily converted to its decimal equivalent by multiplying each octal digit by its position weight.

Page 20: Cse 112 number system-[id_142-15-3472]

Octal-to-Binary Conversion

The conversion from octal to binary is performed by converting each octal digit to its 3-bit binary equivalent.The eight possible digits are converted as indicated below:

Using these conversions, any octal number is converted to binary by individually converting each digit.

Octal Digit 0 1 2 3 4 5 6 7

Binary Equivalent

000 001 010 011 100 101 110 111

Page 21: Cse 112 number system-[id_142-15-3472]

Convert to Binary Number

We convert to binary using 3 bits for each octal digit as follows:

5 4 3 1 101 100 011 001Thus, =

Page 22: Cse 112 number system-[id_142-15-3472]

Binary-to-Octal Conversion

Converting from binary integers to octal integers is simply the reverse of the foregoing process. Firstly you have to do is:1. Group the binary integer into 3-bits starting at

the Least Significant Bit(LSB).2. If unable to form group then, add one or two 0s.3. Each group Is converted to its octal equivalent.It illustrated below for binary number 11010110

0 1 1 0 1 0 1 1 0

3 2 6Thus,

Page 23: Cse 112 number system-[id_142-15-3472]

Decimal-to-Hexadecimal Conversion

The method of converting Decimal to Hexadecimal is repeated-division method. For conversion follow the rules:1. Divide the given decimal number with

the base 16.2. Write down the remainder and divide

the quotient by 16.3. Repeat step 2 till the quotient is zero.

Page 24: Cse 112 number system-[id_142-15-3472]

Convert to Hexadecimal

Reading the remainders from the bottom to top, the result is

=

Note: Any remainder greater than 9 are represented by letters A through F.

16 423

Remainders

16 26 7 LSB

16 1 A

0 1 MSB

Page 25: Cse 112 number system-[id_142-15-3472]

Hexadecimal-to-Decimal Conversion

To convert a Hexadecimal number follow the steps:1. Multiply each hexadecimal number with

16 having the power 0 for last position, starting from the right digit.

2. Increase the power one by one, with base as 16.

3. Sum up all the products to get decimal number.

Page 26: Cse 112 number system-[id_142-15-3472]

Convert to Decimal Number

= 2 X = 512 + 160 + 15 =

Thus,

Page 27: Cse 112 number system-[id_142-15-3472]

Binary-to-Hexadecimal Conversion

Converting from binary integers to hexadecimal integers is simple. Firstly you have to do is:1. Group the binary integer into 4-bits starting at

the Least Significant Bit(LSB).2. If unable to form group then, add one or two

0s.3. Each group Is converted to its Hexadecimal

equivalent.It illustrated below for binary number 1010111010

0 0 1 0 1 0 1 1 1 0 1 0

2 B A Thus,

Page 28: Cse 112 number system-[id_142-15-3472]

Hexadecimal-to-Binary Conversion

The conversion from Hexadecimal to binary is performed by converting each Hexadecimal digit to its 4-bit binary equivalent. This is illustrated below: = 9 F 2

1001 1111 0010

Thus,

Page 29: Cse 112 number system-[id_142-15-3472]

References

Computer Fundamentals By Dr. M Lutfar Rahman & Dr. M Alamgir Hossain Computer Fundamentals By Pradeep K. Sinha & Priti Sinha http://www.byte-notes.com/number-system-computer

Page 30: Cse 112 number system-[id_142-15-3472]

Thank You

Page 31: Cse 112 number system-[id_142-15-3472]

Any Query???