Real numbers can be stored using floating point representation, which separates a real number into three parts: a sign bit, exponent, and mantissa. The exponent indicates the power of the base 10 that the mantissa is multiplied by. Common standards like IEEE 754 define single and double precision formats that allocate more bits for higher precision at the cost of range. Summarizing a floating point number involves determining the exponent by shifting the decimal, converting the number to a leading digit mantissa, and writing the sign, exponent, and mantissa based on the specified precision format.
A digital system can understand positional number system only where there are only a few symbols called digits and these symbols represent different values depending on the position they occupy in the number.
A digital system can understand positional number system only where there are only a few symbols called digits and these symbols represent different values depending on the position they occupy in the number.
This is the second lesson of Computer and Network Technology subject of BCS HEQ Certificate Level exam.
Subject: Computer and Network Technology (CNT)
Chapter: Fundamentals
Lesson: Data Representation in Computers
This lesson discuss about how integers, floating point numbers and characters are handled by modern computers.
For more lessons please visit https://www.bcsonlinelectures.com website.
Contents:
1.What is number system?
2.Conversions of number from one radix to another
3.Complements (1's, 2's, 9's, 10's)
4.Binary Arithmetic ( Addition, subtraction, multiplication, division)
Digital computers represent data by means of an easily identified symbol called a digit. The data may
contain digits, alphabets or special character, which are converted to bits, understandable by the computer.
In Digital Computer, data and instructions are stored in computer memory using binary code (or
machine code) represented by Binary digIT’s 1 and 0 called BIT’s.
The number system uses well-defined symbols called digits.
Number systems are classified into two types:
o Non-positional number system
o Positional number system
This is the second lesson of Computer and Network Technology subject of BCS HEQ Certificate Level exam.
Subject: Computer and Network Technology (CNT)
Chapter: Fundamentals
Lesson: Data Representation in Computers
This lesson discuss about how integers, floating point numbers and characters are handled by modern computers.
For more lessons please visit https://www.bcsonlinelectures.com website.
Contents:
1.What is number system?
2.Conversions of number from one radix to another
3.Complements (1's, 2's, 9's, 10's)
4.Binary Arithmetic ( Addition, subtraction, multiplication, division)
Digital computers represent data by means of an easily identified symbol called a digit. The data may
contain digits, alphabets or special character, which are converted to bits, understandable by the computer.
In Digital Computer, data and instructions are stored in computer memory using binary code (or
machine code) represented by Binary digIT’s 1 and 0 called BIT’s.
The number system uses well-defined symbols called digits.
Number systems are classified into two types:
o Non-positional number system
o Positional number system
Chapter 2.1 introduction to number systemISMT College
Binary Number System, Decimal Number System, Octal Number System, Hexadecimal Number System, Conversion, Binary Arithmetic, Signed Binary Number Representation, 1's complement, 2's complement, 9's complement, 10's complement
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
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
2. What about the other numbers?
So far we know how to store integers
Whole Numbers
But what if we want to store real numbers
Numbers with decimal fractions
Even 27.5 needs another way to represent it.
This method is called floating point representation
3. Fixed Notation
We are accustomed to using a fixed notation where the decimal point is fixed and we
know that any numbers to the right of the decimal point are the decimal portion and to
the left is the integer part
E.g. 10.75
10 is the Integer Portion and 0.75 is the decimal portion
4. The structure of a floating point(real) number is as follows:
4.2 * 108
Only the mantissa and the exponent are stored. The base is implied (known already)
As it is not stored this will save memory capacity
Floating Point Representation
Exponent
Mantissa Base
5. IEEE standard
There is a IEEE standard that defines the structure of a floating point number
IEEE Standard for Floating-Point Arithmetic (IEEE 754-2008)
It defines 4 main sizes of floating point numbers
16, 32, 64 and 128 bit
Sometimes referred to as Half, Single, Double and Quadruple precision
6. A 32 bit floating point number
S is a sign bit
0 = positive
1 = negative
23 bits for the mantissa
8 bits for the exponent
Sign Exponent Mantissa
1bit 8 bits 23 bits
7. Lets look at an example
We want the format of a number to be in
m x be
We want the mantissa to be a single decimal digit
Example
3450.00 = 3.45 x 103
The exponent is 3 as the decimal place has been moved 3 places to the left
8. Decimal fractions
First we will look at how a decimal number is made up: 173.75
Hundreds Tens Units Decimal
place
Tenth
s
Hundredths
1 7 3 . 7 5
102 101 100 Decimal
place
10-1 10-2
1 7 3 . 7 5
9. Binary fractions
Then look at how the same number could be stored in binary: 1010 1101
This number is constructed as shown above (in a fixed point notation).
These values come from
128 64 32 16 8 4 2 1 . 0.5 0.25
1 0 1 0 1 1 0 1 1 1
27 26 25 24 23 22 21 20 . 2-1 2-2
1 0 1 0 1 1 0 1 1 1
10. But the problem is
We don’t actually have a decimal point in binary...
11. A worked example
In decimal first
250.03125
First convert the integer part of the mantissa into binary (as you have done previously)
250 = 1111 1010
Now to convert the decimal portion of the mantissa
.03125
12. Example (cont)
Decimal fraction => .03125
Multiply and use any remainder over 1 as a carry forward. Continue until you reach 1.0
with no carry over
0.03125 * 2 = 0 r 0.0625
0.0625 * 2 = 0 r 0.125
0.125 * 2 = 0 r 0.25
0.25 * 2 = 0 r 0.5
0.5 * 2 = 1 r 0
Binary fraction = 0.00001
Read top to bottom
13. So far
So far we have : 1111 1010.00001 (250.03125)
But we need it in the format : .11111 0100 0001 (the decimal point to the left of the 1)
So the exponent is 8 (1000)
8 places to the left
1 1 1 1 1 0 1 0 . 0 0 0 0 1
. 1 1 1 1 1 0 1 0 0 0 0 0 1
14. Example
So back to our example
Mantissa =.11111 0100 0001 (2.5003125)
Exponent = 0000 1000 (8)
Sign Bit = 0
And the number is positive so the sign bit is 0
S Exponent Mantissa
0 0000 1000 11111 0100 000100000000000
1bit 8 bits 23 bits
In 32 bit representation there is
❏ 8 bits for the exponent
❏ 23 bits for the mantissa
We will pad the left of the exponent
with 0’s up to 8 bits
We will pad the right of the mantissa
with 0’s up to 23 bits
15. Further Example 1
102.9375
Sign = 0 (+ve) Integer = 102 = 1100110
Decimal portion = .1111 -> Number = 1100110.1111 -> Needs to be .11001101111
Exponent = 7 = 00000111
Number (32 bit Single Precision) = 0 00000111 11001101111000000000000
16. Further Example 2
250.75
Sign = 0 (+ve) Integer = 250 = 11111010
Decimal portion = .11 -> Number = 11111010.11 -> Needs to be .1111101011
Exponent = 8 = 00001000
Number (32 bit Single Precision) = 0 00001000 11111010110000000000000
17. What about small numbers?
What if we are storing 0.0625?
The decimal point doesn’t need moved to the left it needs moved to the right…
18. Example (cont)
Decimal fraction => .0625
Multiply and use any remainder over 1 as a carry forward. Continue until you reach 1.0
with no carry over
0.0625 * 2 = 0 r 0.125
0.125 * 2 = 0 r 0.25
0.25 * 2 = 0 r 0.5
0.5 * 2 = 1 r 0.0
Binary fraction = 0.001
Read top to bottom
19. So far
So far we have : 0.001 (0.0625)
But we need it in the format .10000000000000000000000
(leading bit after the . has to be a 1)
So the exponent is -2
2 places to the left
0 0 0 0 0 0 0 0 . 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 . 1 0 0
20. Example
So back to our example
Mantissa =0.1 (0.0625)
Exponent = 1111 1110 (-2)
Sign Bit = 0
And the number is positive so the sign bit is 0
S Exponent Mantissa
0 1111 1110 10000 0000 000000000000000
1bit 8 bits 23 bits
In 32 bit representation there is 23 bits
for the mantissa
We will pad the right of the number
with 0’s up to 23 bits
21. If the Exponent is negative
In reality there are other ways that this is dealt with (offset exponents for those that are
interested)
But for the purpose of the course we will store a negative exponent in 8 bit two’s
complement:
2 = 0000 0010
-2 = 1111 1110
22. What about really small numbers?
What if we are storing 0.0009765625?
The integer portion is 0
The decimal portion is: .0000000001
So our number need to be 0.1
We need to shift the exponent 10 places to the right
This means we need to store -10 as the exponent (two's complement)
23. Further Example 3
0.0009765625?
Sign = 0 (+ve) Integer = 0 = 0000000
Decimal portion = .0000000001 -> Number = 0.0000000001 -> Needs to be .1
Exponent = -10 = (+10 = 0000 1010) -10 = 1111 0110
Number (32 bit Single Precision) = 0 1111 0110 01000000000000000000000
24. Problems with floating point
What if we try to store 25.333?
We need much more bits in the mantissa to deal with this…
28. Different Precision Numbers
Single Precision (32 bit)
Double precision (64 bit)
S Exponent Mantissa
1bit 8 bits 23 bits
1.18 × 10–38 to 3.40 × 1038
S Exponent Mantissa
1bit 11 bits 52 bits
2.23 × 10–308 to 1.79 × 10308
29. Summary
If you increase the amount of bits allocated to the Mantissa you increase the
accuracy/precision
If you increase the amount of bits allocated to the exponent you increase the range of
the number
Mnemonic
MARE - Mantissa Accuracy Range Exponent
30. Summary - Single precision Floating point
1. Create the mantissa portion (The integer part)
2. Create the decimal fraction
3. Calculate exponent by moving decimal point till number is in the format 1.xxxxx
4. Convert exponent to two’s complement if is negative (moving the point to the right)
5. Add the sign bit
0 = +ve
1 = -ive
6. Write in the format sign exponent mantissa
Editor's Notes
IEEE - Institute of Electrical and Electronics Engineers