DOC PREVIEW
RIT EECC 341 - Positional Number Systems

This preview shows page 1-2-22-23 out of 23 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 23 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Positional Number SystemsSlide 2Number Systems Used in ComputersRadix-r to Decimal ConversionDecimal-to-Binary ConversionSlide 6Decimal-to-Binary Conversion Sum-of-Weights MethodDecimal to Radix-r ConversionBinary to Octal ConversionBinary to Hexadecimal ConversionConversion between Number Systems SummaryBinary Arithmetic Operations AdditionBinary Arithmetic Operations SubtractionNegative Binary Number RepresentationsSlide 15Properties of Two's Complement NumbersValue of Two's Complement NumbersExtending Two's Complement Numbers: Sign ExtensionTwo’ complement addition/subtractionSlide 20Value of One's Complement NumbersComparison of Signed-Magnitude & ComplementsComparison of Signed-Magnitude & Complements#1 Lec # 2 Winter 2001 12-5-2001EECC341 - ShaabanEECC341 - ShaabanPositional Number Systems•A number system consists of an order set of symbols (digits) with relations defined for +,-,*, / •The radix (or base) of the number system is the total number of digits allowed in the the number system.– Example, for the decimal number system: •Radix, r = 10, Digits allowed = 0,1, 2, 3, 4, 5, 6, 7, 8, 9•In positional number systems, a number is represented by a string of digits, where each digit position has an associated weight.•The value of a number is the weighted sum of the digits.•The general representation of an unsigned number D with whole and fraction portions number in a number system with radix r: Dr = d p-1 d p-2 ….. d1 d0.d-1 d-2 …. D-n•The number above has p digits to the left of the radix point and n fraction digits to the right.•A digit in position i has as associated weight ri•The value of the number is the sum of the digits multiplied by the associated weight ri :rdi1pniiD#2 Lec # 2 Winter 2001 12-5-2001EECC341 - ShaabanEECC341 - ShaabanPositional Number Systems•For example in the decimal number system: 5185.6810 = 5x103 + 1x102 + 8x101 + 5x100 + 6 x 10-1 + 8 x 10-2 = 5x1000 + 1x100 + 8x10 + 5 x 1 + 6x.1 + 8x.01 •For the binary number system with radix = 2, digits 0, 1 D2 = dp-1  2p-1 ….. d1  21 + d0 . 20 + d-1  2-1 + d-2  2-2 ….. •For Example: 100112 = 1  16 + 0  8 + 0  4 + 1  2 + 1  1 = 1910 | | MSB LSB (least significant bit)(most significant bit) 101.0012 = 1x4 + 0x2 + 1x1 + 0x.5 + 0x.25 + 1x.125 = 5.12510rdi1pniiDNumber: Dr = d p-1 d p-2 ….. d1 d0.d-1 d-2 …. D-nValue: Binary Point#3 Lec # 2 Winter 2001 12-5-2001EECC341 - ShaabanEECC341 - ShaabanNumber Systems Used in ComputersNumber Systems Used in ComputersNameof RadixRadixSet of Digits ExampleDecimal r=10r=2r=16r= 8 {0,1,2,3,4,5,6,7,8,9} 25510Binary {0,1,2,3,4,5,6,7} 3778 {0,1} 111111112 {0,1,2,3,4,5,6,7,8,9,A, B, C, D, E, F} FF16OctalHexadecimalBinary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Hex 0 1 2 3 4 5 6 7 8 9 A B C D E FDecimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15#4 Lec # 2 Winter 2001 12-5-2001EECC341 - ShaabanEECC341 - ShaabanRadix-r to Decimal ConversionRadix-r to Decimal Conversion•The decimal value of a number in any radix r is found by converting each digit to its radix 10 equivalent and expanding the value using radix arithmetic:•Examples: 1101.1012 = 123 + 122 + 120 + 12-1 + 12-3 = 8 + 4 + 1 + 0.5 + 0.125 = 13.62510 572.68 = 582 + 781 + 280 + 68-1 = 320 + 56 + 16 + 0.75 = 392.7510 2A.816 = 2161 + 10160 + 816-1 = 32 + 10 + 0.5 = 42.510 132.34 = 142 + 341 + 240 + 34-1 = 16 + 12 + 2 + 0.75 = 30.7510 341.245 = 352 + 451 + 150 + 25-1 + 45-2 = 75 + 20 + 1 + 0.4 + 0.16 = 96.5610rdi1pniiD#5 Lec # 2 Winter 2001 12-5-2001EECC341 - ShaabanEECC341 - ShaabanDecimal-to-Binary ConversionDecimal-to-Binary Conversion•Separate the decimal number into whole and fraction portions.•To convert the whole number portion to binary, use successive division by 2 until the quotient is 0. The remainders form the answer, with the first remainder as the least significant bit (LSB) and the last as the most significant bit (MSB).•Example: Convert 17910 to binary: 179 / 2 = 89 remainder 1 (LSB) / 2 = 44 remainder 1 / 2 = 22 remainder 0 / 2 = 11 remainder 0 / 2 = 5 remainder 1 / 2 = 2 remainder 1 / 2 = 1 remainder 0 / 2 = 0 remainder 1 (MSB) 17910 = 101100112#6 Lec # 2 Winter 2001 12-5-2001EECC341 - ShaabanEECC341 - ShaabanDecimal-to-Binary ConversionDecimal-to-Binary Conversion•To convert decimal fractions to binary, repeated multiplication by 2 is used, until the fractional product is 0 (or until the desired number of binary places). The whole digits of the multiplication results produce the answer, with the first as the MSB, and the last as the LSB.•Example: Convert 0.312510 to binary Result Digit .3125  2 = 0.625 0 (MSB) .625  2 = 1.25 1 .25  2 = 0.50 0 .5  2 = 1.0 1 (LSB) 0.312510 = .01012#7 Lec # 2 Winter 2001 12-5-2001EECC341 - ShaabanEECC341 - ShaabanDecimal-to-Binary ConversionDecimal-to-Binary Conversion Sum-of-Weights MethodSum-of-Weights Method•Determine the set of binary weights whose sum is equal to the decimal number.Examples: 910 = 8 + 1 = 23 + 20 = 10012 1810 = 16 + 2 = 24 + 21 = 100102 5810 = 32 + 16 + 8 + 2 = 25 + 24 + 23 + 21 = 1110102 0.62510 = 0.5 + 0.125 = 2-1 + 2-3 = 0.1012#8 Lec # 2 Winter 2001 12-5-2001EECC341 - ShaabanEECC341 - ShaabanDecimal to Radix-r ConversionDecimal to Radix-r Conversion•Separate the decimal number into whole and fraction portions.•To convert the whole number portion to binary, use successive division by r until


View Full Document
Download Positional Number Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Positional Number Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Positional Number Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?