Numeration Systems Lecture 2024-2025 PDF
Document Details
Uploaded by WellVoice
UMFST
2024
M. Lupea
Tags
Summary
These lecture notes cover numeration systems, including Roman and Hindu-Arabic systems. They detail conversion methods and provide examples.
Full Transcript
Numeration systems https://www.youtube.com/watch?v=cZH0YnFpjwU Numeration systems are used to represent and manipulate numeric values. We have to distinguish between a numeric value and a numeric representation: a value (abstract concept) is a measure of an attribute of a...
Numeration systems https://www.youtube.com/watch?v=cZH0YnFpjwU Numeration systems are used to represent and manipulate numeric values. We have to distinguish between a numeric value and a numeric representation: a value (abstract concept) is a measure of an attribute of a collection of objects; a representation is the means by which we display a value and manipulate it. A value has different representations. Example: the numeric value “5” has more representations: 5 (decimal system) , V (Roman system), 101( binary system) cinci (Romanian language), five (English language) Numeration systems (contd.) At the mental level people work with values, but for displaying and manipulating them, different numeration systems are used (now the decimal system). Computers work with number representations using the binary system. Numeration system - a set of rules for the representation and manipulation (operations) of numerical values using symbols called digits. The total number of digits is called numeration base(radix). Classification of numeration systems: positional systems and non-positional systems Non-positional systems: Roman system (500BC) digits: I, V, X, L, C, D, M values: 1 5 10 50 100 500 1000 each symbol (digit) represents a value it is an additive system: - the value of a number representation is obtained as the sum (difference) of the values of its digits according to some rules Disadvantages: the value 0 cannot be represented there are different representations of the same value example: CDXC and XD have the same value 490 the much greater difficulty of performing mathematical operations, such as addition, subtraction, multiplication, and division Roman system - rules a) the value of two or more identical consecutive digits is the sum of the values of these digits. ex: numeric representations: III , CCC, MM numeric values: 3 , 300, 2000 b) the value of a pair of different digits, with the biggest one in front of the other is the sum of these two digits values: ex: numeric representations: VI , CL MD numeric values: 5+1=6 , 100+50=150, 1000+500=1500 c) the value of a pair of different digits, with the smallest one in front of the other is the difference of these two digits values: ex: numeric representations: XC , IX , CM numeric values: 100-10=90, 10-1=9 , 1000-100=900 d) for big numbers a horizontal line over the digit is used, meaning the multiplication of the digit’s value with 1000: ex: the numeric value of is 5000 Positional systems: Hindu-Arabic numeration systems the position of a digit in a representation implies an association with a “positional value” the numeric value is the sum of the positional values of all the digits from the representation binary system: base = 2, digits : 0,1 , ex: 11001(2) octal system: base = 8, digits: 0-7, ex: 7564(8) decimal system(1800BC) base =10, digits: 0-9, ex: 2343 hexadecimal system: base =16, digits: 0-9,A,B,C,D,E,F where: A(16)=10, B(16) =11, C(16)=12, D(16)=13, E(16)=14, F(16)=15, example: 2AF(16) Examples Examples Correspondence table – bases: 10,2,4,8,16 Rapid conversions: conversions between bases: 2,4,8,16 Rapid conversions (contd.) Conversion methods Conversions between arbitrary numeration bases for real numbers: N(b) = N’(h), b- source base, h- destination base 1. the substitution method 2. the method of successive divisions/multiplications 3. the method that uses an intermediate base Substitution method - examples 2. The method of successive divisions and multiplications it is recommended for b > h calculations are performed in the source base (b) for the integer part the method of successive divisions by the destination base (h) is applied for the fractional part we apply a complementary method: successive multiplications by the destination base (h) The method of successive divisions the integer part is divided by h (destination base) obtaining a quotient and a remainder. the quotient is divided by h obtaining a new quotient an a new remainder,… the process of successive divisions ends when 0 is obtained as quotient. the remainders, in the reverse order of obtaining them, are the digits of the new representation in base h. The method of successive multiplications the fractional part is multiplied by h obtaining a number with an integer part Example: and a fractional one; 0,17 =?(5) we continue with the multiplication of 0,17*5 = 0,85 this new fractional part,... 0,85*5 = 4,25 the process of the successive 0,25*5 = 1,25 multiplications continues until one of the following conditions is satisfied: 0,25*5 = 1,25 a) the fractional part becomes 0; !!! periodicity. b) an established number of digits of the fractional part were calculated 0,17=0,04(1)(5) , c) periodicity is obtained. the integer parts, in the order of obtaining them are the digits of the fractional part in the destination representation. The method of successive divisions and multiplications 3.The method that uses an intermediate base b - source base, g – intermediate base, h - destination base a) usually g = 10 – calculation in base 10 conversion from base b into base 10 – using the substitution method, conversion from base 10 into base h – using the method of successive divisions/multiplications b) if b and h are powers of 2, then g = 2 and rapid conversions are applied c) if b = 10 and h = 2 then for efficiency we use g = 8 or g = 16 conversion from base 10 into base g - the method of successive divisions/multiplications is applied conversion from base g into base 2 – rapid conversions are applied