The decimal number system, also known as base-10, uses 10 digits (0-9) to represent numbers. Each digit's value is determined by its position in the number. Decimal numbers can be expanded to include a decimal point and fractional values. | | |
The binary number system, also known as base-2, uses only two digits (0 and 1) to represent numbers. Each digit's value is determined by its position in the number, starting from the rightmost digit. Binary numbers are widely used in computer science and digital electronics. | | |
The octal number system, also known as base-8, uses eight digits (0-7) to represent numbers. Each digit's value is determined by its position in the number. Octal numbers are sometimes used in computer programming and Unix system permissions. | | |
The hexadecimal number system, also known as base-16, uses sixteen digits (0-9 and A-F) to represent numbers. Each digit's value is determined by its position in the number. Hexadecimal numbers are commonly used in computer programming, particularly for representing memory addresses and color codes. | | |
Converting between number systems involves changing the representation of a number from one base to another. Decimal to binary conversion involves repeated division by 2 and noting the remainders. Binary to decimal conversion involves multiplying each digit by the corresponding power of 2 and summing the results. | | |
Decimal to octal conversion involves repeated division by 8 and noting the remainders. Octal to decimal conversion involves multiplying each digit by the corresponding power of 8 and summing the results. Hexadecimal to decimal conversion involves multiplying each digit by the corresponding power of 16 and summing the results. | | |
Binary to octal conversion can be done by grouping binary digits into sets of three and converting each set to its octal equivalent. Octal to binary conversion involves converting each octal digit to its binary equivalent. Hexadecimal to binary conversion involves converting each hexadecimal digit to its binary equivalent. | | |
Number systems are fundamental to mathematics, computer science, and digital electronics. They enable efficient representation and manipulation of numbers and data. Understanding number systems is crucial for programming, data analysis, and other technical fields. | | |
Number systems are ways to represent, organize, and manipulate numbers. Decimal, binary, octal, and hexadecimal are commonly used number systems. Conversion between number systems involves changing the representation of a number from one base to another. | | |
We want to hear from you! Send us a message and help improve Slidesgo
Top searches
Trending searches
49 templates
44 templates
61 templates
85 templates
34 templates
63 templates
It seems that you like this template, number systems and operations - mathematics - 6th grade presentation, free google slides theme, powerpoint template, and canva presentation template.
Are you a math teacher struggling to keep your 6th-grade students engaged in learning about number systems and operations? Then, please pay attention, because we have the perfect solution for you! This creative template is designed with interesting illustrations that will capture your students' attention immediately and keep them engaged throughout the lesson. This template includes various exercises, making it the ideal tool to assist in teaching mathematics. Don't waste any more time searching, get this template for Google Slides or PowerPoint now and be 100% ready to teach this important subject matter.
How can I use the template?
Am I free to use the templates?
How to attribute?
Related posts on our blog.
Related presentations.
Unlock this template and gain unlimited access
Writing tone, number of slides.
The number system or the numeral system is the system of naming or representing numbers. We know that a number is a mathematical value that helps to count or measure objects and it helps in performing various mathematical calculations. There are different types of number systems in Maths like decimal number system, binary number system, octal number system, and hexadecimal number system. In this article, we are going to learn what is a number system in Maths, different types, and conversion procedures with many number system examples in detail . Also, check mathematics for grade 12 here.
A number system is defined as a system of writing to express numbers. It is the mathematical notation for representing numbers of a given set by using digits or other symbols in a consistent manner. It provides a unique representation of every number and represents the arithmetic and algebraic structure of the figures. It also allows us to operate arithmetic operations like addition, subtraction, multiplication and division.
The value of any digit in a number can be determined by:
Before discussing the different types of number system examples, first, let us discuss what is a number?
A number is a mathematical value used for counting or measuring or labelling objects. Numbers are used to performing arithmetic calculations. Examples of numbers are natural numbers, whole numbers, rational and irrational numbers, etc. 0 is also a number that represents a null value.
A number has many other variations such as even and odd numbers, prime and composite numbers. Even and odd terms are used when a number is divisible by 2 or not, whereas prime and composite differentiate between the numbers that have only two factors and more than two factors, respectively.
In a number system, these numbers are used as digits. 0 and 1 are the most common digits in the number system, that are used to represent binary numbers. On the other hand, 0 to 9 digits are also used for other number systems. Let us learn here the types of number systems.
There are various types of number systems in mathematics. The four most common number system types are:
Now, let us discuss the different types of number systems with examples.
The decimal number system has a base of 10 because it uses ten digits from 0 to 9. In the decimal number system, the positions successive to the left of the decimal point represent units, tens, hundreds, thousands and so on. This system is expressed in decimal numbers . Every position shows a particular power of the base (10).
Example of Decimal Number System:
The decimal number 1457 consists of the digit 7 in the units position, 5 in the tens place, 4 in the hundreds position, and 1 in the thousands place whose value can be written as:
(1×10 3 ) + (4×10 2 ) + (5×10 1 ) + (7×10 0 )
(1×1000) + (4×100) + (5×10) + (7×1)
1000 + 400 + 50 + 7
The base 2 number system is also known as the Binary number system wherein, only two binary digits exist, i.e., 0 and 1. Specifically, the usual base-2 is a radix of 2. The figures described under this system are known as binary numbers which are the combination of 0 and 1. For example, 110101 is a binary number.
We can convert any system into binary and vice versa.
Write (14) 10 as a binary number.
Base 2 Number System Example
∴ (14) 10 = 1110 2
In the octal number system , the base is 8 and it uses numbers from 0 to 7 to represent numbers. Octal numbers are commonly used in computer applications. Converting an octal number to decimal is the same as decimal conversion and is explained below using an example.
Example: Convert 215 8 into decimal.
215 8 = 2 × 8 2 + 1 × 8 1 + 5 × 8 0
= 2 × 64 + 1 × 8 + 5 × 1
= 128 + 8 + 5
In the hexadecimal system, numbers are written or represented with base 16. In the hexadecimal system, the numbers are first represented just like in the decimal system, i.e. from 0 to 9. Then, the numbers are represented using the alphabet from A to F. The below-given table shows the representation of numbers in the hexadecimal number system .
Number System Chart
In the number system chart, the base values and the digits of different number systems can be found. Below is the chart of the numeral system.
Numbers can be represented in any of the number system categories like binary, decimal, hexadecimal, etc. Also, any number which is represented in any of the number system types can be easily converted to another. Check the detailed lesson on the conversions of number systems to learn how to convert numbers in decimal to binary and vice versa, hexadecimal to binary and vice versa, and octal to binary and vice versa using various examples.
With the help of the different conversion procedures explained above, now let us discuss in brief about the conversion of one number system to the other number system by taking a random number.
Assume the number 349. Thus, the number 349 in different number systems is as follows:
The number 349 in the binary number system is 101011101
The number 349 in the decimal number system is 349.
The number 349 in the octal number system is 535.
The number 349 in the hexadecimal number system is 15D
Convert (1056) 16 to an octal number.
Given, 1056 16 is a hex number.
First we need to convert the given hexadecimal number into decimal number
= 1 × 16 3 + 0 × 16 2 + 5 × 16 1 + 6 × 16 0
= 4096 + 0 + 80 + 6
= (4182) 10
Now we will convert this decimal number to the required octal number by repetitively dividing by 8.
8 | 4182 | Remainder |
8 | 522 | 6 |
8 | 65 | 2 |
8 | 8 | 1 |
8 | 1 | 0 |
0 | 1 |
Therefore, taking the value of the remainder from bottom to top, we get;
(4182) 10 = (10126) 8
Therefore,
(1056) 16 = (10126) 8
Convert (1001001100) 2 to a decimal number.
(1001001100) 2
= 1 × 2 9 + 0 × 2 8 + 0 × 2 7 + 1 × 2 6 + 0 × 2 5 + 0 × 2 4 + 1 × 2 3 + 1 × 2 2 + 0 × 2 1 + 0 × 2 0
= 512 + 64 + 8 + 4
Convert 10101 2 into an octal number.
10101 2 is the binary number
We can write the given binary number as,
Now as we know, in the octal number system,
Therefore, the required octal number is (25) 8
Convert hexadecimal 2C to decimal number.
We need to convert 2C 16 into binary numbers first.
2C → 00101100
Now convert 00101100 2 into a decimal number.
101100 = 1 × 2 5 + 0 × 2 4 + 1 × 2 3 + 1 × 2 2 + 0 × 2 1 + 0 × 2 0
= 32 + 8 + 4
Also Check: Binary Operations
When we type any letter or word, the computer translates them into numbers since computers can understand only numbers. A computer can understand only a few symbols called digits and these symbols describe different values depending on the position they hold in the number. In general, the binary number system is used in computers. However, the octal, decimal and hexadecimal systems are also used sometimes.
What is number system and its types.
The number system is simply a system to represent or express numbers. There are various types of number systems and the most commonly used ones are decimal number system, binary number system, octal number system, and hexadecimal number system.
The number system helps to represent numbers in a small symbol set. Computers, in general, use binary numbers 0 and 1 to keep the calculations simple and to keep the amount of necessary circuitry less, which results in the least amount of space, energy consumption and cost.
The base 1 number system is called the unary numeral system and is the simplest numeral system to represent natural numbers.
How to convert 30 8 into a decimal number.
Put your understanding of this concept to test by answering a few MCQs. Click ‘Start Quiz’ to begin!
Select the correct answer and click on the “Finish” button Check your score and answers at the end of the quiz
Visit BYJU’S for all Maths related queries and study materials
Your result is as below
Request OTP on Voice Call
MATHS Related Links | |
Your Mobile number and Email id will not be published. Required fields are marked *
Post My Comment
This is wonderfull
It’s soo helpful and wonderfull
This is very very wonderful.
This is an amazing app
Very helpful 😊👍👍
Very impressive this is.
This is very wonderful app
This app is very helpful for all students and teachers
Very useful it is wonderful app
It’s really help me I m living byjus app
BYJU’S teacher is very intelligent
It is very very helpful. It is amazing and wonderful app
I love it it really helped me a lot
I like this site because it’s very amaizing for learning
Excellent job
Register with byju's & watch live videos.
Academia.edu no longer supports Internet Explorer.
To browse Academia.edu and the wider internet faster and more securely, please take a few seconds to upgrade your browser .
Enter the email address you signed up with and we'll email you a reset link.
IJIRT Journal
In today's world, computer plays a very significant role. It comes in different sizes, shapes and applications and had made our life simpler. The language used by the computers is in the form of binary numbers that is in 0 and 1 form .It is the lowest level that helps the machine to read. Computer usually works in binary but gives answer in decimals and that helps it to save the space. This is important as it simplifies the design of computer and related technologies. That's why it is considered as the perfect numbering system for computer. It is also considered easy and there is no comparison how much easier binary is than decimal. In this, we only need 2 digits, o and 1 while in decimal we need 10 digits that made the process much harder. It is a method of storing simple numbers such as 35 and 380 as pattern of 0's and 1's. Due to its digital nature, computers electronic can easily manipulate numbers stored in binary by treating as "on "and "off." Computers are having circuits that perform the arithmetical operations such as add, subtract, multiply, divide, and do many other things to numbers stored in binary.
Vaibhav Katiyar
MAILE MACHETHE
Giuliano Donzellini
The representation of numbers is essential for the digital logic design. In this chapter, positional number systems (decimal, binary, octal, hexadecimal), BCD and Gray codes are presented together with the rules for the conversion between numbers encoded in different bases and the representations of negative numbers. Then, the rules for the arithmetic operations and the circuits that execute them are presented. The addition of binary number is examined with particular attention, since it is the operation at the basis of all computational circuits. Alphanumeric codes and the concept of parity for error detection complete the chapter.
chaganti pavan
Encyclopedia of Information Systems
Behrooz Parhami
International Journal of Computer Applications
anushree sah
Mugunthan V
Aditya Garg
Loading Preview
Sorry, preview is currently unavailable. You can download the paper by clicking the button above.
Shahid Latif CS/IT
salah mohamed
Agata Emilia Witek
Journal of Verbal Learning and Verbal Behavior
vivek kumar
Bima Anugrah Saputra
Haitham Khallaf
Prashantha HS
Alfie Parkin
Jorge Gutiérrez Gil
jiajie zhang
Fahad Masood
Manu V. Devadevan
Rajdeep Chowdhury
Medium.com (Published in Nerd for Tech)
Robert Hieger
Cognitive, Affective, & Behavioral Neuroscience
Hemant Agrawal
Armands Strazds
Delfim F. M. Torres
The Mathematics Enthusiast
Daniel Lande
Amelia Carolina Sparavigna
Lecture Notes in Computer Science
Amr Elmasry
Juan Elías Millas Vera
Download presentation
We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
Published by Naomi Mason Modified over 8 years ago
Similar presentations
Number Systems and Codes
DATA REPRESENTATION CONVERSION.
Number Systems Benchmark Companies Inc PO Box Aurora CO
Binary & Decimal numbers = 3* * *10 + 5*1 = 3* * * *10 0 Decimal system: Ten digits: 0,1,2,3,…,9 Example:
1 Number Systems. 2 Numbers Each number system is associated with a base or radix – The decimal number system is said to be of base or radix 10 A number.
Chapter 1 Number Systems and Codes William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper Saddle.
Roman Numerals. Roman Numerals - Past and Present Romans used them for trading and commerce. When Romans learned to write they needed a way to write.
Number Systems and Arithmetic
© Copyright 2000 Indiana University Board of Trustees Proficiency Quiz Study Guide Note: The following slides are provided courtesy of Dr. Bob Orr (Computer.
Number Systems and Codes In PLC
1 Lecture 2: Number Systems Binary numbers Base conversion Arithmetic Number systems Sign and magnitude Ones-complement Twos-complement Binary-coded.
Data Representation in Computers. Data Representation in Computers/Session 3 / 2 of 33 Number systems The additive approach – Number earlier consisted.
Converting binary to decimal decimal to binary
Revision Introductory Lesson
Chapter 1 Number Systems and Codes 1. Outline 1. NUMBER SYSTEMS AND CODES 2. DIGITAL ELECTRONIC SIGNALS AND SWITCHES 3. BASIC LOGIC GATES 4. PROGRAMMABLE.
Binary and Hexadecimal Numbers
Number Systems.
IT-101 Section 001 Lecture #3 Introduction to Information Technology.
1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.
Number systems: binary, decimal, hexadecimal and octal. Conversion between various number systems Number systems: binary, decimal, hexadecimal and octal.
© 2024 SlidePlayer.com Inc. All rights reserved.
Number system conversions lecture l2.2 section 2.3 number system conversions hex, binary, and octal to decimal binary hex binary octal hex octal ... – powerpoint ppt presentation.
PowerShow.com is a leading presentation sharing website. It has millions of presentations already uploaded and available with 1,000s more being uploaded by its users every day. Whatever your area of interest, here you’ll be able to find and view presentations you’ll love and possibly download. And, best of all, it is completely free and easy to use.
You might even have a presentation you’d like to share with others. If so, just upload it to PowerShow.com. We’ll convert it to an HTML5 slideshow that includes all the media types you’ve already added: audio, video, music, pictures, animations and transition effects. Then you can share it with your target audience as well as PowerShow.com’s millions of monthly visitors. And, again, it’s all free.
About the Developers
PowerShow.com is brought to you by CrystalGraphics , the award-winning developer and market-leading publisher of rich-media enhancement products for presentations. Our product offerings include millions of PowerPoint templates, diagrams, animated 3D characters and more.
Dec 20, 2019
650 likes | 820 Views
Number Systems. CNS 3320 – Numerical Software Engineering. Fixed-size Number Systems. Fixed-point vs. Floating-point Fixed point systems fix the maximum number of places before and after the decimal Integers are a fixed-point system with 0 decimals Advantage of Fixed-point systems?
Number Systems CNS 3320 – Numerical Software Engineering
Fixed-size Number Systems • Fixed-point vs. Floating-point • Fixed point systems fix the maximum number of places before and after the decimal • Integers are a fixed-point system with 0 decimals • Advantage of Fixed-point systems? • Disadvantage?
Advantages of fixed-point • They are evenly spaced within their range of values • Floating-point numbers are not! • So they behave like integers • Operations are truncated to a fixed decimal point • Additions and subtractions within range are exact • No memory is wasted storing exponents • You get dependable accuracy • Moderate absolute error only in last digit (* and /) • Uniform throughout the entire system
Disadvantages of fixed-point • In a word: range • There aren’t enough numbers covered • The values needed in scientific computation typically cover a range beyond what is feasible to store in a fixed-point machine word or double-word • But we’d still like to fit numbers into machine units like fixed-point systems can • Like words and double-words (registers) • For speed
Fixed-point Example • Consider the following fixed-point number system, F1: • base = 10 • precision = 4 • decimals = 1 • F1 has 19,999 evenly-spaced numbers: • {-999.9, -999.8, …, 0, … 999.8, 999.9} • How many bits are needed to store such a number? • 1 for sign • 16 for mantissa (because each digit requires 4 bits) • Note: we don’t convert the entire number to binary, just a digit at a time (BCD) • We’re using base 10, not 2! • 17 total (more efficient encodings exist)
Types of ErrorTake Two • Absolute vs. relative • Absolute = |x – y| • Relative = |x – y| / |x| • Percentage error (preferred) • Consider the relative error of representing x = 865.54 in F1: • (865.54 – 865.5) / 865.54 = .00005 • Now, how about .86554: • (.86554 - .9) / .86554 = .04 • The relative error depends on the number of significant digits we can have, which depends on the magnitude of the number using fixed-point • Bummer
Floating-point Number Systems • Use “scientific notation” • They store a “significand” (aka “mantissa” or “coefficient”) of a fixed number of digits, along with an exponent and a sign • The number of digits stored does not depend on the magnitude of the number • You merely adjust the exponent • Which “floats” the decimal
A Toy Floating-point System • Consider the floating-point system F2: • base = 10 • precision = 4 • exponent range [-2, 3] • This system represents numbers of the form:
The Numbers in F2 • A sample: • 9999 (= 9.999 x 103) (largest magnitude) • - 80.12 • .0001 • .00002 (= 0.002 x 10-2) • 0 • 0.001 x 10-2 = .00001 (smallest positive magnitude)
The Numbers in F2 • Are not evenly spaced • Why? • How many numbers are there? • We can’t tell easily right now, but an upper bound is: • 104 x 6 x 2 = 120,000 (It’s actually 109,999) • How many bits are necessary to store such numbers? • 1 for sign, 3 for exponent (0->5 maps to -2->3), 16 for mantissa (4 x 4) • 20 total
Storage Efficiency • With 17 bits we can store 19,999 fixed-point numbers • Approx. 1,141 numbers per bit • With 20 bits we can store 109,999 floating-point numbers • Approx. 5,500 numbers per bit • Almost a 5-fold increase (4.82)!
Rounding Error in F2 • The absolute error depends on the exponent • Because the numbers aren’t evenly spaced • Consider the relative error in approximating 865.54, then .86554: • (865.54 – 865.5) / 865.54 = .00005 • (.86554 – .8655) / .86554 = .00005 • Depends only on digits, not the magnitude
Different Bases • Consider representing .1 in a base-2 system • 1/10 = 1/10102 • Use long division : .000110011001100…1010 | 1.000000000000000 • 1/10 is an infinite (repeating) decimal in base 2! • This is why 1 - .2 - .2 - .2 - .2 - .2 != 0 in a binary floating-point system
Formal Definition of FP Systems • A Floating-number systems is the set of numbers defined by the following integral parameters: • A base, B • A precision, p • A minimum exponent, m (usually negative) • A maximum exponent, M
Unnormalized FP Systems • Numbers of the form:d0.d1d2d3…dp-1 x Bewhere 0 <= di < B for all the iand m <= e <= M • Not all such numbers are unique • We’ll overcome that problem
A Sample FP System • Consider F3: • B = 2 • P = 3 • m = -1, M = 1 • List the numbers of F3 • What is the cardinality of F3? • What are the different spacings between the numbers of F3?
The Numbers of F38 bit patterns – only 16 unique numbers
The Problem with Unnormalized Systems • There are multiple ways to represent the same number • 0.1 x 2 == 1.0 x 2-1 • This leads to implementation inefficiencies • Difficult to compare numbers • Inefficient algorithms for floating-point arithmetic • Different bit patterns yield same results
Normalized Systems • Require that d0 not be zero • Solves the duplicate problem • But other problems arise • The number 0 is not representable! • We’ll solve this later • Added bonus for binary • The leading digit must be 1 • So we won’t store it! We’ll just assume it’s there • This increases the cardinality of the system vs. unnormalized
A Normalized FP System • F4 (same parameters as F3) • B = 2 • p = 3 (but it will logically be 4) • m = -1, M = 1 • If we explicitly store d0, we only get 24 distinct numbers • Because the first bit must be 1, leaving 2 bits free • But we will assume d0 = 1 • And not store it! (Only works for base = 2) • Giving 4 bits altogether (the first being 1)
The Numbers of F48 bit patterns – 24 unique numbers (but different range vs. F3)
Properties of FP Systems • Consider the system (B, p, m, M) • Numbers are of the form: • d0.d1d2…dp-1 x Be, m <= e <= M, d0 > 0 • What is the spacing between adjacent numbers? • It is the value contributed by the last digit: • 0.00…1 x Be = B1-p x Be = B1-p+e • This is B1-p for the interval [1.0, B1) • Increases going right; decreases going left
Relative Spacing in FP Systems • As we mentioned before, it’s fairly uniform throughout the system • Consider the range [Be, Be+1]: • {Be, Be+B1-p+e, Be+2B1-p+e, … Be+1-B1-p+e, Be+1} • The relative spacing between adjacent numbers is: • Between B-p and B1-p (a factor of B) • Called the system “wobble” • The second reason why 2 is the best base for FP systems! • It’s the smallest possible wobble • Independent of e!
Machine Epsilon • A measure of the “granularity” of a FP system • Upper bound of relative spacing (which affects relative roundoff error) of all consecutive numbers • We just computed this: ε = B1-p • It is also the spacing between 1.0 and its neighbor the right (see next slide) • We will use ε to tune our algorithms to the FP system being used • We can’t require smaller relative errors than ε • See epsilon.cpp
Computing Machine Parameters • They’re already available via <limits> • But they didn’t used to be • And you may not be using C/C++ forever • It is possible to determine by programming what B, p, and ε are! • See parms2.cpp
The “Most Important Fact” About Floating-point Numbers • Recall that the spacing between numbers in [Be, Be+1] is B1-p+e = B1-pBe = εBe • If |x| is in [Be, Be+1], then Be <= |x| <= Be+1=> spacing = εBe <= ε|x| <= εBe+1=> εBe-1 <= ε|x|/B <= εBe = spacing=> ε|x|/B <= spacing at x <= ε|x| • The last line is the fact to remember • We’ll use it in designing algorithms
Error in Floating-point Computations • Due to the fixed size of the FP system • Roundoff error occurs because the true answer of a computation may not be in the FP system • Cancellation in subtraction is also nasty problem • Errors can propagate through a sequence of operations • May actually increase or decrease
Measuring Roundoff Error • A single FP computation may result in a number between two consecutive FP numbers • The FP number returned depends on the Rounding Mode • Round to nearest (the most accurate) • Round down (toward negative infinity) • Round up (toward positive infinity) • Round toward zero
Measuring Roundoff Error(continued) • The absolute error of a FP computation is at least the size of the interval between adjacent numbers • aka “one unit in the last place” • Abbreviated as “ulp” • ulp(x) denotes the spacing of the current interval • We already derived this • ulp(x) = B1-p+e = B1-pBe = εBe • We already observed that the relative spacing is fairly uniform throughout the FP system • Within the system “wobble” • With larger numbers, the absolute error will, alas, be larger • Dem’s da breaks
Measuring Roundoff Error(continued) • Sometimes, instead of relative error, we’ll ask, “by how many ulps do two numbers differ?” • Same as asking: “How many floating-point intervals are there between the two numbers” • If we’re only off by a few ulps (intervals), we’re happy • ulps(x,y) is defined as the number of floating-point intervals between numbers • If the numbers have different signs, or if either is 0, then ulps(x,y) is ∞
ulps(x, y) • Recall F4: • B = 10, p = 4, m = -2, M = 3 • Calculate ulps(.99985, 1.0013) • These numbers bracket the following consecutive numbers of F4: • .9999, 1.000, 1.001 • Giving two complete intervals + two partial intervals = .5 + 1 + 1 + .3 = 2.8 ulps • In program 1 we will approximate this • We will get either 2 or 3, depending on how the actual numbers round
Example of Tuning an Algorithm • Suppose someone writes a root-finding routine using the bisection method: • Start with 2 x-values, a and b, that bracket a root • i.e., f(a) and f(b) have different signs • Replace a or b by the midpoint of [a,b] • So that the new f(a) and f(b) still have different signs • Stop when |b – a| < some input tolerance • See bisect1.cpp
The Problem • The input tolerance may be unrealistically small • It may be smaller than the spacing between adjacent floating-point numbers in the neighborhood of the solution • Endless loop! • Solution: • Reset tolerance to max(tol, ε|a|, ε|b|) • Represents the spacing between adjacent numbers in the neighborhood of the solution (see bisect2.cpp) • Often we’ll use relative error instead • Bound it by ε
Cancellation • Occurs when subtracting two nearly equal numbers • The leading digits will be identical • They cancel each other out (subtract to 0) • Most of the significant digits can be lost • Subsequent computations have large errors • Because the roundoff has been promoted to a more significant digit position • The problem with the quadratic example • Because b and sqrt(b2-4ac) were very close • Sometimes b2 and 4ac can be close, too • Not much we can do about that (use even higher precision, if possible, or try case-by-case tricks)
Differing Magnitudes • When very large and very small numbers combine • Sometimes not a problem • Smaller numbers are ignored (treated as 0) • Fine if the number is growing • But consider the exp(-x) case • Initial terms in the Taylor series are large • Their natural roundoff (in their last digit) is in a higher-valued digit than the final true answer • All digits are bad! • Made a difference because we were subtracting • The running sum was ultimately decreasing
Potential Overflow • Adding two numbers can result in overflow • IEEE systems have a way of “handling” this • But it’s best to avoid it • Example: (a + b) / 2 in bisection • Numerator can overflow! • Alternative: a + (b-a)/2 • Also checking f(a)*f(c) < 0 can overflow • Try f(a)/fabs(f(a))*f(c), or write a sign function
Error Analysis • We know that the floating-point approximation to a number x has relative error < ε • Rewrite this as:
Error in Adding 2 Numbers • For simplicity, we’ll assume the relative roundoff error of each single operation is the same δ (they’re all bounded by ε anyway):
Now compute the relative error: So the error of the sum is roughly the sum of the errors (2δ) plus a hair, but the two errors could be nice and offset each other a little.
Now consider the sum x1 + x2 + x3: • We’ll even ignore the initial errors in approximating the original numbers • Let’s just see what addition itself does when repeated • We’ll again call each relative error δ The smaller x1 and x2 are the better. Rule of thumb: add smallest to largest when possible.
Error Propagation Example • The mathematical nature of a formula can cause error to grow or to diminish • It’s important to examine how errors may propagate in iterative calculations • Example:
Integrating by parts, we end up with a recurrence relation:
The initial error in E1 (call it δ) gets magnified • By a factor of n! (n-factorial)
Solution • Rewrite the recurrence backwards, and use an initial guess for En • The initial guess doesn’t have to be too close, as you’ll see (analysis on next slide) • See en.cpp
The initial error, δ, gets dampened with each iteration.
Summary • Floating-point is better than fixed-point for: • Range of available numbers • Storage efficiency • Bounded relative error • Floating-point is less resource intensive than using arbitrary precision algorithms • Floating-point is subject to roundoff error • Because the set of numbers is finite • The absolute error grows with the magnitude • Because numbers aren’t evenly spaced (gap widens) • But the relative error stays bounded • Within the system wobble
Summary • Normalized systems are preferred over unnormalized • Unique bit patterns for distinct numbers simplifies algorithms • Formulas that describe the behavior of the system are easier to derive • Storage optimization with binary • Machine epsilon is the fundamental measure of a FP system • Upper bound on relative roundoff error • Used to tune algorithms
Number Systems. decimal number : 7397=7×10 3 +3×10 2 +9×10 1 +7×10 0 a 4 a 3 a 2 a 1 a 0 . a -1 a -2 = a 4 ×10 4 +a 3 ×10 3 +a 2 ×10 2 +a 1 ×10 1 +a 0 ×10 0 +a -1 x10 -1 +a -2 ×10 -2 a i : coefficient 10 : base or radix a 4 : most significant bit ( msb )
986 views • 37 slides
Number Systems. Decimal, Binary, and Hexadecimal. Base-N Number System. Base N N Digits: 0, 1, 2, 3, 4, 5, …, N-1 Example: 1045 N Positional Number System . Digit d o is the least significant digit (LSD). Digit d n -1 is the most significant digit (MSD). Decimal Number System.
1.1k views • 57 slides
Number Systems. Lecture L2.1 Sections 2.1-2.2. Number Systems. Counting in Binary Hexadecimal and Octal Numbers Positional Notation Fractional Numbers. Counting in Binary. BINARY HEX. Position: 8 4 2 1 . 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5
590 views • 16 slides
Number Systems. Tally, Babylonian, Roman And Hindu-Arabic.
398 views • 15 slides
Number Systems. Computing Theory – F453. Data Representation. Data in a computer needs to be represented in a format the computer understands. This does not necessarily mean that this format is easy for us to understand. Not easy, but not impossible!
598 views • 14 slides
Number Systems . Different number systems Representation of numbers in binary Conversion between decimal and binary, Conversion between binary and hexadecimal Use of subscripts 2, 10 and 16 for bases. Number Systems . Decimal number system – Base 10 = 1, 2 ,3 4, 5, ect ..
1.49k views • 44 slides
Number Systems. Decimal number system Binary number system Hexadecimal number system Converting Negative numbers Character representation. Decimal (base 10). Uses positional representation Each digit corresponds to a power of 10 based on its position in the number
779 views • 22 slides
Number Systems. Character Representation. ASCII American Standard Code for Information Interchange Standard encoding scheme used to represent characters in binary format on computers 7-bit encoding, so 128 characters can be represented
1.53k views • 58 slides
Number Systems. Benchmark Companies Inc PO Box 473768 Aurora CO 80047. Number Systems:. Decimal Binary Hexadecimal Octal Binary Coded Decimal (BCD). 10 digits: 0 1 2 3 4 5 6 7 8 9 Counting beyond 9 requires additional place values to begin. This will go on to infinity: i.e.
550 views • 15 slides
Number Systems. Part 2. Counting in Binary. When the symbols for the first digit are exhausted, the next-higher digit (to the left) is incremented, and counting starts over at 0. Byte. The byte is a unit of digital information in computing and telecommunications.
279 views • 11 slides
Number systems. Converting numbers between binary, octal, decimal, hexadecimal (the easy way). Small numbers are easy to convert. But it helps to have a system for converting larger numbers to avoid errors. 12 10 = C 16. 5 10 -> 101 2. 1100 2 = 12 10. DEMONSTRATE.
1.01k views • 29 slides
Number Systems. Mohammad Reza Najafi Main Ref: Computer Arithmetic Algorithms and Hardware Designs ( Behrooz Parhami ). Spring 2010. Class presentation for the course: “ Custom Implementation of DSP Systems ”
540 views • 21 slides
Number Systems. Ron Christensen CIS 121. Positional Notation. “Positional Notation” Value of a digit depends on the position of the digit Positional Notation permits unique representation of Integers. Positional Notation. Decimal numbers are “Base 10 positional notation”
1.06k views • 25 slides
Number Systems. A Brief History of Numbers. From Gonick, Cartoon Guide to Computer Science. Prehistoric Ledgers. Elaborate Finger Counting. Ancient Number Systems. Positional Number Systems. Number Systems. Prehistory Unary, or marks: /////// = 7 /////// + ////// = /////////////
1.25k views • 61 slides
Number Systems. Why binary numbers?. Digital systems process information in binary form. That is using 0s and 1s (LOW and HIGH, 0v and 5v). Digital designer should be familiar with: binary math. Conversion between binary and other number systems.
1.25k views • 45 slides
Decimal | Binary | Hexadecimal. Number Systems. Revision Introductory Lesson. In this topic …. Decimal System. Binary System. Hexadecimal System. Conversions. Conversions …. Decimal Binary. Binary Decimal. Binary Hexadecimal. Decimal Hexadecimal. Hexadecimal Binary.
325 views • 11 slides
Number systems. Q1.Simplify (21^4) - (343^2). Q2.The unit digit of 25 x 17 x 231 x 43 x 59a is 5. How many possible numbers can come in place of a?. Q3.Two pencils are 24cm and 42cm long. If we have to make them of equal size, then the minimum number of similar pencils is.
315 views • 24 slides
Number Systems. TYPES OF NUMBERS i ) How to find if a number is prime or not ii) Conversion of a decimal number to fraction DIVIDIBILITY RULE POWER CYCLE REMAINDER THEOREM FACTORS AND MULTIPLES i ) Number of factors ii) Sum of factors iii) Product of factors HCF & LCM AP & GP.
915 views • 53 slides
Number Systems. Number Representation. Every number like ‘ a’ can be represented as. Common Number Systems. Quantities/Counting. Conversion Among Bases. The possibilities:. Decimal. Octal. Binary. Hexadecimal. The others to Decimal. Decimal to Decimal (just for fun). Decimal. Octal.
968 views • 72 slides
COMMENTS
1.1: The Real Number System. Sets. A set is a collection of objects or numbers, each of which are called elements or members of the set. The elements of a set are written within braces, so that. A = {4, 5, 6} Tells us that set A consists of the numbers 4, 5, and 6. We can also write 4 ∊A, which is read as "4 belongs to A," or "4 is a ...
Real: A number with a value that can be put on a number line. Imaginary: The square root of a negative number. Victoria and Sarah. Real Number: Any number that has a value and can be put on the number line. Irrational Number: A number that does that does not have a definitive end and the next digit is not predictive.
Introduction to Number Systems. An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Download presentation by click this link.
Download ppt "Number System." Introduction A set of values used to represent different quantities For example, a number student can be used to represent the number of students in the class Digital computer represent all kinds of data and information in binary numbers Includes audio, graphics, video, text and numbers Total number of digits used ...
• 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
The hexadecimal number system, also known as base-16, uses sixteen digits (0-9 and A-F) to represent numbers. Each digit's value is determined by its position in the number. Hexadecimal numbers are commonly used in computer programming, particularly for representing memory addresses and color codes.
Contains easy-to-edit graphics such as graphs, maps, tables, timelines and mockups. Includes 500+ icons and Flaticon's extension for customizing your slides. Designed to be used in Google Slides, Canva, and Microsoft PowerPoint. 16:9 widescreen format suitable for all types of screens. Includes information about fonts, colors, and credits of ...
The Binary Number System The binary number system is also a positional numbering system. Instead of using ten digits, 0 - 9, the binary system uses only two digits, 0 and 1. Example of a binary number and the values of the positions: 1001 101 26 25 24 23 22 21 20. Converting from Binary to Decimal 101 26 25 24 23 22 21 20 20 1 21 = 2 25 = 32 22 ...
Why Teach the Real Number System? Teaching the real number system is crucial because it helps students understand a variety of math concepts and operations. It enables them to perform arithmetic, grasp geometric principles, and eventually delve into more advanced areas like algebra and calculus. Familiarity with the real number system also ...
Learn what is a number system in Maths, the different types of number systems (decimal, binary, octal, hexadecimal) and how to convert them. See examples, charts, video and FAQs on number system.
That's why it is considered as the perfect numbering system for computer. It is also considered easy and there is no comparison how much easier binary is than decimal. In this, we only need 2 digits, o and 1 while in decimal we need 10 digits that made the process much harder. It is a method of storing simple numbers such as 35 and 380 as ...
Decimal Number system • Decimal number system contains 10 digits: 0,1,2,3,4,5,6,7,8,9; and that is why its base or radix is 10. • Here radix means total number of digits used in any system. Decimal Number System • The decimal number system is a positional number system. • Example: • 5 6 2 1 1 X 100 = 1 • 103 102 101 100 2 X 101 = 20 ...
1 Presentation on Number System. 2 Types of Number System Non-Positional number system. 3 Non-Positional Number System Symbol represents the value regardless of its position. Difficult to perform arithmetic operation. For example:-I, II, III, IV, V, VI, VII ...
Title: Number systems Last modified by: cse Document presentation format: On-screen Show Other titles: Times New Roman Arial Wingdings Tahoma Σψμβολ ヒラギノ角ゴ Pro W3 Symbol Axis Lecture 2: Number Systems Positional number notation Base conversion from binary Base conversion from decimal Base conversion from decimal Arithmetic Negative numbers Sign and magnitude Sign and ...
Presentation on number system - Free download as Powerpoint Presentation (.ppt / .pptx), PDF File (.pdf), Text File (.txt) or view presentation slides online. The document discusses different number systems including binary, octal, decimal, and hexadecimal. Binary uses the digits 0 and 1 and place value to represent numbers. Octal uses base 8 with digits 0-7, where 1 octal digit is equivalent ...
Presentation Transcript. Number System and Conversion 350151- Digital Circuit ChoopanRattanapoka. Introduction • Many number systems are in use in digital technology. The most common are : • Decimal (Base 10) • Binary (Base 2) • Octal (Base 8) • Hexadecimal (Base 16) • The decimal system is the number system that we use everyday.
About This Presentation. Title: Number System Conversions. Description: Number System Conversions Lecture L2.2 Section 2.3 Number System Conversions Hex, Binary, and Octal to Decimal Binary Hex Binary Octal Hex Octal ... - PowerPoint PPT presentation. Number of Views: 715. Avg rating:3.0/5.0. Slides: 13.
Number Systems. CNS 3320 - Numerical Software Engineering. Fixed-size Number Systems. Fixed-point vs. Floating-point Fixed point systems fix the maximum number of places before and after the decimal Integers are a fixed-point system with 0 decimals Advantage of Fixed-point systems?