This document discusses binary arithmetic and how numbers are represented in binary. It covers:
1. Why binary representation is used in digital circuits, as hardware can only deal with binary digits of 0 and 1.
2. Different systems for representing signed integers in binary, including signed magnitude, 1's complement, and 2's complement representations. 2's complement is preferred as it has a unique zero value.
3. Arithmetic operations like addition, subtraction, and overflow handling in binary systems with a finite number of bits using the different signing methods.
This document discusses various data representation systems used in computers, including:
- Binary, decimal, hexadecimal, and octal number systems. Binary uses two digits (0,1) while other systems use bases of 10, 16, and 8 respectively.
- Units of data representation such as bits, bytes, kilobytes, megabytes and gigabytes which are used to measure computer storage.
- Methods for converting between number systems, including dividing numbers into place values and multiplying digits by their place values.
- Special codes like Binary Coded Decimal (BCD) which represents each decimal digit with 4 binary bits.
- Binary arithmetic operations and how addition works the same in any number system by following
The document discusses different number systems including binary, decimal, and hexadecimal. It explains that binary uses two digits (0,1), decimal uses ten digits (0-9), and hexadecimal uses sixteen digits (0-9 plus A-F). All of these systems are positional number systems where the value of each digit depends on its place value. The document then discusses binary addition and subtraction, two's complement representation for signed numbers, hexadecimal addition, and concepts like nibbles and bytes.
The document discusses various number systems including decimal, binary, hexadecimal, octal, and floating point. It explains how each system uses a base or radix to assign weighted values to digits and how to convert between number systems. Key topics covered include binary addition and subtraction, signed numbers represented with 2's complement, and hexadecimal and octal numbering systems.
This document discusses data representation and number systems in computers. It covers binary, octal, decimal, and hexadecimal number systems. Key points include:
- Data in computers is represented using binary numbers and different number systems allow for more efficient representations.
- Converting between number systems like binary, octal, decimal, and hexadecimal is explained through examples of dividing numbers and grouping bits.
- Signed numbers can be represented using complement representations like one's complement and two's complement, with subtraction implemented through addition of complements. Fast methods for calculating two's complement are described.
The document discusses different number systems including binary, decimal, hexadecimal, and octal. It explains that number systems have a base, which is the number of unique digits used, and provides examples of how to convert between number systems. Binary coded decimal is also introduced as a way to efficiently store decimal numbers using a binary representation where each decimal digit is stored in 4 bits. Algorithms for binary addition and logic gates are briefly covered.
This document introduces number systems such as binary, decimal, octal and hexadecimal. It discusses how numbers are represented in these different systems using place values that are powers of the respective base. Decimal uses base 10, binary uses base 2, octal uses base 8 and hexadecimal uses base 16. Conversion between these number systems involves expressing the number in its place value form and then summing the place values weighted by the respective digits. The document provides examples of converting between decimal, binary, octal and hexadecimal numbers.
This document discusses various data representation systems used in computers, including:
- Binary, decimal, hexadecimal, and octal number systems. Binary uses two digits (0,1) while other systems use bases of 10, 16, and 8 respectively.
- Units of data representation such as bits, bytes, kilobytes, megabytes and gigabytes which are used to measure computer storage.
- Methods for converting between number systems, including dividing numbers into place values and multiplying digits by their place values.
- Special codes like Binary Coded Decimal (BCD) which represents each decimal digit with 4 binary bits.
- Binary arithmetic operations and how addition works the same in any number system by following
The document discusses different number systems including binary, decimal, and hexadecimal. It explains that binary uses two digits (0,1), decimal uses ten digits (0-9), and hexadecimal uses sixteen digits (0-9 plus A-F). All of these systems are positional number systems where the value of each digit depends on its place value. The document then discusses binary addition and subtraction, two's complement representation for signed numbers, hexadecimal addition, and concepts like nibbles and bytes.
The document discusses various number systems including decimal, binary, hexadecimal, octal, and floating point. It explains how each system uses a base or radix to assign weighted values to digits and how to convert between number systems. Key topics covered include binary addition and subtraction, signed numbers represented with 2's complement, and hexadecimal and octal numbering systems.
This document discusses data representation and number systems in computers. It covers binary, octal, decimal, and hexadecimal number systems. Key points include:
- Data in computers is represented using binary numbers and different number systems allow for more efficient representations.
- Converting between number systems like binary, octal, decimal, and hexadecimal is explained through examples of dividing numbers and grouping bits.
- Signed numbers can be represented using complement representations like one's complement and two's complement, with subtraction implemented through addition of complements. Fast methods for calculating two's complement are described.
The document discusses different number systems including binary, decimal, hexadecimal, and octal. It explains that number systems have a base, which is the number of unique digits used, and provides examples of how to convert between number systems. Binary coded decimal is also introduced as a way to efficiently store decimal numbers using a binary representation where each decimal digit is stored in 4 bits. Algorithms for binary addition and logic gates are briefly covered.
This document introduces number systems such as binary, decimal, octal and hexadecimal. It discusses how numbers are represented in these different systems using place values that are powers of the respective base. Decimal uses base 10, binary uses base 2, octal uses base 8 and hexadecimal uses base 16. Conversion between these number systems involves expressing the number in its place value form and then summing the place values weighted by the respective digits. The document provides examples of converting between decimal, binary, octal and hexadecimal numbers.
Number systems - Efficiency of number system, Decimal, Binary, Octal, Hexadecimalconversion
from one to another- Binary addition, subtraction, multiplication and division,
representation of signed numbers, addition and subtraction using 2’s complement and I’s
complement.
Binary codes - BCD code, Excess 3 code, Gray code, Alphanumeric code, Error detection
codes, Error correcting code.Deepak john,SJCET-Pala
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
Reviewing number systems involves understanding various ways in which numbers can be represented and manipulated. Here's a brief overview of different number systems:
Decimal System (Base-10):
This is the most common number system used by humans.
It uses 10 digits (0-9) to represent numbers.
Each digit's position represents a power of 10.
For example, the number 245 in decimal represents (2 * 10^2) + (4 * 10^1) + (5 * 10^0).
Binary System (Base-2):
Used internally by almost all modern computers.
It uses only two digits: 0 and 1.
Each digit's position represents a power of 2.
For example, the binary number 1011 represents (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0) in decimal, which equals 11.
Octal System (Base-8):
Less commonly used, but still relevant in some computer programming contexts.
It uses eight digits: 0 to 7.
Each digit's position represents a power of 8.
For example, the octal number 34 represents (3 * 8^1) + (4 * 8^0) in decimal, which equals 28.
Hexadecimal System (Base-16):
Widely used in computer science and programming.
It uses sixteen digits: 0 to 9 followed by A to F (representing 10 to 15).
Each digit's position represents a power of 16.
Often used to represent memory addresses and binary data more compactly.
For example, the hexadecimal number 2F represents (2 * 16^1) + (15 * 16^0) in decimal, which equals 47.
Each number system has its own advantages and applications. Decimal is intuitive for human comprehension, binary is fundamental in computing due to its simplicity for electronic systems, octal and hexadecimal are often used for human-readable representations of binary data in programming, particularly when dealing with memory addresses and byte-oriented data.
Understanding these number systems is essential for various fields such as computer science, electrical engineering, and mathematics, as they provide different perspectives on how numbers can be represented and manipulated.
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
1. NUMBER SYSTEM.pptx Computer Applications in PharmacyVedika Narvekar
B.Pharm SEM 2 Binary number system, Decimal number system, Octal
number system, Hexadecimal number systems, conversion decimal to
binary, binary to decimal, octal to binary etc, binary addition, binary
subtraction – One’s complement ,Two’s complement method, binary
multiplication, binary division
Introduction to Information Technology Lecture 2MikeCrea
Number Systems
Types of number systems
Number bases
Range of possible numbers
Conversion between number bases
Common powers
Arithmetic in different number bases
Shifting a number
The document discusses different data types including binary numbers, unsigned and signed integers represented in binary, floating point numbers, and logical operations on bits. It explains binary addition and subtraction, overflow, and different representations for signed integers including sign-magnitude, one's complement, and two's complement. It also covers converting between decimal and binary numbers.
The document discusses number systems and conversions between different bases. It explains that computers use the binary system with bits representing 0s and 1s. 8 bits form a byte. Decimal, binary, octal and hexadecimal numbering systems are covered. Methods for converting between these bases are provided using division and remainders or grouping bits. Common powers and units used in computing like kilo, mega and giga are also defined. Exercises on converting values between the different number systems are included.
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
In two's complement notation:
- The most significant bit represents the sign, with 0 indicating positive and 1 indicating negative.
- The remaining bits represent the magnitude, with the value determined by their place values.
- Negative numbers are calculated by taking the two's complement of the corresponding positive number.
- Two's complement notation allows for simple addition and subtraction operations on signed binary numbers.
Computer Representation of Numbers and.pptxTemesgen Geta
- Computers use binary to represent numbers, where each digit is either a 1 or 0. Real numbers are approximated using floating point representation with sign, mantissa, and exponent fields.
- Integers can be stored by reserving bits for the magnitude and using the first bit to indicate sign (sign-magnitude representation) or by using two's complement representation where the most significant bit indicates sign.
- When storing numbers in memory, multiple bytes are typically used to represent integers or floating point values to support a wider range of numbers.
This document summarizes different number systems used in computing including binary, octal, decimal, and hexadecimal. It explains how to convert between these number systems using theorems about their bases. Key topics covered include binary arithmetic, signed and unsigned integer representation, and how floating point numbers and characters are stored in binary format. Conversion charts are provided for binary to octal and hexadecimal. Representations of integers, characters, and floating point numbers in binary are also summarized.
The document discusses various number systems including decimal, binary, and signed binary numbers. It provides the following key points:
1) Decimal numbers use ten digits from 0-9 while binary only uses two digits, 0 and 1. Binary numbers represent values through place values determined by powers of two.
2) Conversions can be done between decimal and binary numbers through either summing the place value weights or repeated division/multiplication by two.
3) Binary arithmetic follows simple rules to add, subtract, multiply and divide numbers in binary representation.
4) Signed binary numbers use a sign bit to indicate positive or negative values, with the most common 2's complement form representing negative numbers as the 2's
This document provides an overview of digital electronics and number systems. It discusses how digital computer systems use discrete units of data represented by binary numbers. It then describes different number systems like decimal, octal, binary and hexadecimal. Key concepts covered include place value, conversion between number bases, binary arithmetic operations, signed number representations using ones' and twos' complement, and finite number representation using bits. Parity codes for error detection in data transmission are also summarized. Finally, the document discusses ASCII codes and how they are used to represent characters for data transmission.
Here are the answers to the assignment questions:
1. No overflow occurs when adding 00100110 + 01011010 in two's complement. The sum is 10001000.
2. See textbook 1 problem 2-1.c for the solution.
3. See textbook 1 problem 2-11.c for the solution.
4. See textbook 1 problem 2-19.c for the solution.
5. The decimal equivalent of the hexadecimal number 1A16 is 2610.
This document discusses number representation systems used in computers, including binary, decimal, octal, and hexadecimal. It provides examples of converting between these different bases. Specifically, it covers:
1) Converting between decimal, binary, octal, and hexadecimal using positional notation.
2) Signed integer representation in binary, including sign-magnitude, one's complement, and two's complement. Examples are given of converting positive and negative decimals to these binary representations.
3) Storing integer, character, and floating point numbers in binary. Twos complement is described as the most common method for signed integer representation.
This document discusses number representation systems used in computers, including binary, decimal, octal, and hexadecimal. It provides examples of converting between these different bases. Specifically, it covers:
1) Converting between decimal, binary, octal, and hexadecimal using positional notation and place values.
2) Representing signed integers in binary using ones' complement and twos' complement notation.
3) Tables for converting binary numbers to octal and hexadecimal using place values of each base.
4) Examples of converting values between the different number bases both manually and using the provided conversion tables.
The document discusses machine learning and provides context for a lecture on the topic. It defines machine learning as a system that improves its performance on a task through experience. It discusses different types of learning like supervised vs unsupervised learning. It also discusses defining the learning task, designing a learning system, and choosing a target function to learn from examples.
This document provides an overview of an introduction to HCI course. The goals of the course are to motivate the field of HCI and teach the basics of interface design, evaluation, research problems, and the HCI community. The course will include lectures, readings, quizzes, presentations, and a final project involving designing a new interface and evaluating it. Students will learn why HCI is important and how it can impact effectiveness, productivity, morale and safety. The course also discusses universal usability and designing for diverse users, including those with disabilities or who are elderly.
Number systems - Efficiency of number system, Decimal, Binary, Octal, Hexadecimalconversion
from one to another- Binary addition, subtraction, multiplication and division,
representation of signed numbers, addition and subtraction using 2’s complement and I’s
complement.
Binary codes - BCD code, Excess 3 code, Gray code, Alphanumeric code, Error detection
codes, Error correcting code.Deepak john,SJCET-Pala
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
Reviewing number systems involves understanding various ways in which numbers can be represented and manipulated. Here's a brief overview of different number systems:
Decimal System (Base-10):
This is the most common number system used by humans.
It uses 10 digits (0-9) to represent numbers.
Each digit's position represents a power of 10.
For example, the number 245 in decimal represents (2 * 10^2) + (4 * 10^1) + (5 * 10^0).
Binary System (Base-2):
Used internally by almost all modern computers.
It uses only two digits: 0 and 1.
Each digit's position represents a power of 2.
For example, the binary number 1011 represents (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0) in decimal, which equals 11.
Octal System (Base-8):
Less commonly used, but still relevant in some computer programming contexts.
It uses eight digits: 0 to 7.
Each digit's position represents a power of 8.
For example, the octal number 34 represents (3 * 8^1) + (4 * 8^0) in decimal, which equals 28.
Hexadecimal System (Base-16):
Widely used in computer science and programming.
It uses sixteen digits: 0 to 9 followed by A to F (representing 10 to 15).
Each digit's position represents a power of 16.
Often used to represent memory addresses and binary data more compactly.
For example, the hexadecimal number 2F represents (2 * 16^1) + (15 * 16^0) in decimal, which equals 47.
Each number system has its own advantages and applications. Decimal is intuitive for human comprehension, binary is fundamental in computing due to its simplicity for electronic systems, octal and hexadecimal are often used for human-readable representations of binary data in programming, particularly when dealing with memory addresses and byte-oriented data.
Understanding these number systems is essential for various fields such as computer science, electrical engineering, and mathematics, as they provide different perspectives on how numbers can be represented and manipulated.
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
1. NUMBER SYSTEM.pptx Computer Applications in PharmacyVedika Narvekar
B.Pharm SEM 2 Binary number system, Decimal number system, Octal
number system, Hexadecimal number systems, conversion decimal to
binary, binary to decimal, octal to binary etc, binary addition, binary
subtraction – One’s complement ,Two’s complement method, binary
multiplication, binary division
Introduction to Information Technology Lecture 2MikeCrea
Number Systems
Types of number systems
Number bases
Range of possible numbers
Conversion between number bases
Common powers
Arithmetic in different number bases
Shifting a number
The document discusses different data types including binary numbers, unsigned and signed integers represented in binary, floating point numbers, and logical operations on bits. It explains binary addition and subtraction, overflow, and different representations for signed integers including sign-magnitude, one's complement, and two's complement. It also covers converting between decimal and binary numbers.
The document discusses number systems and conversions between different bases. It explains that computers use the binary system with bits representing 0s and 1s. 8 bits form a byte. Decimal, binary, octal and hexadecimal numbering systems are covered. Methods for converting between these bases are provided using division and remainders or grouping bits. Common powers and units used in computing like kilo, mega and giga are also defined. Exercises on converting values between the different number systems are included.
The document discusses different number systems including binary, decimal, and hexadecimal. It defines base-N number systems and provides examples of decimal, binary, and hexadecimal numbers. Key concepts covered include positional notation, bits and bytes, addition and subtraction in different bases, signed numbers represented using sign-magnitude and two's complement, and arithmetic operations like addition and subtraction on signed binary numbers. Sign extension is introduced as an important concept for performing arithmetic on numbers of different bit-widths in a signed system.
In two's complement notation:
- The most significant bit represents the sign, with 0 indicating positive and 1 indicating negative.
- The remaining bits represent the magnitude, with the value determined by their place values.
- Negative numbers are calculated by taking the two's complement of the corresponding positive number.
- Two's complement notation allows for simple addition and subtraction operations on signed binary numbers.
Computer Representation of Numbers and.pptxTemesgen Geta
- Computers use binary to represent numbers, where each digit is either a 1 or 0. Real numbers are approximated using floating point representation with sign, mantissa, and exponent fields.
- Integers can be stored by reserving bits for the magnitude and using the first bit to indicate sign (sign-magnitude representation) or by using two's complement representation where the most significant bit indicates sign.
- When storing numbers in memory, multiple bytes are typically used to represent integers or floating point values to support a wider range of numbers.
This document summarizes different number systems used in computing including binary, octal, decimal, and hexadecimal. It explains how to convert between these number systems using theorems about their bases. Key topics covered include binary arithmetic, signed and unsigned integer representation, and how floating point numbers and characters are stored in binary format. Conversion charts are provided for binary to octal and hexadecimal. Representations of integers, characters, and floating point numbers in binary are also summarized.
The document discusses various number systems including decimal, binary, and signed binary numbers. It provides the following key points:
1) Decimal numbers use ten digits from 0-9 while binary only uses two digits, 0 and 1. Binary numbers represent values through place values determined by powers of two.
2) Conversions can be done between decimal and binary numbers through either summing the place value weights or repeated division/multiplication by two.
3) Binary arithmetic follows simple rules to add, subtract, multiply and divide numbers in binary representation.
4) Signed binary numbers use a sign bit to indicate positive or negative values, with the most common 2's complement form representing negative numbers as the 2's
This document provides an overview of digital electronics and number systems. It discusses how digital computer systems use discrete units of data represented by binary numbers. It then describes different number systems like decimal, octal, binary and hexadecimal. Key concepts covered include place value, conversion between number bases, binary arithmetic operations, signed number representations using ones' and twos' complement, and finite number representation using bits. Parity codes for error detection in data transmission are also summarized. Finally, the document discusses ASCII codes and how they are used to represent characters for data transmission.
Here are the answers to the assignment questions:
1. No overflow occurs when adding 00100110 + 01011010 in two's complement. The sum is 10001000.
2. See textbook 1 problem 2-1.c for the solution.
3. See textbook 1 problem 2-11.c for the solution.
4. See textbook 1 problem 2-19.c for the solution.
5. The decimal equivalent of the hexadecimal number 1A16 is 2610.
This document discusses number representation systems used in computers, including binary, decimal, octal, and hexadecimal. It provides examples of converting between these different bases. Specifically, it covers:
1) Converting between decimal, binary, octal, and hexadecimal using positional notation.
2) Signed integer representation in binary, including sign-magnitude, one's complement, and two's complement. Examples are given of converting positive and negative decimals to these binary representations.
3) Storing integer, character, and floating point numbers in binary. Twos complement is described as the most common method for signed integer representation.
This document discusses number representation systems used in computers, including binary, decimal, octal, and hexadecimal. It provides examples of converting between these different bases. Specifically, it covers:
1) Converting between decimal, binary, octal, and hexadecimal using positional notation and place values.
2) Representing signed integers in binary using ones' complement and twos' complement notation.
3) Tables for converting binary numbers to octal and hexadecimal using place values of each base.
4) Examples of converting values between the different number bases both manually and using the provided conversion tables.
The document discusses machine learning and provides context for a lecture on the topic. It defines machine learning as a system that improves its performance on a task through experience. It discusses different types of learning like supervised vs unsupervised learning. It also discusses defining the learning task, designing a learning system, and choosing a target function to learn from examples.
This document provides an overview of an introduction to HCI course. The goals of the course are to motivate the field of HCI and teach the basics of interface design, evaluation, research problems, and the HCI community. The course will include lectures, readings, quizzes, presentations, and a final project involving designing a new interface and evaluating it. Students will learn why HCI is important and how it can impact effectiveness, productivity, morale and safety. The course also discusses universal usability and designing for diverse users, including those with disabilities or who are elderly.
The document describes a study that used a convolutional neural network with a ConvNeXtLarge architecture to classify skin cancer images into benign and malignant classes. The CNN model was trained on a dataset of 3,297 skin cancer images from Kaggle. It achieved an AUC of 0.91 for classifying the images, demonstrating the ConvNeXtLarge architecture is effective for this task. The study aims to help early diagnosis and treatment of skin cancers.
The document describes using a convolutional neural network with the VGG16 architecture to classify lung cancer CT scan images into 4 classes: large cell carcinoma, squamous cell carcinoma, adenocarcinoma, and normal lungs. The model is trained on a dataset of 1000 CT scan images from Kaggle and achieves an AUC of 0.94, indicating high accuracy in identifying different types of lung cancer. This CNN model with pre-trained VGG16 weights provides an effective approach for classifying lung cancer images and could help enable early diagnosis and treatment of lung cancer.
ASP.NET is a server-side web application framework that allows developers to build dynamic web pages using .NET languages like VB.NET and C#. It is different from classic ASP in that it uses fully-fledged programming languages rather than scripting. ASP.NET pages consist of code behind files that contain the programming logic and are compiled into classes. These classes generate HTML sent to browsers using ASP.NET server controls. The .NET Framework provides a common language runtime, type system, and class libraries for all .NET languages.
This document discusses software process models and the software development life cycle (SDLC). It describes the key components of a software process including development, project management, configuration control, and process management processes. The document then explains popular SDLC models like the waterfall model, prototyping, iterative development, and agile processes. The waterfall model is discussed in detail, outlining its sequential phases and advantages like being simple and systematic, while also noting disadvantages like inability to adapt to changes and late delivery.
This document provides an overview of data flow diagrams (DFDs), including:
- DFDs model the flow of information through a system using four symbols: processes, data flows, external entities, and data stores.
- The case study is a video rental store that lends videos to customers, orders from a supplier, and handles overdue fees.
- There are three types of DFDs: context diagrams provide an overview, level 1 show sub-processes and data at a high level, and level 2 (and lower) provide more detailed breakdowns of individual activities.
This document provides an introduction to Python programming. It discusses the programming cycle of writing code, running it, checking if it works, and iterating if needed. It also covers Python programming basics like data types, variables, operators, expressions, conditional statements like if/else, and loops. Examples are provided throughout to illustrate concepts like input, type conversion, arithmetic operations, and printing multiplication tables using a while loop. The document is intended to teach Python programming fundamentals to new learners.
Storytelling is an incredibly valuable tool to share data and information. To get the most impact from stories there are a number of key ingredients. These are based on science and human nature. Using these elements in a story you can deliver information impactfully, ensure action and drive change.
The 10 Most Influential Leaders Guiding Corporate Evolution, 2024.pdfthesiliconleaders
In the recent edition, The 10 Most Influential Leaders Guiding Corporate Evolution, 2024, The Silicon Leaders magazine gladly features Dejan Štancer, President of the Global Chamber of Business Leaders (GCBL), along with other leaders.
At Techbox Square, in Singapore, we're not just creative web designers and developers, we're the driving force behind your brand identity. Contact us today.
HOW TO START UP A COMPANY A STEP-BY-STEP GUIDE.pdf46adnanshahzad
How to Start Up a Company: A Step-by-Step Guide Starting a company is an exciting adventure that combines creativity, strategy, and hard work. It can seem overwhelming at first, but with the right guidance, anyone can transform a great idea into a successful business. Let's dive into how to start up a company, from the initial spark of an idea to securing funding and launching your startup.
Introduction
Have you ever dreamed of turning your innovative idea into a thriving business? Starting a company involves numerous steps and decisions, but don't worry—we're here to help. Whether you're exploring how to start a startup company or wondering how to start up a small business, this guide will walk you through the process, step by step.
Brian Fitzsimmons on the Business Strategy and Content Flywheel of Barstool S...Neil Horowitz
On episode 272 of the Digital and Social Media Sports Podcast, Neil chatted with Brian Fitzsimmons, Director of Licensing and Business Development for Barstool Sports.
What follows is a collection of snippets from the podcast. To hear the full interview and more, check out the podcast on all podcast platforms and at www.dsmsports.net
Zodiac Signs and Food Preferences_ What Your Sign Says About Your Tastemy Pandit
Know what your zodiac sign says about your taste in food! Explore how the 12 zodiac signs influence your culinary preferences with insights from MyPandit. Dive into astrology and flavors!
At Techbox Square, in Singapore, we're not just creative web designers and developers, we're the driving force behind your brand identity. Contact us today.
The Genesis of BriansClub.cm Famous Dark WEb PlatformSabaaSudozai
BriansClub.cm, a famous platform on the dark web, has become one of the most infamous carding marketplaces, specializing in the sale of stolen credit card data.
How are Lilac French Bulldogs Beauty Charming the World and Capturing Hearts....Lacey Max
“After being the most listed dog breed in the United States for 31
years in a row, the Labrador Retriever has dropped to second place
in the American Kennel Club's annual survey of the country's most
popular canines. The French Bulldog is the new top dog in the
United States as of 2022. The stylish puppy has ascended the
rankings in rapid time despite having health concerns and limited
color choices.”
Understanding User Needs and Satisfying ThemAggregage
https://www.productmanagementtoday.com/frs/26903918/understanding-user-needs-and-satisfying-them
We know we want to create products which our customers find to be valuable. Whether we label it as customer-centric or product-led depends on how long we've been doing product management. There are three challenges we face when doing this. The obvious challenge is figuring out what our users need; the non-obvious challenges are in creating a shared understanding of those needs and in sensing if what we're doing is meeting those needs.
In this webinar, we won't focus on the research methods for discovering user-needs. We will focus on synthesis of the needs we discover, communication and alignment tools, and how we operationalize addressing those needs.
Industry expert Scott Sehlhorst will:
• Introduce a taxonomy for user goals with real world examples
• Present the Onion Diagram, a tool for contextualizing task-level goals
• Illustrate how customer journey maps capture activity-level and task-level goals
• Demonstrate the best approach to selection and prioritization of user-goals to address
• Highlight the crucial benchmarks, observable changes, in ensuring fulfillment of customer needs
Easily Verify Compliance and Security with Binance KYCAny kyc Account
Use our simple KYC verification guide to make sure your Binance account is safe and compliant. Discover the fundamentals, appreciate the significance of KYC, and trade on one of the biggest cryptocurrency exchanges with confidence.
Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.AnnySerafinaLove
This letter, written by Kellen Harkins, Course Director at Full Sail University, commends Anny Love's exemplary performance in the Video Sharing Platforms class. It highlights her dedication, willingness to challenge herself, and exceptional skills in production, editing, and marketing across various video platforms like YouTube, TikTok, and Instagram.
4. Why Binary Arithmetic?
Hardware can only deal with binary digits, 0
and 1.
Must represent all numbers, integers or
floating point, positive or negative, by binary
digits, called bits.
Can devise electronic circuits to perform
arithmetic operations: add, subtract, multiply
and divide, on binary numbers.
4
5. Positive Integers
Decimal system: made of 10 digits, {0,1,2, . . . , 9}
41 = 4×101 + 1×100
255 = 2×102 + 5×101 + 5×100
Binary system: made of two digits, {0,1}
00101001= 0×27 + 0×26 + 1×25 + 0×24
+1×23 +0×22 + 0×21 + 1×20
= 32 + 8 +1 = 41
11111111 = 255, largest number with 8
binary digits, 28-1
5
6. Base or Radix
For decimal system, 10 is called the base or
radix.
Decimal 41 is also written as 4110 or 41ten
Base (radix) for binary system is 2.
Thus, 41ten = 1010012 or 101001two
Also, 111ten = 1101111two
and 111two = 7ten
What about negative numbers?
6
7. Signed Magnitude – What Not to
Do
Use fixed length binary representation
Use left-most bit (called most significant bit or
MSB) for sign:
0 for positive
1 for negative
Example: +18ten = 00010010two
–18ten = 10010010two
7
8. Difficulties with Signed
Magnitude
Sign and magnitude bits should be differently
treated in arithmetic operations.
Addition and subtraction require different logic
circuits.
Overflow is difficult to detect.
“Zero” has two representations:
+ 0ten = 00000000two
– 0ten = 10000000two
Signed-integers are not used in modern computers.
8
9. Problems with Finite Math
Finite size of representation:
Digital circuit cannot be arbitrarily large.
Overflow detection – easy to determine when the
number becomes too large.
Represent negative numbers:
Unique representation of 0.
9
-4 0 4 8 12 16 20
0000 0100 1000 1100 10000 10100
Infinite
universe
of integers
∞
-∞
4-bit numbers
12. Another Way to Divide Universe
2’s Complement Numbers
12
0
8
4
12 0100
1000
1100
0000
-1
1111
15
-8 7
0111
-4
0001
Decimal
magnitude
Binary number
Positive Negative
0 0000
1 0001 1111
2 0010 1110
3 0011 1101
4 0100 1100
5 0101 1011
6 0110 1010
7 0111 1001
8 1000
Negation rule: invert bits
and add 1
Subtract 1
on this side
13. Integers With Sign – Two Ways
Use fixed-length representation, but no explicit sign
bit:
1’s complement:To form a negative number, complement
each bit in the given number.
2’s complement:To form a negative number, start with
the given number, subtract one, and then complement
each bit, or
first complement each bit, and then add 1.
2’s complement is the preferred representation.
13
14. 2’s-Complement Integers
Why not 1’s-complement? Don’t like two zeros.
Negation rule:
Subtract 1 and then invert bits, or
Invert bits and add 1
Some properties:
Only one representation for 0
Exactly as many positive numbers as negative numbers
Slight asymmetry – there is one negative number with no
positive counterpart
14
15. General Method for Binary
Integers with Sign
Select number (n) of bits in representation.
Partition 2n integers into two sets:
00…0 through 01…1 are 2n/2 positive integers.
10…0 through 11…1 are 2n/2 negative integers.
Negation rule transforms negative to positive, and vice-versa:
Signed magnitude: invert MSB (most significant bit)
1’s complement: Subtract from 2n – 1 or 1…1 (same as “inverting all
bits”)
2’s complement: Subtract from 2n or 10…0 (same as 1’s complement +
1)
15
19. 2’s Complement n-bit Numbers
Range: – 2n –1 through 2n –1 – 1
Unique zero: 00000000 . . . . . 0
Negation rule: see slide 11 or 13.
Expansion of bit length: stretch the left-most bit all the
way, e.g., 11111101 is still 101 or – 3. Also, 00000011 is
same as 011 or 3.
Most significant bit (MSB) indicates sign.
Overflow rule: If two numbers with the same sign bit
(both positive or both negative) are added, the overflow
occurs if and only if the result has the opposite sign.
Subtraction rule: for A – B, add – B and A.
19
20. Summary
For a given number (n) of digits we have a finite
set of integers. For example, there are 103 = 1,000
decimal integers and 23 = 8 binary integers in 3-
digit representations.
We divide the finite set of integers [0, rn – 1],
where radix r = 10 or 2, into two equal parts
representing positive and negative numbers.
Positive and negative numbers of equal
magnitudes are complements of each other: x +
complement (x) = 0.
20
21. Summary: Defining Complement
Decimal integers:
10’s complement: – x = Complement (x) = 10n – x
9’s complement: – x = Complement (x) = 10n – 1 – x
For 9’s complement, subtract each digit from 9
For 10’s complement, add 1 to 9’s complement
Binary integers:
2’s complement: – x = Complement (x) = 2n – x
1’s complement: – x = Complement (x) = 2n – 1 – x
For 1’s complement, subtract each digit from 1
For 2’s complement, add 1 to 1’s complement
21
22. Understanding Complement
Complement means “something that
completes”:
e.g., X + complement (X) = “Whole”.
Complement also means “opposite”, e.g.,
complementary colors are placed opposite
in the primary color chart.
Complementary numbers are like electric
charges. Positive and negative charges of
equal magnitudes annihilate each other.
22
26. For More on 2’s-Complement
Chapter 4 in D. E. Knuth, The Art of Computer Programming:
Seminumerical Algorithms, Volume II, Second Edition, Addison-Wesley,
1981.
A. al’Khwarizmi, Hisab al-jabr w’al-muqabala, 830.
Read: A two part interview with D. E. Knuth, Communications of the
ACM (CACM), vol. 51, no. 7, pp. 35-39 (July), and no. 8, pp. 31-35
(August), 2008.
26
Donald E. Knuth (1938 - ) Abu Abd-Allah ibn Musa
al’Khwarizmi (~780 – 850)
29. Overflow: An Error
Examples: Addition of 3-bit integers (range - 4 to +3)
-2-3 = -5 110 = -2
+ 101 = -3
= 1011 = 3 (error)
3+2 = 5 011 = 3
010 = 2
= 101 = -3 (error)
Overflow rule: If two numbers with the same sign bit (both
positive or both negative) are added, the overflow occurs if
and only if the result has the opposite sign.
29
0
1
2
3
-1
-2
-3
- 4
000
001
010
011
100
101
110
111
– +
Overflow
crossing
31. Adding Two Bits
a b
s = a + b
Decimal Binary
0 0 0 00
0 1 1 01
1 0 1 01
1 1 2 10
31
SUM
CARRY
32. Half-Adder Adds two Bits
“half” because it has no carry
input
Adding two bits:
a b a + b
0 0 00
0 1 01
1 0 01
1 1 10
carry sum
32
HA
a
b
sum
carry
XOR
AND
33. Full Adder: Include Carry
Input
a b c
s = a + b + c
Decimal value Binary value
0 0 0 0 00
0 0 1 1 01
0 1 0 1 01
0 1 1 2 10
1 0 0 1 01
1 0 1 2 10
1 1 0 2 10
1 1 1 3 11
33
SUM
CARRY
36. How Fast is Ripple-Carry
Adder?
Longest delay path (critical path) runs from (a0,
b0) to sum31.
Suppose delay of full-adder is 100ps.
Critical path delay = 3,200ps
Clock rate cannot be higher than 1/(3,200×10 –12)
Hz = 312MHz.
Must use more efficient ways to handle carry.
36
37. Speeding Up the Adder
37
16-bit
ripple
carry
adder
a0-a15
b0-b15
c0 = 0
s0-s15
16-bit
ripple
carry
adder
a16-a31
b16-b31
0
16-bit
ripple
carry
adder
a16-a31
b16-b31
1
Multiplexer
s16-s31
0
1
This is a carry-select adder
38. Fast Adders
In general, any output of a 32-bit adder can be
evaluated as a logic expression in terms of all 65
inputs.
Number of levels of logic can be reduced to
log2N for N-bit adder. Ripple-carry has N levels.
More gates are needed, about log2N times that
of ripple-carry design.
Fastest design is known as carry lookahead
adder.
38
39. N-bit Adder Design Options
Type of adder Time complexity
(delay)
Space complexity
(size)
Ripple-carry O(N) O(N)
Carry-lookahead O(log2N) O(N log2N)
Carry-skip O(√N) O(N)
Carry-select O(√N) O(N)
39
Reference: J. L. Hennessy and D. A. Patterson, Computer Architecture:
A Quantitative Approach, Second Edition, San Francisco, California,
1990, page A-46.
40. Binary Multiplication
(Unsigned)
40
1 0 0 0 two = 8ten multiplicand
1 0 0 1 two = 9ten multiplier
____________
1 0 0 0
0 0 0 0 partial products
0 0 0 0
1 0 0 0
____________
1 0 0 1 0 0 0two = 72ten
Basic algorithm: For n = 1, 32,
only If nth bit of multiplier is 1,
then add multiplicand × 2 n –1
to product
41. Digital Circuits for
Multiplication
Need:
Three registers for multiplicand, multiplier and product.
Adder or arithmetic logic unit (ALU).
What is a register
A memory device – unit cell stores one bit.
A 32-bit register has 32 storage cells. It can store a 32-bit
integer.
41
bit 0
bit 32
1 bit right shift divides integer by 2
1 bit left shift multiplies integer by 2
42. Multiplication Flowchart
42
LSB
of multiplier
?
Initialize product register to 0 Partial product number, n = 1
Left shift multiplicand register 1 bit
Right shift multiplier register 1 bit
n = ? n = n + 1
Done
Start
Add multiplicand to
product and place result
in product register
1 0
n < 32
n = 32
N = 32
43. Serial Multiplication
43
64-bit product register, initially 0
64
64
64
64-bit ALU
Test LSB
N = 32 times
shift right
32-bit multiplier
shift left
write
3 operations per bit:
shift right
shift left
add
Need 64-bit ALU
Multiplicand (expanded 64-bits)
LSB = 0
LSB
= 1
add
Shift l/r
LSB
after
add
N = 32
after
add
44. Serial Multiplication
(Improved)
44
Multiplicand
64-bit product register
32
32
32
32-bit ALU
Test LSB
32 times
LSB
(3) shift right
00000 . . . 00000 32-bit multiplier Initialized product register
2 operations per bit:
shift right
add
32-bit ALU
1
1
(1) add
1 or 0
N = 32
46. Multiplying with Signs
Convert numbers to magnitudes.
Multiply the two magnitudes through 32 iterations.
Negate the result if the signs of the multiplicand
and multiplier differed.
Alternatively, the previous algorithm will work with
some modifications. See B. Parhami, Computer
Architecture, NewYork: Oxford University Press,
2005, pp. 199-200.
46
47. Alternative Method with
Signs
In the improved method:
Use 2N + 1 bit product register
Use N + 1 bit multiplicand register
Use N + 1 bit adder
Proceed as in the improved method, except –
In the last (Nth) iteration, if LSB = 1, subtract
multiplicand instead of adding.
47
51. Array Multiplier: Carry
Forward
51
y3 y2 y1 y0 multiplicand
x3 x2 x1 x0 multiplier
________________________
x0y3 x0y2 x0y1 x0y0 four
x1y3 x1y2 x1y1 x1y0 partial
x2y3 x2y2 x2y1 x2y0 products
x3y3 x3y2 x3y1 x3y0 to be
__________________________________________________ summed
p7 p6 p5 p4 p3 p2 p1 p0
Note: Carry is added to the next partial product (carry-save addition).
Adding the carry from the final stage needs an extra (ripple-carry
stage. These additions are faster but we need four stages.
52. Basic Building Blocks
Two-input AND
Full-adder
52
Full
adder
yi x0
p0i = x0yi
0th partial product
sum bit
to (k+1)th
sum
sum bit
from (k-1)th
sum
yi xk
carry bits
from (k-1)th
sum
carry bits
to (k+1)th
sum
Slide 24
ith bit of
kth partial
product
53. Array Multiplier
53
y3 y2 y1 y0
x0
x1
x2
x3
FA
xi
yj
ppk
ppk+1
co
0
0
0
ci
0
0 0 0 0
p7 p6 p5 p4 p3 p2 p1 p0
FA FA FA FA
Critical path
0
54. Types of Array Multipliers
Baugh-Wooley Algorithm: Signed product by
two’s complement addition or subtraction
according to the MSB’s.
Booth multiplier algorithm
Tree multipliers
Reference: N. H. E.Weste and D. Harris,
CMOSVLSI Design, A Circuits and Systems
Perspective,Third Edition, Boston: Addison-
Wesley, 2005.
54
59. Division
59
Initialize
$R←0
33-bit $M (Divisor)
33-bit $R (Remainder)
33
33
33
33-bit ALU
32 times
Step 1: 1- bit left shift $R and $Q
32-bit $Q (Dividend)
Step 2: Subtract $R ← $R – $M
Step 3: If sign-bit ($R) = 0, set Q0 = 1
If sign-bit ($R) = 1, set Q0 = 0 and restore $R
V. C. Hamacher, Z. G. Vranesic and S. G. Zaky, Computer Organization, Fourth Edition,
New York: McGraw-Hill, 1996.
62. Non-Restoring Division
Avoid unnecessary addition (restoration).
How it works?
Initially $R contains dividend ✕ 2 – n for n-bit numbers. Example (n = 8):
In some iteration after left shift, suppose $R = x and divisor is y
Subtract divisor, $R = x – y
Restore: If $R is negative, add y, $R = x
Next step: Left shift, $R = 2x+b, and subtract y, $R = 2x – y + b
62
00101101
00000000 00101101
Dividend
$R, $Q
63. How It Works: Last two Steps
Suppose we do not restore and go to next step:
Left shift, $R = 2(x – y) + b = 2x – 2y + b, and add y, then $R = 2x – 2y + y
+ b = 2x – y + b (same result as with restoration)
Non-restoring division
Initialize and start iterations same as in restoring division
by subtracting divisor
In any iteration after left shift and subtraction/addition
If $R is positive, subtract divisor (y) in next iteration
If $R is negative, add divisor (y) in next iteration
After final iteration, if $R is negative then restore it by
adding divisor (y)
63
66. Signed Division
Remember the signs and divide magnitudes.
Negate the quotient if the signs of divisor and
dividend disagree.
There is no other direct division method for
signed division.
66
67. Symbol Representation
Early versions (60s and 70s)
Six-bit binary code (Control Data Corp., CDC)
EBCDIC – extended binary coded decimal interchange
code (IBM)
Presently used –
ASCII – American standard code for information
interchange – 7 bit code specified by American National
Standards Institute (ANSI), seeTable 1.11 on page 63; an
eighth MSB is often used as parity bit to construct a
byte-code.
Unicode – 16 bit code and an extended 32 bit version
67
68. ASCII
Each byte pattern represents a character (symbol)
Convenient to write in hexadecimal, e.g., with even parity,
00000000 0ten 00hex null
01000001 65ten 41hex A
11100001 225ten E1hex a
Table 1.11 on page 63 gives the 7-bit ASCII code.
C program – string – terminating with a null byte (odd parity):
01000101 01000011 01000101 10000000
69ten or 45hex 67ten or43hex 69ten or 45hex 128ten or 80hex
E C E (null)
68
69. Error Detection Code
Errors: Bits can flip due to noise in circuits and in
communication.
Extra bits used for error detection.
Example: a parity bit in ASCII code
69
Even parity code for A 01000001
(even number of 1s)
Odd parity code for A 11000001
(odd number of 1s)
7-bit ASCII code
Parity bits
Single-bit error in 7-bit code of “A”, e.g., 1000101, will change
symbol to “E” or 1000000 to “@”. But error will be detected in
the 8-bit code because the error changes the specified parity.
70. Richard W. Hamming
Error-correcting codes
(ECC).
Also known for
Hamming distance (HD) =
Number of bits two binary
vectors differ in
Example:
HD(1101, 1010) = 3
Hamming Medal, 1988
70
1915 -1998
71. The Idea of Hamming Code
71
Code space contains 2N possible N-bit code words:
1010
”A”
1110”
E”
1011”
B”
1000
”8”
0010
”2”
1-bit error in “A”
HD = 1
HD = 1
HD = 1
HD = 1
Error not correctable. Reason: No redundancy.
Hamming’s idea: Increase HD between valid code words.
N = 4
Code Symbol
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F
72. Hamming’s Distance ≥ 3 Code
72
1010010
”A”
1-bit error in “A”
shortest distance
decoding eliminates
error
HD = 2
HD = 1
0010101
”2”
1000111
”8”
1011001
”B”
1110100
”E”
HD = 3
HD = 3
HD = 3
HD = 4
0010010
”?”
HD = 3
HD = 4
HD = 4
0011110
”3”
HD = 3
73. Minimum Distance-3 Hamming Code
Symbol
Original
code
Odd-parity
code
ECC, HD ≥ 3
0 0000 10000 0000000
1 0001 00001 0001011
2 0010 00010 0010101
3 0011 10011 0011110
4 0100 00100 0100110
5 0101 10101 0101101
6 0110 10110 0110011
7 0111 00111 0111000
8 1000 01000 1000111
9 1001 11001 1001100
A 1010 11010 1010010
B 1011 01011 1011001
C 1100 11100 1100001
D 1101 01101 1101010
E 1110 01110 1110100
F 1111 11111 1111111
73
Original code: Symbol “0” with a
single-bit error will be Interpreted as
“1”, “2”, “4” or “8”.
Reason: Hamming distance between
codes is 1. A code with any bit error will
map onto another valid code.
Remedy 1: Design codes with HD ≥ 2.
Example: Parity code. Single bit error
detected but not correctable.
Remedy 2: Design codes with HD ≥ 3.
For single bit error correction, decode
as the valid code at HD = 1.
For more error bit detection or
correction, design code with HD ≥ 4.
74. Integers and Real Numbers
Integers: the universe is infinite but discrete
No fractions
No numbers between consecutive integers, e.g., 5 and 6
A countable (finite) number of items in a finite range
Referred to as fixed-point numbers
Real numbers – the universe is infinite and continuous
Fractions represented by decimal notation
Rational numbers, e.g., 5/2 = 2.5
Irrational numbers, e.g., 22/7 = 3.14159265 . . .
Infinite numbers exist even in the smallest range
Referred to as floating-point numbers
74
75. Wide Range of Numbers
A large number:
976,000,000,000,000 = 9.76 × 1014
A small number:
0.0000000000000976 = 9.76 × 10 –14
75
76. Scientific Notation
Decimal numbers
0.513×105, 5.13×104 and 51.3×103 are written in scientific
notation.
5.13×104 is the normalized scientific notation.
Binary numbers
Base 2
Binary point – multiplication by 2 moves the point to the
right.
Normalized scientific notation, e.g., 1.0two×2 –1
76
77. Floating Point Numbers
General format
±1.bbbbbtwo×2eeee
or (-1)S × (1+F) × 2E
Where
S = sign, 0 for positive, 1 for negative
F = fraction (or mantissa) as a binary integer,
1+F is called significand
E = exponent as a binary integer, positive or
negative (two’s complement)
77
79. William Morton (Velvel)
Kahan
79
1989 Turing Award Citation:
For his fundamental contributions to
numerical analysis. One of the foremost
experts on floating-point computations.
Kahan has dedicated himself to "making
the world safe for numerical
computations."
Architect of the IEEE floating point standard
b. 1933, Canada
Professor of Computer Science, UC-Berkeley
81. IEEE 754 Floating Point
Standard
Biased exponent: true exponent range
[-126,127] is changed to [1, 254]:
Biased exponent is an 8-bit positive binary integer.
True exponent obtained by subtracting 127ten or
01111111two
First bit of significand is always 1:
± 1.bbbb . . . b × 2E
1 before the binary point is implicitly assumed.
Significand field represents 23 bit fraction after the binary
point.
Significand range is [1, 2), to be exact [1, 2 – 2-23]
81
83. Example: Conversion to Decimal
Sign bit is 1, number is negative
Biased exponent is 27+20 = 129
The number is
83
1 10000001 01000000000000000000000
Sign bit S bits 23-30 bits 0-22
normalized E F
(-1)S × (1 + F) × 2(exponent – bias) = (-1)1 × (1 + F) × 2(129 – 127)
= - 1 × 1.25 × 22
= - 1.25 × 4
= - 5.0
84. IEEE 754 Floating Point
Format
Floating point numbers
84
Negative
Overflow
Positive
Overflow
Expressible
negative
numbers
Expressible
positive
numbers
0
-2-126 2-126
Positive underflow
Negative underflow
(2 – 2-23)×2127
- (2 – 2-23)×2127
+ ∞
– ∞
1 1011001 01001100000000010001101
Sign bit S
bits 23-30 bits 0-22
normalized E F
Positive integer – 127 = E
+0
– 0
85. Positive Zero in IEEE 754
+ 1.0 × 2 –127
Smaller than the smallest positive number in single-
precision IEEE 754 standard.
Interpreted as positive zero.
True exponent less than –126 is positive underflow;
can be regarded as zero.
85
0 00000000 00000000000000000000000
Biased
exponent
Fraction
86. Negative Zero in IEEE 754
– 1.0 × 2 –127
Greater than the largest negative number in single-
precision IEEE 754 standard.
Interpreted as negative zero.
True exponent less than –126 is negative underflow;
may be regarded as 0.
86
1 00000000 00000000000000000000000
Biased
exponent
Fraction
87. Positive Infinity in IEEE
754
+ 1.0 × 2128
Greater than the largest positive number in single-
precision IEEE 754 standard.
Interpreted as + ∞
If true exponent > 127, then the number is greater
than ∞. It is called “not a number” or NaN and may
be interpreted as ∞.
87
0 11111111 00000000000000000000000
Biased
exponent
Fraction
88. Negative Infinity in IEEE
754
–1.0 × 2128
Smaller than the smallest negative number in single-
precision IEEE 754 standard.
Interpreted as - ∞
If true exponent > 127, then the number is less than -
∞. It is called “not a number” or NaN and may be
interpreted as - ∞.
88
1 11111111 00000000000000000000000
Biased
exponent
Fraction
89. Addition and Subtraction
0. Zero check
- Change the sign of subtrahend, i.e., convert to summation
- If either operand is 0, the other is the result
1. Significand alignment: right shift significand of
smaller exponent until two exponents match.
2. Addition: add significands and report error if
overflow occurs. If significand = 0, return result as
0.
3. Normalization
- Shift significand bits to normalize.
- report overflow or underflow if exponent goes out of range.
4. Rounding
89
90. Example (4 Significant Fraction
Bits)
Subtraction: 0.5ten – 0.4375ten
Step 0: Floating point numbers to be added
1.000two× 2 –1 and –1.110two× 2 –2
Step 1: Significand of lesser exponent is shifted
right until exponents match
–1.110two× 2 –2 → – 0.111two× 2 –1
Step 2: Add significands, 1.000two + ( – 0.111two)
Result is 0.001two × 2 –1
90
01000
+11001
00001
2’s complement addition, one bit added for sign
91. Example (Continued)
Step 3: Normalize, 1.000two× 2 – 4
No overflow/underflow since
127 ≥ exponent ≥ –126
Step 4: Rounding, no change since the sum
fits in 4 bits.
1.000two × 2 – 4 = (1+0)/16 = 0.0625ten
91