Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 1 Number Systems. 2 Objectives  Understand why computers use binary (Base-2) numbering.  Understand how to convert Base-2 numbers to Base-

Similar presentations


Presentation on theme: "Chapter 1 1 Number Systems. 2 Objectives  Understand why computers use binary (Base-2) numbering.  Understand how to convert Base-2 numbers to Base-"— Presentation transcript:

1 Chapter 1 1 Number Systems

2 2 Objectives  Understand why computers use binary (Base-2) numbering.  Understand how to convert Base-2 numbers to Base- 10 or Base-8.  Understand how to convert Base-8 numbers to Base- 10 or Base 2.  Understand how to convert Base-16 numbers to Base- 10, Base 2 or Base-8.

3 3 Why Binary System? Computers are made of a series of switches Each switch has two states: ON or OFF Each state can be represented by a number – 1 for “ON” and 0 for “OFF”

4 4 Converting Base-2 to Base-10(101 1) 2 0ON OFF ON ON/OFF OFF ON Exponent: 20202020 21212121 22222222 23232323 24242424 Calculation: 00 21 16 +++ + = (19) 10

5 5 Number systems include decimal, binary, octal and hexadecimal Each system have four number base Number SystemBaseSymbol BinaryBase 2 B OctalBase 8 O DecimalBase 10 D HexadecimalBase 16 H

6 6 1.1 Decimal Number System The Decimal Number System uses base 10. It includes the digits {0, 1,2,…, 9}. The weighted values for each position are: 10^410^310^210^110^010^-110^-210^-3 1000010001001010.10.010.001 Base Right of decimal point left of the decimal point

7 7 Each digit appearing to the left of the decimal point represents a value between zero and nine times power of ten represented by its position in the number. Digits appearing to the right of the decimal point represent a value between zero and nine times an increasing negative power of ten. Example: the value 725.194 is represented in expansion form as follows: 7 * 10^2 + 2 * 10^1 + 5 * 10^0 + 1 * 10^-1 + 9 * 10^-2 + 4 * 10^-3 =7 * 100 + 2 * 10 + 5 * 1 + 1 * 0.1 + 9 * 0.01 + 4 * 0.001 =700 + 20 + 5 + 0.1 + 0.09 + 0.004 =725.194

8 8 1.2 The Binary Number Base Systems Most modern computer system using binary logic. The computer represents values(0,1) using two voltage levels (usually 0V for logic 0 and either +3.3 V or +5V for logic 1). The Binary Number System uses base 2 includes only the digits 0 and 1 The weighted values for each position are : 2^52^42^32^22^12^02^-12^-2 321684210.50.25 Base

9 9 1.3 Number Base Conversion Binary to Decimal: multiply each digit by its weighted position, and add each of the weighted values together or use expansion formdirectly. Example the binary value 1100 1010 represents : 1*2^7 + 1*2^6 + 0*2^5 + 0*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0 = 1 * 128 + 1 * 64 + 0 * 32 + 0 * 16 + 1 * 8 + 0 * 4 + 1 * 2 + 0 * 1 = 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 =202

10 10 Decimal to Binary There are two methods, that may be used to convert from integer number in decimal form to binaryform: 1- Repeated Division By 2 For this method, divide the decimal number by 2, If the remainder is 0, on the right side write down a 0. If the remainder is 1, write down a 1. When performing the division, the remainders which will represent the binary equivalent of the decimal number are written beginning at the least significant digit (right) and each new digit is written to more significant digit (the left) of the previous digit.

11 11 Example: convert the number 333 to binary. DivisionQuotientRemainderBinary 333/216611 166/283001 83/2411101 41/22011101 20/210001101 10/250001101 5/2211001101 2/21001001101 1/201101001101

12 12 Octal System Computer scientists are often looking for shortcuts to do things One of the ways in which we can represent binary numbers is to use their octal equivalents instead This is especially helpful when we have to do fairly complicated tasks using numbers

13 13 The octal numbering system includes eight base digits (0-7) After 7, the next placeholder to the right begins with a “1” 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13...

14 14 Octal Placeholders “ ” “Ones ” “” “Eights” “ “Sixty- Fours” 64*28*41*1 8 2 *28 1 *4 8 0 *1 241 : Number: Placeholder Name: Value: Exponential Expression:

15 15 Transform (44978) 10 to Octal. DivisionQuotientRemainderBinary 44978 / 85622 22 5622 / 8 702662 702/8 876662 87/8 1077662 10/8 1227662 1/8 01127662


Download ppt "Chapter 1 1 Number Systems. 2 Objectives  Understand why computers use binary (Base-2) numbering.  Understand how to convert Base-2 numbers to Base-"

Similar presentations


Ads by Google