Number Systems Decimal and Binary Number Systems Till Now, You Have Been Using Decimal Number System in Your Mathematics

Total Page:16

File Type:pdf, Size:1020Kb

Number Systems Decimal and Binary Number Systems Till Now, You Have Been Using Decimal Number System in Your Mathematics Delhi Public School, R.K.Puram Computer Science Number Systems Decimal and Binary Number Systems Till now, you have been using Decimal number system in your mathematics. In Decimal number system, we have 10 digits that vary from 0 to 9. Computers use electronic components, which do not use decimal number systems for internal operations. It uses a number system, which is known as binary number system, in which digits vary from 0 to 1 only. It means a binary number contains no digit other than 0 and 1. Here, 0 represents OFF/False signal and 1 represents ON/True signal. Thus numbers of decimal number system used by us in computers are converted into their equivalent binary values to be understood by the electronic components of the computer system. The number 0 in decimal is 0 in binary, 1 in decimal is 1 in binary, 2 in decimal is 10 in binary, 3 in decimal is 11 in binary... Now, let us see how we convert an integer value of a number in Decimal number system into a Binary number system. (123)10 = ( )2 Note: Here, the subscript 10 represents base 10 of decimal number and subscript 2 represents base 2 of binary number. To convert this number, we start dividing the decimal number by 2 and repeat the process with the quotient of the division, till we get 1 as quotient and then collect the remainders of all the divisions in the reverse order. Example: Decimal to Binary Base Quotient Remainder 2 123 1 2 61 1 2 30 0 2 15 1 2 7 1 2 3 1 1 So, the number equivalent to decimal number 123 will be 1111011 in binary. Now, if we want to obtain a decimal number equivalent to a binary number, we will use the following method. Position Σ Base * Place Value Position=0 Example: Binary to Decimal (101011)2 = ( )10 5 4 3 2 1 0 (101011)2 = (2 * 1) + (2 * 0) + (2 * 1) + (2 * 0) + (2 * 1) + (2 * 1) = 32 + 0 + 8 + 0 + 2 + 1 = 43 and so,(101011)2 = (43)10 Octal Number System Now, look at a very large binary number 1011101110110110 Can you remember this number for a long time, your answer will be obviously no and so the mathematicians thought, why not make some number system to interpret binary numbers for easy memorisation and they grouped three binary digits together to represent a number and so each digit Number System CScXI/2013_2014/MK_MD/13 #1 Delhi Public School, R.K.Puram Computer Science of this new representation had a variation from 0 to 7 (i.e. 8 in total) - this new representation of number was called Octal number (with base 8). Look at the following table, which shows binary and its equivalent octal digits. Binary (In groups of 3) Octal 000 0 001 1 010 2 011 3 100 4 101 5 110 6 111 7 Example: Binary to Octal (1010110)2 = ( )8 (1010110)2 = ( 1 010 110)2 Make groups of 3 bits starting from the right side = (001 010 110)2 Add required number of 0s before the first group to make it a group of 3 bits = (126)8 Interpret each group as single octal digit & you get the octal number equivalent Reverse of this conversion can also be done in the same way (237)8 = ( )2 (237)8 = ( 2 3 7 )8 Write all digits separately = ( 010 011 111 )2 Interpret single octal digit as binary equivalent Hexadecimal Number System Further to octal numbers, a grouping of 4 Binary digits of a binary number gave birth to Hexadecimal Number system. Here, each digit of this new representation had a variation from 0 to 15 (i.e. 16 in total). Look at the following table, which shows Binary and its equivalent Hexadecimal digits. Binary (In groups of 4) Hexadecimal Remarks 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9 Number System CScXI/2013_2014/MK_MD/13 #2 Delhi Public School, R.K.Puram Computer Science 1010 A Representing 10 1011 B Representing 11 1100 C Representing 12 1101 D Representing 13 1110 E Representing 14 1111 F Representing 15 Example: Binary to Hexadecimal (1011010110)2 = ( )16 (1011010110)2 = (10 1101 0110)2 Make groups of 4 digits = (0010 1101 0110)2 Add 0 before the first group as it is not a complete group = (2D6)16 Interpret each group as single Hexadecimal digit Reverse of this conversion can also be done in the same way (2B7)16 = ( )2 (2B7)16 = ( 2 B 7 )16 Write all digits separately = ( 0010 1011 0111 )2 Interpret single hexadecimal digit as binary equivalent To obtain Decimal number from Octal or Hexadecimal number system, you have to use the same method as used while converting Binary to Decimal. Position Σ Base * Place Value Position=0 Example: Octal to Decimal (126)8 = ( )10 2 1 0 (126)8 = (8 * 1) + (8 * 2) + (8 * 6) = 64 + 16 + 6 = 86 and so,(126)8 = (86)10 Example: Hexadecimal to Decimal (1B6)16 = ( )10 2 1 0 (1B6)16 = (16 * 1) + (16 * 11) + (16 * 6) Note: B represents 11 = 256 + 176 + 6 = 438 and so,(1B6)16 = (438)10 Now, if you want to obtain octal or hexadecimal number from decimal number, you have to use the same method as used while converting decimal to binary. For decimal to octal conversion we start dividing the decimal number by 8 and repeat the process with the quotient of the division, till you get a quotient which cannot be further divided by 8 and then collect the remainders of all the divisions in the reverse order. Example: Decimal to Octal Base Quotient Remainder 8 123 3 8 15 7 1 So, the number equivalent to decimal number 123 will be 173 in octal. Similarly, for Decimal to Hexadecimal conversion we start dividing the decimal number by 16 and Number System CScXI/2013_2014/MK_MD/13 #3 Delhi Public School, R.K.Puram Computer Science repeat the process with the quotient of the division, till you get a quotient which cannot be further divided by 16 and then collect the remainders of all the divisions in the reverse order. Note that, for such divisions if ever a remainder is more than 9 then the remainder has to be represented as A, B, C...(till F) Example: Decimal to Hexadecimal Base Quotient Remainder 16 123 11 (B) 7 So, the number equivalent to decimal number 123 will be 7B in Hexadecimal. Internal Storage encoding of Characters: Characters are converted into their equivalent binary form using certain standard codes as follows: ASCII - American Standard Code for Information Interchange - The American Standard Code for Information Interchange (ASCII, pronunciation: /Aæski/ ass-kee) is a character-encoding scheme originally based on the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text. Most modern character-encoding schemes are based on ASCII, though they support many additional characters. ISCII -Indian scripts Standard Code for Information Interchange - It is a coding scheme for representing various writing systems of India. It encodes the main Indic scripts and a Roman transliteration. The supported scripts are: Assamese, Bengali (Bangla), Devanagari, Gujarati, Gurmukhi, Kannada, Malayalam, Oriya, Tamil, and Telugu. ISCII does not encode the writing systems of India based on Arabic, but its writing system switching codes nonetheless provide for Kashmiri, Sindhi, Urdu, Persian, Pashto and Arabic. The Arabic-based writing systems were subsequently encoded in the PASCII encoding. UNICODE - (for multilingual computing) - Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems. Developed in conjunction with the Universal Character Set standard and published in book form as The Unicode Standard, the latest version of Unicode contains a repertoire of more than 110,000 characters covering 100 scripts. Number System CScXI/2013_2014/MK_MD/13 #4 .
Recommended publications
  • Nondecimal Positional Systems
    M03_LONG0847_05_AIE_C03.qxd 9/17/07 10:38 AM Page 162 Not for Sale 162 CHAPTER 3 Numeration and Computation 3.2 Nondecimal Positional Systems In the preceding section, we discussed several numeration systems, including the decimal system in common use today. As already mentioned, the decimal system is a positional system based on 10. This is probably so because we have ten fingers and historically, as now, people often counted on their fingers. In the Did You Know box at the end of this section, we will give applications of positional systems that are based on whole numbers other than 10. One very useful application of bases other than ten is as a way to deepen our understanding of number systems, arithmetic in general, and our own decimal system. Although bases other than ten were in the K–5 curriculum in the past, they are not present currently. However, nondecimal positional systems are studied in the “math methods” course that is a part of an elementary education degree and may return to elementary school in the future. We will discuss addition and subtraction in base five in the next section and multiplication in base six in the following one. Base Five Notation For our purposes, perhaps the quickest route to understanding base five notation is to reconsider the abacus of Figure 3.1. This time, however, we allow only 5 beads to be moved forward on each wire. As before, we start with the wire to the students’ right (our left) and move 1 bead forward each time as we count 1, 2, 3, and so on.
    [Show full text]
  • 13054-Duodecimal.Pdf
    Universal Multiple-Octet Coded Character Set International Organization for Standardization Organisation Internationale de Normalisation Международная организация по стандартизации Doc Type: Working Group Document Title: Proposal to encode Duodecimal Digit Forms in the UCS Author: Karl Pentzlin Status: Individual Contribution Action: For consideration by JTC1/SC2/WG2 and UTC Date: 2013-03-30 1. Introduction The duodecimal system (also called dozenal) is a positional numbering system using 12 as its base, similar to the well-known decimal (base 10) and hexadecimal (base 16) systems. Thus, it needs 12 digits, instead of ten digits like the decimal system. It is used by teachers to explain the decimal system by comparing it to an alternative, by hobbyists (see e.g. fig. 1), and by propagators who claim it being superior to the decimal system (mostly because thirds can be expressed by a finite number of digits in a "duodecimal point" presentation). • Besides mathematical and hobbyist publications, the duodecimal system has appeared as subject in the press (see e.g. [Bellos 2012] in the English newspaper "The Guardian" from 2012-12-12, where the lack of types to represent these digits correctly is explicitly stated). Such examples emphasize the need of the encoding of the digit forms proposed here. While it is common practice to represent the extra six digits needed for the hexadecimal system by the uppercase Latin capital letters A,B.C,D,E,F, there is no such established convention regarding the duodecimal system. Some proponents use the Latin letters T and E as the first letters of the English names of "ten" and "eleven" (which obviously is directly perceivable only for English speakers).
    [Show full text]
  • Zero Displacement Ternary Number System: the Most Economical Way of Representing Numbers
    Revista de Ciências da Computação, Volume III, Ano III, 2008, nº3 Zero Displacement Ternary Number System: the most economical way of representing numbers Fernando Guilherme Silvano Lobo Pimentel , Bank of Portugal, Email: [email protected] Abstract This paper concerns the efficiency of number systems. Following the identification of the most economical conventional integer number system, from a solid criteria, an improvement to such system’s representation economy is proposed which combines the representation efficiency of positional number systems without 0 with the possibility of representing the number 0. A modification to base 3 without 0 makes it possible to obtain a new number system which, according to the identified optimization criteria, becomes the most economic among all integer ones. Key Words: Positional Number Systems, Efficiency, Zero Resumo Este artigo aborda a questão da eficiência de sistemas de números. Partindo da identificação da mais económica base inteira de números de acordo com um critério preestabelecido, propõe-se um melhoramento à economia de representação nessa mesma base através da combinação da eficiência de representação de sistemas de números posicionais sem o zero com a possibilidade de representar o número zero. Uma modificação à base 3 sem zero permite a obtenção de um novo sistema de números que, de acordo com o critério de optimização identificado, é o sistema de representação mais económico entre os sistemas de números inteiros. Palavras-Chave: Sistemas de Números Posicionais, Eficiência, Zero 1 Introduction Counting systems are an indispensable tool in Computing Science. For reasons that are both technological and user friendliness, the performance of information processing depends heavily on the adopted numbering system.
    [Show full text]
  • A Ternary Arithmetic and Logic
    Proceedings of the World Congress on Engineering 2010 Vol I WCE 2010, June 30 - July 2, 2010, London, U.K. A Ternary Arithmetic and Logic Ion Profeanu which supports radical ontological dualism between the two Abstract—This paper is only a chapter, not very detailed, of eternal principles, Good and Evil, which oppose each other a larger work aimed at developing a theoretical tool to in the course of history, in an endless confrontation. A key investigate first electromagnetic fields but not only that, (an element of Manichean doctrine is the non-omnipotence of imaginative researcher might use the same tool in very unusual the power of God, denying the infinite perfection of divinity areas of research) with the stated aim of providing a new perspective in understanding older or recent research in "free that has they say a dual nature, consisting of two equal but energy". I read somewhere that devices which generate "free opposite sides (Good-Bad). I confess that this kind of energy" works by laws and principles that can not be explained dualism, which I think is harmful, made me to seek another within the framework of classical physics, and that is why they numeral system and another logic by means of which I will are kept far away from public eye. So in the absence of an praise and bring honor owed to God's name; and because adequate theory to explain these phenomena, these devices can God is One Being in three personal dimensions (the Father, not reach the design tables of some plants in order to produce them in greater number.
    [Show full text]
  • Chapter 6 MISCELLANEOUS NUMBER BASES. the QUINARY
    The Number Concept: Its Origin and Development By Levi Leonard Conant Ph. D. Chapter 6 MISCELLANEOUS NUMBER BASES. THE QUINARY SYSTEM. The origin of the quinary mode of counting has been discussed with some fulness in a preceding chapter, and upon that question but little more need be said. It is the first of the natural systems. When the savage has finished his count of the fingers of a single hand, he has reached this natural number base. At this point he ceases to use simple numbers, and begins the process of compounding. By some one of the numerous methods illustrated in earlier chapters, he passes from 5 to 10, using here the fingers of his second hand. He now has two fives; and, just as we say “twenty,” i.e. two tens, he says “two hands,” “the second hand finished,” “all the fingers,” “the fingers of both hands,” “all the fingers come to an end,” or, much more rarely, “one man.” That is, he is, in one of the many ways at his command, saying “two fives.” At 15 he has “three hands” or “one foot”; and at 20 he pauses with “four hands,” “hands and feet,” “both feet,” “all the fingers of hands and feet,” “hands and feet finished,” or, more probably, “one man.” All these modes of expression are strictly natural, and all have been found in the number scales which were, and in many cases still are, in daily use among the uncivilized races of mankind. In its structure the quinary is the simplest, the most primitive, of the natural systems.
    [Show full text]
  • I – Mathematics in Design – SMTA1103
    SCHOOL OF SCIENCE AND HUMANITIES DEPARTMENT OF MATHEMATICS UNIT – I – Mathematics in Design – SMTA1103 UNIT1- MATHEMATICS IN DESIGN Golden Ratio The ratio of two parts of a line such that the longer part divided by the smaller part is also equal to the whole length divided by the longer part. Results: i) The ratio of the circumference of a circle to its diameter is π . ii) The ratio of the width of a rectangular picture frame to its height is not necessarily equal to he golden ratio, though some artists and architects believe a frame made using the golden ratio makes the most pleasing and beautiful shape.iii) The ratio of two successive numbers of the Fibonacci sequence give an approximate value of the golden ratio,the bigger the pair of Fibonacci Numbers, the closer the approximation. Example1: The Golden Ratio = 1.61803398874989484820... = 1.618 correct to 3 decimal places. If x n are terms of the Fibonacci sequence, then what is the least value of n for which ( x n +1 / x n = 1.618 correct to 3 decimal places. Example2: A rectangle divided into a square and a smaller rectangle. If (x + y) /y = x / y ,find the value of golden ratio. Example3: The Golden Ratio = 1.61803398874989484820... = 1.6180 correct to 4 decimal places. If xn are terms of the Fibonacci sequence, then what is the least value of n for which (x n +1) / x n = 1.618 0 correct to 4 decimal places. Example4: Obtain golden ratio in a line segment. Proportion Proportion is an equation which defines that the two given ratios are equivalent to each other.
    [Show full text]
  • The Counting System of the Incas in General, There Is a Lack of Material on the History of Numbers from the Pre-Columbian Americas
    History of Numbers 1b. I can determine the number represented on an Inca counting board, and a quipu cord. The Counting System of the Incas In general, there is a lack of material on the history of numbers from the pre-Columbian Americas. Most of the information available concentrates on the eastern hemisphere, with Europe as the focus. Why? First, there has been a false assumption that indigenous peoples in the Americas lacked any specialized mathematics. Second, it seems at least some of their ancient mathematics has been intentionally kept secret. And Einally, when Europeans invaded and colonized the Americas, much of that evidence was most likely destroyed. In the 1960's, two researchers attempted to discover what mathematical knowledge was known by the Incas and how they used the Peruvian quipu, a counting system using cords and knots, in their mathematics. These researchers have come to certain beliefs about the quipu that are summarized below: Counting Boards It seems the Incas did not have a complicated system of computation. Whereas other peoples in the region, such as the Mayans, were doing computations related to their rituals and calendars, the Incas seem to have been more concerned with the task of record-keeping. To do this, they used what are called “quipu”(or khipu) to record quantities of items. However, they Eirst often needed to do computations whose results would be recorded on a quipu. To do these computations, they sometimes used a counting board or Yupana (from the Quechua word "yupay": count) made from a slab of wood or stone.
    [Show full text]
  • Decimal Notation in the United States
    Decimal Notation in the United States In the United States, we use the decimal or period (“.”) to represent the difference between whole numbers and partial numbers. We use the comma (“,”) to separate groups of three places on the whole numbers side. This might be different from the way you currently write numbers. For example, the number 1 million: Some non-U.S. Counties: 1.000.000,00 U.S.: 1,000,000.00 It is also very important to know the names for the digit places in decimal notation. Here are the names in English for the United States: Thousandths Trillions Hundred Billions Ten Billions Billions Hundred Millions Ten Millions Millions Hundred Thousands Ten Thousands Thousands Hundreds Tens Ones Tenths Hundredths Thousandths Ten Hundred Thousandths Millionths 1 , 2 3 4 , 5 6 7 , 8 9 0 , 1 2 3 . 4 5 6 7 8 9 Other than the “ones” place, the places to the right of the decimal are almost the same as the places to the left of the decimal, but with an additional “th” added at the end. How to Say Common Math Terms in U.S. English Numbers: Big Numbers: In the U.S. we separate big numbers into groups of three of the following types: Ones, Thousands, Millions, Billions, … For example: 1,234,567 has three groups Millions: 1 Thousands: 234 Ones: 567 We say each group as a separate number, followed by the group type. So, we would say: “One million, two hundred and thirty-four thousand, five hundred and sixty-seven” Decimals: When there is a decimal, we say it a few different ways: 0.4 can be expressed as “four tenths,” “zero point four,” or just
    [Show full text]
  • 'Decimal' Package (Version 1·1)
    The `decimal' package (version 1·1) A. Syropoulos ∗ and R. W. D. Nickalls y June 1, 2011 Abstract In traditional English typography the decimal point is printed as a raised dot. The decimal package provides this functionality by making the full point, or period ( . ) active in maths mode, and implementing the \cdot character instead. In addition, the command \. is redefined in such a way that that it produces a full point in math mode, but retains its usual functionality in text mode. 1 Introduction The decimal point (decimal separator) is variously implemented as a comma (European), a full point (North American), or as a raised full point (English). While the comma and full point have always been supported in electronic typesetting, the English raised decimal point has been somewhat overlooked|until now. For a nice history of the decimal fraction see the chapter on The invention of decimal fractions and of logarithms in Scott1 (1960). 2 Typography In Great Britain until about 1970 or so the decimal separator was typically imple- mented as a raised dot (middle dot). For example, when currency decimalisation was introduced in the UK in 1971, the recommended way of writing currency was with a raised dot, as in $ 21·34. However, since then there has been a gradual decline in the use of the raised point most probably owing to the fact that this glyph was not generally available on electronic typewriters or computer wordprocessors. While the raised dot does make occasional appearances in British newspapers, it is, unfortunately, seldom seen nowadays even in British scientific journals.
    [Show full text]
  • The Sumerians , the Sexagesimal System and the Babylonian Legacy
    THE SUMERIANS , THE SEXAGESIMAL SYSTEM AND THE BABYLONIAN LEGACY TO ASTRONOMY by Paul Coffre The Sexagesimal System The Sumerians who lived in Mesopotamia (nowadays Iraq) 5000 years ago, developed a sexagesimal ComputaDon system. The sexagesimal system is a base 60 ComputaDon system. Why? Why not base 10 (deCimal), base 2 (Computers), base 12 (EgypDans), base 20 (Mayans)? The sexagesimal system is sDll in use today aLer 5000 years: CloCks, Coordinates of maps, Trigonometry… Why was the number 60 so valued in Mesopotamia? 60 is Countable on the fingers of both hands, 60 is a highly Composite number, 60 has an astronomiCal signifiCanCe. Strange enough that 60 is the first number between two prime numbers (59 and 61) For more details go to: hTps://en.wikipedia.org/wiki/Sexagesimal If this finger-CounDng method was the reason for the Mesopotamian sexagesimal system, why was its sub-base 10 instead of 12? It is inConsistent that the CounDng system is 12 × 5 = 60, while the deCimal notaDon system is 10 × 6 = 60. Note that Egypt uses this duodeCimal finger-CounDng method (base 12). The AnCient EgypDans had a deCimal system and did not acCept a sexagesimal system. They did not need to Count to 60, but they divided day and night into 12 hours each and they needed only to Count 12. Therefore we Can safely assume that this finger-CounDng method was originally developed to Count 12 and later Convert- ed to Count 60 and that Sumerians developed the sexagesimal notaDon independent of this CounDng method and then was passed on the Babylonians.
    [Show full text]
  • 2Decimal and Sexagesimal System
    I.E.S. “Andrés de Vandelvira” - Sección Europea Mathematics 2 Decimal and sexagesimal system Keywords Regular numbers repeating decimals period irrational number rounding number line sexagesimal system 1 Decimal numbers Remember that to express numbers that are not whole numbers we use decimal numbers as 75.324 in which every digit has a value which is divided by ten when we move to the right. So 7 is seventy units 5 is five units 3 is three tenths of a unit 2 two hundredths of the unit 4 is four thousandths of a unit And we continue like that if there are more digits. This is the decimal system that is commonly use nowadays except, sometimes, for time and angles. We read these numbers naming the whole part then “point” and then the decimals digits one by one Example The number 75.324 is read as seventy five, point, three, two, four When the numbers express money or length can be read on a different way, for example 5.24€ is read as five point twenty four euros or five euros and twenty five cents or the number 5.36 m can be read as five point thirty six metres. 2 Types of decimal numbers As a result of some operations we can get different types of decimal numbers: Regular numbers: Are decimal numbers with a limited quantity of decimal digits and from them all could be zeros. 2-1 I.E.S. “Andrés de Vandelvira” - Sección Europea Mathematics 14 Example = 8.2 we find an exact division 5 Repeating decimals: There is a group of digits that are repeated forever.
    [Show full text]
  • Conversions Between Percents, Decimals, and Fractions
    Click on the links below to jump directly to the relevant section Conversions between percents, decimals and fractions Operations with percents Percentage of a number Percent change Conversions between percents, decimals, and fractions Given the frequency that percents occur, it is very important that you understand what a percent is and are able to use percents in performing calculations. This unit will help you learn the skills you need in order to work with percents. Percent means "per one hundred" Symbol for percent is % For example, suppose there are 100 students enrolled in a lecture class. If only 63 attend the lecture, then 63 per 100 students showed up. This means 63% of the students attended the lecture. If we take a closer look at this, we can see that the fraction of the students that attended the lecture is 63/100, and this fraction can be expressed as 0.63. • _63% is the same as 63/100 • _63% is the same as 0.63 This example shows how decimals, fractions, and percents are closely related and can be used to represent the same information. Converting between Percents and Decimals Convert from percent to decimal: To change a percent to a decimal we divide by 100. This is the same as moving the decimal point two places to the left. For example, 15% is equivalent to the decimal 0.15. Notice that dividing by 100 moves the decimal point two places to the left. Example What decimal is equivalent to 117%? NOTE: Since 117% is greater than 100%, the decimal will be greater than one.
    [Show full text]