Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.

Similar presentations


Presentation on theme: "Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System."— Presentation transcript:

1

2 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System

3 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 1 LESSON OVERVIEW  Different types of number systems  Common bases  Place values  Conversion of bases  Computer calculation  Arithmetic of the computer  Subtracting using twos complement  Coding systems  Binary coded decimal  Floating-point numbers  Numbers in standard form  Integers and floating-point arithmetic

4 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 2 NUMBER SYSTEMS A number system is the set of symbols used to express quantities as the basis for counting, determining order, comparing amounts, performing calculations, and representing value. It is the set of characters and mathematical rules that are used to represent a number.

5 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 3 DIFFERENT TYPES OF NUMBER SYSTEMS  Decimal  Binary  Octal  Hexadecimal

6 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 4 DECIMAL NUMBER SYSTEM The decimal or denary number system, base 10, has a radix of 10. Decimal uses different combinations of 10 symbols to represent any valy (i.e., 0,1,2,3,4,5,6,7,8 and 9)

7 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 5 BINARY NUMBER SYSTEM Binary is known as machine language. Data is stored and manipulated inside the computer in binary. The binary number system is based on two digits, 0 and 1.

8 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 6 OCTAL NUMBER SYSTEM The Octal number system has eight as its base; it uses the symbols 0, 1, 2, 3,4,5,6 and 7 only. For the values eight and above, need to use two digits.

9 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 7 HEXADECIMAL NUMBER SYSTEM The Hexadecimal number has sixteen as its base; using 0,1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. A, B, C, D, E and F stand for the “digits” ten, eleven, twelve, thirteen, fourteen and fifteen.

10 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 8 PLACE VALUE Place value, positional value depends on the base used. Example: The third place from the right  in base 10 has the place value 100  in base 2 has the place value 4  in base 8 has the place value 64  In base 16 has the place value 256

11 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 9 DECIMAL TO OTHER BASES Divide the base into the quotient and keep repeating the process until there is a zero quotient. Reading off the remainder in the reverse order of how you wrote them down gives the answer.

12 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 10 EXAMPLE (1) 2 ) 13 2 ) 6, remainder 1 2 ) 3, remainder 0 2 ) 1, remainder 1 0, remainder 1 13 10 = 1101 2

13 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 11 EXAMPLE (2) 8 ) 236 8 ) 29 remainder 4 8 ) 3 remainder 5 0 remainder 3 236 10 = 354 8

14 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 12 EXAMPLE (3) 16 ) 473 16 ) 29 remainder 9 16 ) 1 remainder D 0 remainder 1 473 10 = 1D9 16

15 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 13 Some decimal fractions cannot be represented exactly as binary fractions. To reduce errors of this type, computers need to store such converted values to a large number of binary places. The process involves repeatedly multiplying by 2 that part of the decimal fraction to the right of the decimal point, and writing down the whole number part of the product at each stage ( but not involving it in subsequent multiplication ). Reading the whole number parts down from the top gives the binary fraction to as many places as is necessary. CHANGING DECIMAL FRACTION TO BINARY

16 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 14 EXAMPLE (4)

17 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 15 (e.g. 13.746) Work separately on the whole and fraction parts. Then link the two answers together with a point. TO CONVERT A MIXED DECIMAL NUMBER

18 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 16 Multiple each digit with its place value and then added together. FROM OTHER BASES TO DECIMAL (Whole Number)

19 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 17 EXAMPLE (5) 1101 2 = (1x8)+(1x4)+(0x2)+(1x1) = 13 10

20 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 18 EXAMPLE (6) 1102 8 = (1x512) +(1x64) +(0x8) +(2x1) = 578 10

21 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 19 EXAMPLE (7) 17F 16 =(1x256) +(7x16) +(15x1) = 383 10

22 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 20 1s compliment and 2s compliment used to represent positive and negative number. Example 1s COMPLEMENT AND 2s COMPLEMENT

23 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 21 Adding Binary Numbers

24 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 22 Subtracting Binary Numbers Using Twos Compliment

25 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 23 CODING SYSTEMS Three of the most popular coding systems are:  ASCII (American Standard Code for Information Interchange)  EBCDIC (Extended Binary Coded Decimal Interchange Code)  BCD (Binary Coded Decimal)

26 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 24 FLOATING POINT NUMBERS Floating-point numbers allow a far greater range of values - integer, fractional or mixed numbers, - in a single word. Calculations in floating- point arithmetic are slower than those in fixed-length working.

27 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 25 STANDARD FORM The number 57429 in standard form is: 5.7429 X 10 4 where5.7429 is the mantissa and 4 is the exponent.

28 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 26 FLOATING POINT ADDITION (1) (0.1011 x 2 5 ) + (0.1001 x 2 5 ) = (0.1011 + 0.1001) x 2 5 = 1.0100 x 2 5 = 0.1010 x 2 6

29 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 27 FLOATING POINT ADDITION (2) (0.1001 x 2 3 ) + (0.1110 x 2 5 ) = (0.001001 x 2 5 ) + 0.1001) x 2 5 = 1.000001 x 2 5 = 0.1000 x 2 6 (after truncation)

30 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 28 FLOATING POINT MULTIPLICATION (0.1101 x 2 6 ) x (0.1010 x 2 4 ) = 0.1000001 x 2 10 = 0.1000 x 2 10 (after truncation)

31 Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 29 FLOATING POINT DIVISION (0.1011 x 2 7 ) ÷ (0.1101 x 2 4 ) = 0.1101 x 2 3


Download ppt "Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System."

Similar presentations


Ads by Google