chapter iii: number system

20
A set of values used to represent different quantities. Examples: Number of students in a Class or number of viewers watching a certain TV program. It includes audio, graphics, video, text, and numbers. Base or Radix are the total number of digits used in a number system.

Upload: kclove

Post on 06-Jul-2015

174 views

Category:

Education


1 download

DESCRIPTION

to enhance our knowledge in learning the number system in computer education

TRANSCRIPT

Page 1: Chapter iii: Number System

A set of values used to represent different quantities.

Examples:

Number of students in a Class or number of viewers watching a certain TV program.

It includes audio, graphics, video, text, and numbers.

Base or Radix are the total number of digits used in a number system.

Page 2: Chapter iii: Number System

Some important number systems are as follows:

DECIMAL number system

BINARY number system

OCTAL number system

HEXADECIMAL number system

The decimal number system is used in general. However, the computers use binary number , octal, and hexadecimal number systems.

Page 3: Chapter iii: Number System

BINARY NUMBER SYSTEM

Page 4: Chapter iii: Number System

DECIMAL NUMBER SYSTEM

It is the most widely used number system.

It consists of ten numbers from 0 to 9.

It’s base is 10.

Examples:

1. 145010

2. 24210

3. 1000002410

Page 5: Chapter iii: Number System

OCTAL NUMBER SYSTEM

It is the shorthand representation of binary numbers.

Any digit in this system is always less than 8.

It consists of eight digits from 0 to 7.

It’s base is 8.

Examples:

1. 56568

2. 1248

3. 3788

Page 6: Chapter iii: Number System

HEXADECIMAL NUMBER SYSTEM

It consists of 16 digits from 0 to 9 and A to F.

The alphabets A to F represent decimal numbers 10 to 15.

It’s base is 16.

Examples:

1. 29716

2. BA5916

3. BACA16

Page 7: Chapter iii: Number System

CONVERSION FOR HEXADECIMALDECIMAL HEXADECIMAL

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

10-A 1001

11-B 1011

12-C 1100

13-D 1101

14-E 1110

15-F 1111

Page 8: Chapter iii: Number System
Page 9: Chapter iii: Number System

STEP BINARY NUMBER DECIMAL NUMBER

Step 1 111012 ((1x24)+(1x23)+(1x22)+(0x21)+(1x20)) 10

Step 2 111012 (16+8+4+0+1) 10

Step 3 111012 2910

1.Determine the column (positional) value of each digit (this depends on the position of the digit and the base of the number system.)2.Multiply the obtained column values (in step 1) by the digits in the corresponding columns.3.Sum the products calculated in step 2. The total is the equivalent value in decimal.

Page 10: Chapter iii: Number System

BINARY TO OCTALSTEPS:

1.Divide the binary digits into groups of three (starting left to right).

2.Convert each group of three binary digits to one octal digit.

STEP BINARY NUMBER OCTAL NUMBER

Step 1 101012 010 101

Step 2 101012 28 58

Step 3 101012 258

Add a (0) Zero digit to complete

the 3 digits group.

Page 11: Chapter iii: Number System

BINARY TO HEXADECIMALSTEPS:

1.Divide the binary digits into groups of four (starting from the right).

2.Convert each group of four binary digits to one hexadecimal symbol.

STEP BINARY NUMBERH10101EXADECIMAL

NUMBER

Step 1 101012 0001 0101

Step 2 101012 110 510

Step 3 101012 1516

Add two(2) Zero(0) digits to complete the four

(4) digits group.

Page 12: Chapter iii: Number System

DECIMAL TO BINARY

STEP OPERATION RESULT REMAINDER

Step 1 29/2 14 1

Step 2 14/2 7 0

Step 3 7/2 3 1

Step 4 3/2 1 1

Step 5 1/2 0 1

1.Divide the decimal number to be converted by the value of the new base.

2.Get the remainder from step 1 as the rightmost digit (least significant digit) of new base number.

3.Divide the quotient of the previous divide by the new base.

4.Record the remainder from step 3 as the next digit (to the left) of the new base number.

Page 13: Chapter iii: Number System

DECIMAL TO OCTAL

DIVISION RESULT REMAINDER

250/8 31 2

31/8 3 7

3/8 0 3

Steps:1.Divide decimal number by 8. Treat the division as an integer division.2.Write down the remainder (in octal). To get the remainder, multiply the result by 8 and subtract it to the decimal number/result.3.Repeat step 1-3 until the result is zero.4.The octal value is the digit sequence of the remainders from the lastto first.

25010 = 3728

Page 14: Chapter iii: Number System

DECIMAL TO HEXADECIMALSteps:

1.Divide decimal number by 16. Treat the division as an integer division.

2.Write down the remainder (in hexadecimal).

3.Repeat step 1-3 until the result is zero.

4.The hex value is the digit sequence of the remainders from the last to first.

DIVISION RESULT REMAINDER (in HEX)

256/16 16 0

16/16 1 0

1/16 0 1

25610 =10016

Page 15: Chapter iii: Number System

OCTAL TO BINARYSteps:

1.Convert each octal digit to a 3 digit binary number (the octal digits may be treated as decimal for this conversion).

2.Combine all the resulting binary groups (of 3 digits each) into a single binary number.

STEP OCTAL NUMBER BINARY NUMBER

Step 1 258 210 510

Step 2 258 0102 1012

Step 3 258 0101012

258 = 0101012

Page 16: Chapter iii: Number System

OCTAL TO DECIMALSteps:

1.Start the decimal result at 0.

2.Remove the most significant octal digit (leftmost) and add it to the result.

3.If all octal digits have been removed, you’re done. Stop.

4.Otherwise, multiply the result by 8.

5.Go to step 2.

Octal Digits OperationDecimal Result

OperationDecimal Result

345 +3 3 x8 24

45 +4 28 x8 224

5 +5 229 done

3458= (3*82)+(4*81)+(5*80) = (3*64)+(4*8)+(5*1) = 22910

Page 17: Chapter iii: Number System

HEXADECIMAL TO BINARYSteps:

1.Convert each hexadecimal digit to a 4 digit binary number (the hexadecimal digits may be treated as decimal for this conversion).

2.Combine all the resulting binary groups (of 4 digits each) into a single binary number.

STEPHEXADECIMAL

NUMBERBINARY NUMBER

Step 1 15 12 52

Step 2 15 00012 01012

Step 3 15 000101012

1516 = 000101012

Page 18: Chapter iii: Number System

HEXADECIMAL TO DECIMALSteps:

1.Get the last digit of the hex number, call this digit the Current Digit.

2.Make a variable, let’s call it power. Set the value to Zero.

3.Multiply the current digit with (16^power). Store the result.

4.Increment power by one.

5.Set the current digit to the previous digit of the Hex Number.

6.Repeat from step 3 until all digits have been multiplied.

7.Sum the result of step 3 to get the answer Number.

MULTIPLICATION RESULT

9x(16^0) 9

8x(16^1) 128

5x(16^2) 1280

Answer 1417

58916 = 141710

Page 19: Chapter iii: Number System
Page 20: Chapter iii: Number System

CRISTINA FABROS

MICAH HADASSAH GUILLERMO

DANILO PALTENG

JANUEL ANTONIO

CHERRY MARIE GALAUSROSEANN FORONDACRISTINA FABROS MICAH HADASSAH GUILLERMODANILO PALTENGJANUEL ANTONIO

WORKING COMMITTEE

BS ACCOUNTANCY 1-2