The Human Binary Calculator: Investigating Positional Notation

Total Page:16

File Type:pdf, Size:1020Kb

The Human Binary Calculator: Investigating Positional Notation The Human Binary Calculator: Investigating Positional Notation Subject: Mathematics/Computer Science Topic: Numbers Grade Level: 8-12 Time: 40-60 min Pre/Post Show Math Activity Introduction: In Show Math, the decimal expansion of Pi is converted into binary. This activity strengthens students’ understanding of positional notation by exploring the representation of numbers in a base other than base 10. By expressing numbers in binary, including values that are not whole numbers, students will gain an under- standing of how the value of a number depends on the placement of its digits. Learning Objectives: By the end of this activity students should: • Understand the principle of positional notation • Expand their knowledge of exponents and addition/subtraction of fractions • Know how to convert from binary to decimal and from decimal to binary Skills: Students should develop: • Team work skills • Communication and collaboration skills • Number sense skills Material & Resources: • Printed cards (see templates below) per group of five students • Worksheets for the class • Overhead of Powers of 2 WNCP Curriculum Links: Mathematics 9 Demonstrate an understanding of powers with integral bases (ex- cluding base 0) and whole number exponents by representing repeat- ed multiplication using powers. [C, CN, PS, R] Foundations of Mathematics 10 Demonstrate an understanding of powers with integral and rational exponents. [C, CN, PS, R] Apprenticeship and Workplace Analyze puzzles and games that involve numerical reasoning, using Mathematics 11 problem-solving strategies. [C, CN, PS, R] Apprenticeship and Workplace Analyze puzzles and games that involve numerical reasoning, using Mathematics 12 problem-solving strategies. [C, CN, PS, R] Foundations of Mathematics 12 Analyze puzzles and games that involve numerical reasoning and logical reasoning, using problem-solving strategies. [C, CN, PS, R] Computer Information Systems Differentiate between binary, decimal, and hexadecimal number 11 systems. Background: Throughout history different societies and cultures have used different types of number systems. There are records of ancient civilizations marking tallies, using lines to represent numbers. For example \\\\, represents 4. This is called a unary numeral system. It is a number system with base one and is the simplest numeral system to represent the natural numbers. The standard method of counting on one’s fingers is effectively a unary system. By introducing new symbols to the unary system, we can make it simpler to count higher. It is common for these new symbols to be a power of 10, for example if / is one, + is ten and – is 100, then 304 is ---////. Notice that the position of the symbols is irrelevant; 304 could be written ---//// or ////--- or any variation of that and still have the same meaning. These numeral systems are called additive systems. The type of numeral system used today is the Hindu-Arabic numeral system. In this number system the base is 10 and is therefore referred to as the decimal numeral system. There are ten different digits (0 to 9) used in this number system. The position of each digit within a number denotes the multiplier (power of ten) multiplied with that digit - each position has a value ten times that of the position to its right. For example, we can expand 304 to 3×100+0×10+4×1. This system of numbers originated in India and is now used throughout the world. Positional systems make it easier to perform addition, subtraction and multiplication than with the additive number system. Imagine how much more difficult adding large numbers if you were counting up tally lines (and that is not to mention multiplication and division). As well the positional number systems require a finite num- ber of digits to write high number where as additive will require different symbols for higher powers of ten. The binary number system is a positional number system with base of 2. It uses the symbols 0 and 1 to repre- sent numeric values. In decimal, after a digit reaches 9, an increment resets it to 0 but also cause an increment of the next digit to the left. In the binary, counting is the same except that only the two symbols 0 and 1 are used. Since binary is a base-2 system, each digit placement represents an increasing power of 2, with the rightmost digit representing 20, the next digit to the right representing 21 and so forth. So 304 in binary is (1×28) +(0×27) +(0×26) +(1×25) +(1×24) +(0×23) +(0×22) +(0×21) +(0×20) =100110000. Fractions in binary only terminate if the denominator has 2 as the only prime factor otherwise they will continue forever. As a result, 1/10 does Counting in Binary on Your Hands not have a finite binary representation. The digit directly to the left of the decimal place represents 2-1, the next left digit is -22 and so forth. The Using your fingers and the binary table below indicates the conversion from decimal to binary. number system you can count to 31 on one hand and 1023 on both hands. If you oriented your palms towards Decimal Form Expansion Binary your face, the values for one hand are: 2 1 0 4 (1×2 ) +(0×2 )+ (0×2 ) 100 0 3 (1×22) + (1×2 ) 11 Pinky Ring Middle Index Thumb 0 2 (1×22) + (0×2 ) 10 Power 4 3 2 1 0 of Two 2 2 2 2 2 1 (1×20) 1 Value 16 8 4 2 1 0 (0×20) 0 -1 1/2 = 0.5 (1×2 ) 0.1 This would continue on your -1 -2 -3 1/3 = 0.3333.... (0×2 ) +(1×2 )+ (0×2 ) other hand. The values of each -4 +(1×2 )+...... 0.010101... raised finger are added together 1/4 = 0.25 (0×2-1) +(1×2-2) 0.01 to arrive at a total number. In the 1/5 = 0.2 (0×2-1) +(0×2-2)+ (1×2-3) 0.0011.... one-handed version, all fingers +(1×2-4)+...... raised represents 31 because 16+8+4+2+1=31 and all your fin- gers are lowered if represents a 0. Resources: The figure to the • http://en.wikipedia.org/wiki/Positional_notation right represents Explains positional notation. 3 because the fingers representing • http://en.wikipedia.org/wiki/Numeral_system 2 and 1 are raised. Explains the history of different numeral systems. For more on counting in • http://en.wikipedia.org/wiki/Binary_numeral_system binary on your fingers visit: Explains the binary system in more detail. http://en.wikipedia.org/wiki/ Finger_binary • http://www.youtube.com/watch?v=qdFmSlFojIw Binary numbers explained in 60 seconds Activity Instructions: 1. Pose the question to the class: What is the highest number you can count with on your hands? Allow the class to come up with answers. If no-one is familiar with the binary system tell the class that you are going to teach them how to count to 31 using only one hand and 1023 using both hands. 2. Write at the top of the board 16, 8, 4, 2, 1. Ask the class, if they see a pattern in these numbers. Can these numbers be written in a different way? Once the class sees that they can all be written as 2n, explain to them how they will learn to count in binary. How is the word binary and the idea of “base-2” related? Normally we count in what is known as base-10 or decimal. 3. Have the students practice finger binary notation by calling out a few values to represent. Once they’re comfortable with the distinction between a value in base-10 and its finger representation, remind them that each finger up equals “1” of the appropriate power of two. Now have them write the value in binary using ones and zeros (i.e. “7=00111”). 4. Divide the class into groups of five students and give one set of cards to each group—one per member. 5. Each group will take a turn to create the base-2 representation of a number with their group, in front of the class. Group members should stand in order and when you call a base-10 number (eg “Twenty two”), each appropriate member should step forward and hold up their card if it’s part of the base-2 representation. 6. If you would like to make the activity a competition, have more than one group stand up and award the quicker group a point for every correct representation. 7. Call out numbers and have the rest of the class participate by writing the binary representation (i.e. 10110 for “Twenty two”) on a piece of scrap paper. Let the audience be the judges of correctness, and deciding which group got the correct representation first. 8. Each group can go up in turn and try to get the correct number. Let each group have a couple tries. 9. For advanced classes, hand out the decimal cards and assemble groups of 6—8 students and have them create mixed numbers. Write a decimal point on the board, and then write 1/2, 1/4, and 1/8 and their decimal expansions. Start with numbers that have finite representations in binary such as 1.25, 5.5, 4.625, 12.375, 31.875 etc. You can challenge them by asking them to represent seemingly simple numbers such as 0.7 (which cannot be represented exactly Value Line Activity in binary). Have them determine the closest representation to such values. This brings the discussion in the direction of computer Have one side of the room be representation of values —which is done in binary—and the strongly agree and the other side imprecision of different representations.
Recommended publications
  • Positional Notation Or Trigonometry [2, 13]
    The Greatest Mathematical Discovery? David H. Bailey∗ Jonathan M. Borweiny April 24, 2011 1 Introduction Question: What mathematical discovery more than 1500 years ago: • Is one of the greatest, if not the greatest, single discovery in the field of mathematics? • Involved three subtle ideas that eluded the greatest minds of antiquity, even geniuses such as Archimedes? • Was fiercely resisted in Europe for hundreds of years after its discovery? • Even today, in historical treatments of mathematics, is often dismissed with scant mention, or else is ascribed to the wrong source? Answer: Our modern system of positional decimal notation with zero, to- gether with the basic arithmetic computational schemes, which were discov- ered in India prior to 500 CE. ∗Bailey: Lawrence Berkeley National Laboratory, Berkeley, CA 94720, USA. Email: [email protected]. This work was supported by the Director, Office of Computational and Technology Research, Division of Mathematical, Information, and Computational Sciences of the U.S. Department of Energy, under contract number DE-AC02-05CH11231. yCentre for Computer Assisted Research Mathematics and its Applications (CARMA), University of Newcastle, Callaghan, NSW 2308, Australia. Email: [email protected]. 1 2 Why? As the 19th century mathematician Pierre-Simon Laplace explained: It is India that gave us the ingenious method of expressing all numbers by means of ten symbols, each symbol receiving a value of position as well as an absolute value; a profound and important idea which appears so simple to us now that we ignore its true merit. But its very sim- plicity and the great ease which it has lent to all computations put our arithmetic in the first rank of useful inventions; and we shall appre- ciate the grandeur of this achievement the more when we remember that it escaped the genius of Archimedes and Apollonius, two of the greatest men produced by antiquity.
    [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]
  • Duodecimal Bulletin Vol
    The Duodecimal Bulletin Bulletin Duodecimal The Vol. 4a; № 2; Year 11B6; Exercise 1. Fill in the missing numerals. You may change the others on a separate sheet of paper. 1 1 1 1 2 2 2 2 ■ Volume Volume nada 3 zero. one. two. three.trio 3 1 1 4 a ; (58.) 1 1 2 3 2 2 ■ Number Number 2 sevenito four. five. six. seven. 2 ; 1 ■ Whole Number Number Whole 2 2 1 2 3 99 3 ; (117.) eight. nine. ________.damas caballeros________. All About Our New Numbers 99;Whole Number ISSN 0046-0826 Whole Number nine dozen nine (117.) ◆ Volume four dozen ten (58.) ◆ № 2 The Dozenal Society of America is a voluntary nonprofit educational corporation, organized for the conduct of research and education of the public in the use of base twelve in calculations, mathematics, weights and measures, and other branches of pure and applied science Basic Membership dues are $18 (USD), Supporting Mem- bership dues are $36 (USD) for one calendar year. ••Contents•• Student membership is $3 (USD) per year. The page numbers appear in the format Volume·Number·Page TheDuodecimal Bulletin is an official publication of President’s Message 4a·2·03 The DOZENAL Society of America, Inc. An Error in Arithmetic · Jean Kelly 4a·2·04 5106 Hampton Avenue, Suite 205 Saint Louis, mo 63109-3115 The Opposed Principles · Reprint · Ralph Beard 4a·2·05 Officers Eugene Maxwell “Skip” Scifres · dsa № 11; 4a·2·08 Board Chair Jay Schiffman Presenting Symbology · An Editorial 4a·2·09 President Michael De Vlieger Problem Corner · Prof.
    [Show full text]
  • The What and Why of Whole Number Arithmetic: Foundational Ideas from History, Language and Societal Changes
    Portland State University PDXScholar Mathematics and Statistics Faculty Fariborz Maseeh Department of Mathematics Publications and Presentations and Statistics 3-2018 The What and Why of Whole Number Arithmetic: Foundational Ideas from History, Language and Societal Changes Xu Hu Sun University of Macau Christine Chambris Université de Cergy-Pontoise Judy Sayers Stockholm University Man Keung Siu University of Hong Kong Jason Cooper Weizmann Institute of Science SeeFollow next this page and for additional additional works authors at: https:/ /pdxscholar.library.pdx.edu/mth_fac Part of the Science and Mathematics Education Commons Let us know how access to this document benefits ou.y Citation Details Sun X.H. et al. (2018) The What and Why of Whole Number Arithmetic: Foundational Ideas from History, Language and Societal Changes. In: Bartolini Bussi M., Sun X. (eds) Building the Foundation: Whole Numbers in the Primary Grades. New ICMI Study Series. Springer, Cham This Book Chapter is brought to you for free and open access. It has been accepted for inclusion in Mathematics and Statistics Faculty Publications and Presentations by an authorized administrator of PDXScholar. Please contact us if we can make this document more accessible: [email protected]. Authors Xu Hu Sun, Christine Chambris, Judy Sayers, Man Keung Siu, Jason Cooper, Jean-Luc Dorier, Sarah Inés González de Lora Sued, Eva Thanheiser, Nadia Azrou, Lynn McGarvey, Catherine Houdement, and Lisser Rye Ejersbo This book chapter is available at PDXScholar: https://pdxscholar.library.pdx.edu/mth_fac/253 Chapter 5 The What and Why of Whole Number Arithmetic: Foundational Ideas from History, Language and Societal Changes Xu Hua Sun , Christine Chambris Judy Sayers, Man Keung Siu, Jason Cooper , Jean-Luc Dorier , Sarah Inés González de Lora Sued , Eva Thanheiser , Nadia Azrou , Lynn McGarvey , Catherine Houdement , and Lisser Rye Ejersbo 5.1 Introduction Mathematics learning and teaching are deeply embedded in history, language and culture (e.g.
    [Show full text]
  • {Download PDF} High Five with Julius
    HIGH FIVE WITH JULIUS PDF, EPUB, EBOOK Paul Frank | 10 pages | 24 Feb 2010 | CHRONICLE BOOKS | 9780811871471 | English | California, United States High Five with Julius PDF Book Rate this:. My 3-year-old loved giving each character a high-five and then her hand would linger as she felt the different textures. English On Shelf. How Can We Help? As two-way G-League point guard Kadeem Allen bounced away the final seconds, a large throng of Knicks fans stood up and roared as the club moved to Big Deal, Baby. McGraw Hill. Nice Partner! Randle and others talked about a lack of focus at the morning shootaround Monday. You are commenting using your WordPress. Table of Contents. Universal Conquest Wiki. Smiling this much is so heartwarming! It did the trick. On Shelf. I think focusing primarily on the individual is definitely the first step. A medical study found that fist bumps and high fives spread fewer germs than handshakes. Welcome to another Write a Review Wednesday , a meme started by Tara Lazar as a way to show support to authors of kids literature. Each spread encourages kids to celebrate amazing everyday achievementsfrom sharing their toys to just being themselvesand features a touch-and-feel texture that will keep little ones engaged as they strive to be and do their very best. Redirected from High-five. National High Five Day is a project to give out high fives and is typically held on the third Thursday in April. Categories : introductions American cultural conventions Hand gestures. By continuing to use this website, you agree to their use.
    [Show full text]
  • The Chinese Rod Numeral Legacy and Its Impact on Mathematics* Lam Lay Yong Mathematics Department National University of Singapore
    The Chinese Rod Numeral Legacy and its Impact on Mathematics* Lam Lay Yong Mathematics Department National University of Singapore First, let me explain the Chinese rod numeral system. Since the Warring States period {480 B.C. to 221 B.C.) to the 17th century A.D. the Chinese used a bundle of straight rods for computation. These rods, usually made from bamboo though they could be made from other materials such as bone, wood, iron, ivory and jade, were used to form the numerals 1 to 9 as follows: 1 2 3 4 5 6 7 8 9 II Ill Ill I IIIII T II Note that for numerals 6 to 9, a horizontal rod represents the quantity five. A numeral system which uses place values with ten as base requires only nine signs. Any numeral of such a system is formed from among these nine signs which are placed in specific place positions relative to each other. Our present numeral system, commonly known as the Hindu-Arabic numeral system, is based on this concept; the value of each numeral determines the choice of digits from the nine signs 1, 2, ... , 9 anq their place positions. The place positions are called units, tens, hundreds, thousands, and so on, and each is occupied by at most one digit. The Chinese rod system employs the same concept. However, since its nine signs are formed from rod tallies, if a number such as 34 were repre­ sented as Jll\IU , this would inevitably lead to ambiguity and confusion. To * Text of Presidential Address delivered at the Society's Annual General Meeting on 20 March 1987.
    [Show full text]
  • Inventing Your Own Number System
    Inventing Your Own Number System Through the ages people have invented many different ways to name, write, and compute with numbers. Our current number system is based on place values corresponding to powers of ten. In principle, place values could correspond to any sequence of numbers. For example, the places could have values corre- sponding to the sequence of square numbers, triangular numbers, multiples of six, Fibonacci numbers, prime numbers, or factorials. The Roman numeral system does not use place values, but the position of numerals does matter when determining the number represented. Tally marks are a simple system, but representing large numbers requires many strokes. In our number system, symbols for digits and the positions they are located combine to represent the value of the number. It is possible to create a system where symbols stand for operations rather than values. For example, the system might always start at a default number and use symbols to stand for operations such as doubling, adding one, taking the reciprocal, dividing by ten, squaring, negating, or any other specific operations. Create your own number system. What symbols will you use for your numbers? How will your system work? Demonstrate how your system could be used to perform some of the following functions. • Count from 0 up to 100 • Compare the sizes of numbers • Add and subtract whole numbers • Multiply and divide whole numbers • Represent fractional values • Represent irrational numbers (such as π) What are some of the advantages of your system compared with other systems? What are some of the disadvantages? If you met aliens that had developed their own number system, how might their mathematics be similar to ours and how might it be different? Make a list of some math facts and procedures that you have learned.
    [Show full text]
  • Datatype Defining Rewrite Systems for Naturals and Integers
    UvA-DARE (Digital Academic Repository) Datatype defining rewrite systems for naturals and integers Bergstra, J.A.; Ponse, A. DOI 10.23638/LMCS-17(1:17)2021 Publication date 2021 Document Version Final published version Published in Logical Methods in Computer Science License CC BY Link to publication Citation for published version (APA): Bergstra, J. A., & Ponse, A. (2021). Datatype defining rewrite systems for naturals and integers. Logical Methods in Computer Science, 17(1), [17]. https://doi.org/10.23638/LMCS- 17(1:17)2021 General rights It is not permitted to download or to forward/distribute the text or part of it without the consent of the author(s) and/or copyright holder(s), other than for strictly personal, individual use, unless the work is under an open content license (like Creative Commons). Disclaimer/Complaints regulations If you believe that digital publication of certain material infringes any of your rights or (privacy) interests, please let the Library know, stating your reasons. In case of a legitimate complaint, the Library will make the material inaccessible and/or remove it from the website. Please Ask the Library: https://uba.uva.nl/en/contact, or a letter to: Library of the University of Amsterdam, Secretariat, Singel 425, 1012 WP Amsterdam, The Netherlands. You will be contacted as soon as possible. UvA-DARE is a service provided by the library of the University of Amsterdam (https://dare.uva.nl) Download date:30 Sep 2021 Logical Methods in Computer Science Volume 17, Issue 1, 2021, pp. 17:1–17:31 Submitted Jan. 15, 2020 https://lmcs.episciences.org/ Published Feb.
    [Show full text]
  • Positional Notation Consider 101 1015 = ? Binary: Base 2
    1/21/2019 CS 362: Computer Design Positional Notation Lecture 3: Number System Review • The meaning of a digit depends on its position in a number. • A number, written as the sequence of digits dndn‐1…d2d1d0 in base b represents the value d * bn + d * bn‐1 + ... + d * b2 + d * b1 + d * b0 Cynthia Taylor n n‐1 2 1 0 University of Illinois at Chicago • For a base b, digits will range from 0 to b‐1 September 5th, 2017 Consider 101 1015 = ? • In base 10, it represents the number 101 (one A. 26 hundred one) = B. 51 • In base 2, 1012 = C. 126 • In base 8, 1018 = D. 130 101‐3=? Binary: Base 2 A. ‐10 • Used by computers B. 8 • A number, written as the sequence of digits dndn‐1…d2d1d0 where d is in {0,1}, represents C. 10 the value n n‐1 2 1 0 dn * 2 + dn‐1 * 2 + ... + d2 * 2 + d1 * 2 + d0 * 2 D. ‐30 1 1/21/2019 Binary to Decimal Decimal to Binary • Use polynomial expansion • Repeatedly divide by 2, recording the remainders. • The remainders form the binary digits of the number. 101102 = • Converting 25 to binary 3410=?2 Hexadecimal: Base 16 A. 010001 • Like binary, but shorter! • Each digit is a “nibble”, or half a byte • Indicated by prefacing number with 0x B. 010010 • A number, written as the sequence of digits dndn‐ C. 100010 1…d2d1d0 where d is in {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}, represents the value D.
    [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]
  • Experimental Methods and Instrumentation for Chemical Engineers Experimental Methods and Instrumentation for Chemical Engineers
    Experimental Methods and Instrumentation for Chemical Engineers Experimental Methods and Instrumentation for Chemical Engineers Gregory S. Patience AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Elsevier 225 Wyman Street, Waltham, MA 02451, USA The Boulevard, Langford Lane, Kidlington, Oxford OX5 1GB, UK Radarweg 29, PO Box 211, 1000 AE Amsterdam, The Netherlands First edition 2013 Copyright © 2013 Elsevier B.V. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher. Details on how to seek permission, further information about the Publisher’s permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www.elsevier.com/permissions. This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein). Notices Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods, professional practices, or medical treatment may become necessary. Practitioners and researchers must always rely on their own experience and knowledge in ­evaluating and using any information, methods, compounds, or experiments
    [Show full text]
  • Number Systems and Number Representation Aarti Gupta
    Number Systems and Number Representation Aarti Gupta 1 For Your Amusement Question: Why do computer programmers confuse Christmas and Halloween? Answer: Because 25 Dec = 31 Oct -- http://www.electronicsweekly.com 2 Goals of this Lecture Help you learn (or refresh your memory) about: • The binary, hexadecimal, and octal number systems • Finite representation of unsigned integers • Finite representation of signed integers • Finite representation of rational numbers (if time) Why? • A power programmer must know number systems and data representation to fully understand C’s primitive data types Primitive values and the operations on them 3 Agenda Number Systems Finite representation of unsigned integers Finite representation of signed integers Finite representation of rational numbers (if time) 4 The Decimal Number System Name • “decem” (Latin) => ten Characteristics • Ten symbols • 0 1 2 3 4 5 6 7 8 9 • Positional • 2945 ≠ 2495 • 2945 = (2*103) + (9*102) + (4*101) + (5*100) (Most) people use the decimal number system Why? 5 The Binary Number System Name • “binarius” (Latin) => two Characteristics • Two symbols • 0 1 • Positional • 1010B ≠ 1100B Most (digital) computers use the binary number system Why? Terminology • Bit: a binary digit • Byte: (typically) 8 bits 6 Decimal-Binary Equivalence Decimal Binary Decimal Binary 0 0 16 10000 1 1 17 10001 2 10 18 10010 3 11 19 10011 4 100 20 10100 5 101 21 10101 6 110 22 10110 7 111 23 10111 8 1000 24 11000 9 1001 25 11001 10 1010 26 11010 11 1011 27 11011 12 1100 28 11100 13 1101 29 11101 14 1110 30 11110 15 1111 31 11111 ..
    [Show full text]