SlideShare a Scribd company logo
1 of 30
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 2
Session 6: Focus
 Number Representations
◦ Scientific Notation
◦ Normalized numbers
 Floating-point Representation
◦ IEEE 754 Format
◦ Single Precision (32 bits)
 Exponent and Significand
 Biased Exponent
 Range of floating point numbers
◦ Reference: Video Lecture on this topic
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com
Number Representations
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 4
Integers and Real Numbers
 Integers: the universe is infinite but discrete
◦ No fractions
◦ No numbers in between consecutive integers, e.g., 6 and 7
◦ A countable (finite) number of items within a finite range
◦ Referred to as fixed-point numbers
 Real numbers – the universe is infinite and
continuous
◦ Fractions are 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
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 5
Wide Range of Numbers
 A large number:
7,564,000,000,000,000 = 7.56 × 1015
 A small number:
0.000000000000007564 = 7.564 × 10 –15
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 6
Definitions
Scientific Notation
 Scientific notation is a way of writing numbers that are too big or
too small, to be conveniently written in decimal form
Scientific Notation: (many unnormalized forms for the same no.)
 10.0ten  10-10 , 0.1ten  10-8 and 0.01ten  10-7
 0.524×105 and 52.4×103
Normalized Scientific Notation
 Real number is written with one nonzero decimal digit before the
decimal point
Normalized Scientific Notation: (only one normalized form)
 1.0ten  10-9
 5.24×104
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 7
Floating-Point Numbers
 Binary Numbers
 Base 2
 Binary point – multiplication by 2 moves the point to the
right
 Normalized scientific notation
 e.g., 1.101two = 1 * 2 0 + 1 * 2 -1 + 0 * 2 -2 + 1 * 2-3
= 1 + 0.5 + 0 + 0.125
= 1.625
 Similar to the decimal numbers shown in scientific notation,
binary numbers can also be written in scientific notation …
 1.0two  2-1 => 0.5ten
 1.xxxxxxtwo  2yyyy (general format)
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 8
Advantages of Scientific Notation
 Simplifies exchange of data
 Simplifies arithmetic algorithms (because of
standardized format)
 Increases accuracy of the numbers that can be stored
in a word
◦ Since unnecessary leading zeros are replaced by digits to the
right of the binary point
◦ 0.00000101110  1.0111 * 2-6
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com
Floating-Point
General Format
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 10
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 – Controls the Precision
 E = Exponent as a binary integer, positive or negative (two’s
complement representation) – Controls the Range
 To have more bits into the significand, IEEE 754 makes the
leading 1-bit of normalized binary numbers implicit
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 11
Floating-Point General Format
 General format
±1.bbbbbtwo×2eeee
or (-1)S × (1+F) × 2E
 Fraction, is a value between 0 and 1, placed in the
Fraction (F) field [bbbbb…]
 Exponent, is a value placed in the exponent field,
computing the value as 2E [eeee….]
 As mentioned earlier, the leading value 1 of the
significant is implicit and not specifically stored
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com
Binary to Decimal Conversion
Binary (-1)S (1.b1b2b3b4) × 2E
Decimal(-1)S × (1 + b1×2-1 + b2×2-2 + b3×2-3 + b4×2-4) × 2E
Example: -1.1100 × 2-2 (binary) = - (1 + 2-1 + 2-2) ×2-2
= - (1 + 0.5 + 0.25)/4
= - 1.75/4
= - 0.4375 (decimal)
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com
Floating-Point Representations
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 14
William Morton (Velvel) Kahan
One of the foremost experts on floating-point
computations.
A primary architect of the Intel 8087 floating-
point coprocessor and IEEE 754 floating-
point standard.
Architect of the IEEE 754 floating point standard
b. 1933, Canada
Professor of Computer Science, UC-Berkeley
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com
Single Precision
Floating-Point Representation
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 16
Single Precision Representation (32 bits)
 – 126 ≤ E ≤ +127 (biased notation)
 Range of values are from 2-126 to (2-2-23) 2+127
 Range of magnitudes, 1.175 ×10-38 to 3.403 ×1038
bit 31
S E: 8-bit Exponent F: 23-bit Fraction
bits 0-22bits 23-30
Note: Normal limits of exponents are between -128 and +127 in 2’s complement form
Format: (-1)S (1.b1b2b3 ...b23) × 2E
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 17
Bias to the Exponent
 Exponent: 8 bits wide (in Single precision)
 Range of values: 0x00 to 0xFF (0 to 255 in decimal)
 Reserved: 0x00 and 0xFF
 Other values of Exponent: 0x01 to 0xFE (1 to 254 in decimal)
 Actual Exponent value = Value in Exponent field - Bias
 = 01 – 127 => -126 (min value)
 = 254 – 127 => +127 (max value)
 Bias (127) helps in performing integer comparison of floating
point representation (leaving out the sign bit)
 Since zero value (0.0) has no leading 1, it is given the reserved
exponent value (00) so that hardware won’t attach a leading 1 to
it
S E: 8-bit Exponent F: 23-bit Fraction
bits 0-22bits 23-30 Format:
(-1)S (1.b1b2…b23) × 2E
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 18
Range of 32-bit Integers
Expressible numbers
-231 231-10
 Signed Integers: 2’s complement Format
 Unsigned Integers:
Expressible numbers
0 232-1
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 19
IEEE 754: 32-bit Format
Negative
Overflow
Positive
Overflow
Expressible negative
numbers
Expressible positive
numbers
0-2-126 2-126
Positive underflow
Negative underflow
(2 – 2-23)×2+127- (2 – 2-23)×2+127
Positive zeroNegative zero + ∞– ∞
±1.0000 0000 0000 0000 0000 000 x 2-126
±1.1111 1111 1111 1111 1111 111 x 2+127
S E: 8-bit Exponent F: 23-bit Fraction
bits 0-22bits 23-30
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 20
Overflow and Underflow
Overflow
 It means that a positive exponent which is too large to fit in the
exponent field
Underflow
 This is an event where a non-zero fraction has become too
small that it cannot be represented
 This situation occurs when the negative exponent is too large
to fit into the exponent field
Format: (-1)S (1.b1b2…b23) × 2E
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 21
IEEE 754 Numerical Types
Biased Exponent
Max: 1111 11112
b31 b30 ………..…….b23 b22 b21………..……………….……………….b 0
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 22
Normalized Numbers
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 23
Positive and Negative Zeros
0 00000000 00000000000000000000000
Exponent Fraction
 Positive zero
1 00000000 00000000000000000000000
Exponent Fraction
 Negative zero
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 24
Denormalized Numbers
22 031
Negative
Overflow
Positive
Overflow
Expressible negative
numbers
Expressible positive
numbers
0-2-126 2-126
Positive underflowNegative underflow
(2 – 2-23)×2+127- (2 – 2-23)×2+127
Positive zeroNegative zero + ∞– ∞
±1.0000 0000 0000 0000 0000 000 x 2-126
±1.1111 1111 1111 1111 1111 111 x 2+127
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 25
Positive and Negative Infinities
22 031
0 1111111100000000000000000000000
Exponent Fraction
+ ∞ (+ infinity)
1 1111111100000000000000000000000
Exponent Fraction
- ∞ (- infinity)
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com
Double Precision
Floating-Point Representation
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 27
Double Precision Representation (64 bits)
S E: 11-bit Exponent F: 52-bit Fraction +
bits 0-19bits 20-30
bit 63
Continuation of 52-bit Fraction
bits 0-31
Note: Extended Precision: 80 bits wide
 Double-precision values represent numbers, infinities and NaNs
analogous to single-precision values
 If 0 < exponent < 0x7FF, the value is a normalized number and
is equal to:
 −1S × 2exponent−1023 × (1.fraction)
 Range of values of double precision is from 2.225 x 10-308 to
1.798 x 10308
Note: Half Precision: 16 bits wide
IEEE 754 - 2008
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 28
Video Lecture on
Floating Point Representation
 You can listen to my lecture through this link below
too:
◦ Video Lecture on Floating Point Representation by
Mouli
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 29
Session 6: Summary
 Number Representations
◦ Scientific Notation
◦ Normalized numbers
 Floating-point Representation
◦ IEEE 754 Format
◦ Single Precision (32 bits) – float type in C
 Exponent and Significand
 Biased Exponent
 Range of floating point numbers
◦ Double Precision (64 bits) – double type in C
◦ Reference: Video Lecture on this topic
Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 30
References
Ref 1 Ref 2

More Related Content

What's hot

Ejercicios de retroalimentacion
Ejercicios de retroalimentacionEjercicios de retroalimentacion
Ejercicios de retroalimentacionDIEGO GARZON
 
sequential circuit that encodes a hexadecimal 16-key keypad output to 4 – bit...
sequential circuit that encodes a hexadecimal 16-key keypad output to 4 – bit...sequential circuit that encodes a hexadecimal 16-key keypad output to 4 – bit...
sequential circuit that encodes a hexadecimal 16-key keypad output to 4 – bit...Gautham Reddy
 
digital logic circuits, digital component
digital logic circuits, digital componentdigital logic circuits, digital component
digital logic circuits, digital componentRai University
 

What's hot (20)

Digital Design Session 2
Digital Design Session 2Digital Design Session 2
Digital Design Session 2
 
Digital Design Session 12
Digital Design Session 12Digital Design Session 12
Digital Design Session 12
 
Digital Design Session 25
Digital Design Session 25Digital Design Session 25
Digital Design Session 25
 
Digital Design Session 27
Digital Design Session 27Digital Design Session 27
Digital Design Session 27
 
Digital Design Session 9
Digital Design Session 9Digital Design Session 9
Digital Design Session 9
 
Digital Design Session 17
Digital Design Session 17Digital Design Session 17
Digital Design Session 17
 
Digital Design Course Summary
 Digital Design Course Summary Digital Design Course Summary
Digital Design Course Summary
 
Digital Design Session 8
Digital Design Session 8Digital Design Session 8
Digital Design Session 8
 
Digital Design Session 21
Digital Design Session 21Digital Design Session 21
Digital Design Session 21
 
Digital Design Session 29
Digital Design Session 29Digital Design Session 29
Digital Design Session 29
 
Digital Design Session 7
Digital Design  Session 7Digital Design  Session 7
Digital Design Session 7
 
Digital Design Session 22
Digital Design Session 22Digital Design Session 22
Digital Design Session 22
 
Digital Design Session 20
Digital Design Session 20Digital Design Session 20
Digital Design Session 20
 
Digital Design Session 19
Digital Design Session 19Digital Design Session 19
Digital Design Session 19
 
Digital Design Session 15
Digital Design Session 15Digital Design Session 15
Digital Design Session 15
 
Digital Design Session 18
Digital Design Session 18Digital Design Session 18
Digital Design Session 18
 
Digital Design Session 24
Digital Design Session 24Digital Design Session 24
Digital Design Session 24
 
Ejercicios de retroalimentacion
Ejercicios de retroalimentacionEjercicios de retroalimentacion
Ejercicios de retroalimentacion
 
sequential circuit that encodes a hexadecimal 16-key keypad output to 4 – bit...
sequential circuit that encodes a hexadecimal 16-key keypad output to 4 – bit...sequential circuit that encodes a hexadecimal 16-key keypad output to 4 – bit...
sequential circuit that encodes a hexadecimal 16-key keypad output to 4 – bit...
 
digital logic circuits, digital component
digital logic circuits, digital componentdigital logic circuits, digital component
digital logic circuits, digital component
 

Similar to Digital Design Session 6

Similar to Digital Design Session 6 (20)

Ece 301 lecture 2 - number systems and codes
Ece 301   lecture 2 - number systems and codesEce 301   lecture 2 - number systems and codes
Ece 301 lecture 2 - number systems and codes
 
digital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptxdigital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptx
 
Logic Design 2009
Logic Design 2009Logic Design 2009
Logic Design 2009
 
DLD_Chapter_2.pptx
DLD_Chapter_2.pptxDLD_Chapter_2.pptx
DLD_Chapter_2.pptx
 
Floating point representation and arithmetic
Floating point representation and arithmeticFloating point representation and arithmetic
Floating point representation and arithmetic
 
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.pptUnit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
 
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
 
02-binary.pptx
02-binary.pptx02-binary.pptx
02-binary.pptx
 
Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Lec ty
Lec tyLec ty
Lec ty
 
L2 number
L2 numberL2 number
L2 number
 
IEEE floating point representation
 IEEE floating point representation IEEE floating point representation
IEEE floating point representation
 
Process.org
Process.orgProcess.org
Process.org
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Digital Design Session 23
Digital Design Session 23Digital Design Session 23
Digital Design Session 23
 
Complement
ComplementComplement
Complement
 
Ee 202 chapter 1 number and code system
Ee 202 chapter 1 number and code system Ee 202 chapter 1 number and code system
Ee 202 chapter 1 number and code system
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 

Recently uploaded

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...Call girls in Ahmedabad High profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 

Recently uploaded (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 

Digital Design Session 6

  • 1. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com
  • 2. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 2 Session 6: Focus  Number Representations ◦ Scientific Notation ◦ Normalized numbers  Floating-point Representation ◦ IEEE 754 Format ◦ Single Precision (32 bits)  Exponent and Significand  Biased Exponent  Range of floating point numbers ◦ Reference: Video Lecture on this topic
  • 3. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com Number Representations
  • 4. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 4 Integers and Real Numbers  Integers: the universe is infinite but discrete ◦ No fractions ◦ No numbers in between consecutive integers, e.g., 6 and 7 ◦ A countable (finite) number of items within a finite range ◦ Referred to as fixed-point numbers  Real numbers – the universe is infinite and continuous ◦ Fractions are 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
  • 5. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 5 Wide Range of Numbers  A large number: 7,564,000,000,000,000 = 7.56 × 1015  A small number: 0.000000000000007564 = 7.564 × 10 –15
  • 6. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 6 Definitions Scientific Notation  Scientific notation is a way of writing numbers that are too big or too small, to be conveniently written in decimal form Scientific Notation: (many unnormalized forms for the same no.)  10.0ten  10-10 , 0.1ten  10-8 and 0.01ten  10-7  0.524×105 and 52.4×103 Normalized Scientific Notation  Real number is written with one nonzero decimal digit before the decimal point Normalized Scientific Notation: (only one normalized form)  1.0ten  10-9  5.24×104
  • 7. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 7 Floating-Point Numbers  Binary Numbers  Base 2  Binary point – multiplication by 2 moves the point to the right  Normalized scientific notation  e.g., 1.101two = 1 * 2 0 + 1 * 2 -1 + 0 * 2 -2 + 1 * 2-3 = 1 + 0.5 + 0 + 0.125 = 1.625  Similar to the decimal numbers shown in scientific notation, binary numbers can also be written in scientific notation …  1.0two  2-1 => 0.5ten  1.xxxxxxtwo  2yyyy (general format)
  • 8. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 8 Advantages of Scientific Notation  Simplifies exchange of data  Simplifies arithmetic algorithms (because of standardized format)  Increases accuracy of the numbers that can be stored in a word ◦ Since unnecessary leading zeros are replaced by digits to the right of the binary point ◦ 0.00000101110  1.0111 * 2-6
  • 9. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com Floating-Point General Format
  • 10. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 10 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 – Controls the Precision  E = Exponent as a binary integer, positive or negative (two’s complement representation) – Controls the Range  To have more bits into the significand, IEEE 754 makes the leading 1-bit of normalized binary numbers implicit
  • 11. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 11 Floating-Point General Format  General format ±1.bbbbbtwo×2eeee or (-1)S × (1+F) × 2E  Fraction, is a value between 0 and 1, placed in the Fraction (F) field [bbbbb…]  Exponent, is a value placed in the exponent field, computing the value as 2E [eeee….]  As mentioned earlier, the leading value 1 of the significant is implicit and not specifically stored
  • 12. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com Binary to Decimal Conversion Binary (-1)S (1.b1b2b3b4) × 2E Decimal(-1)S × (1 + b1×2-1 + b2×2-2 + b3×2-3 + b4×2-4) × 2E Example: -1.1100 × 2-2 (binary) = - (1 + 2-1 + 2-2) ×2-2 = - (1 + 0.5 + 0.25)/4 = - 1.75/4 = - 0.4375 (decimal)
  • 13. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com Floating-Point Representations
  • 14. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 14 William Morton (Velvel) Kahan One of the foremost experts on floating-point computations. A primary architect of the Intel 8087 floating- point coprocessor and IEEE 754 floating- point standard. Architect of the IEEE 754 floating point standard b. 1933, Canada Professor of Computer Science, UC-Berkeley
  • 15. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com Single Precision Floating-Point Representation
  • 16. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 16 Single Precision Representation (32 bits)  – 126 ≤ E ≤ +127 (biased notation)  Range of values are from 2-126 to (2-2-23) 2+127  Range of magnitudes, 1.175 ×10-38 to 3.403 ×1038 bit 31 S E: 8-bit Exponent F: 23-bit Fraction bits 0-22bits 23-30 Note: Normal limits of exponents are between -128 and +127 in 2’s complement form Format: (-1)S (1.b1b2b3 ...b23) × 2E
  • 17. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 17 Bias to the Exponent  Exponent: 8 bits wide (in Single precision)  Range of values: 0x00 to 0xFF (0 to 255 in decimal)  Reserved: 0x00 and 0xFF  Other values of Exponent: 0x01 to 0xFE (1 to 254 in decimal)  Actual Exponent value = Value in Exponent field - Bias  = 01 – 127 => -126 (min value)  = 254 – 127 => +127 (max value)  Bias (127) helps in performing integer comparison of floating point representation (leaving out the sign bit)  Since zero value (0.0) has no leading 1, it is given the reserved exponent value (00) so that hardware won’t attach a leading 1 to it S E: 8-bit Exponent F: 23-bit Fraction bits 0-22bits 23-30 Format: (-1)S (1.b1b2…b23) × 2E
  • 18. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 18 Range of 32-bit Integers Expressible numbers -231 231-10  Signed Integers: 2’s complement Format  Unsigned Integers: Expressible numbers 0 232-1
  • 19. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 19 IEEE 754: 32-bit Format Negative Overflow Positive Overflow Expressible negative numbers Expressible positive numbers 0-2-126 2-126 Positive underflow Negative underflow (2 – 2-23)×2+127- (2 – 2-23)×2+127 Positive zeroNegative zero + ∞– ∞ ±1.0000 0000 0000 0000 0000 000 x 2-126 ±1.1111 1111 1111 1111 1111 111 x 2+127 S E: 8-bit Exponent F: 23-bit Fraction bits 0-22bits 23-30
  • 20. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 20 Overflow and Underflow Overflow  It means that a positive exponent which is too large to fit in the exponent field Underflow  This is an event where a non-zero fraction has become too small that it cannot be represented  This situation occurs when the negative exponent is too large to fit into the exponent field Format: (-1)S (1.b1b2…b23) × 2E
  • 21. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 21 IEEE 754 Numerical Types Biased Exponent Max: 1111 11112 b31 b30 ………..…….b23 b22 b21………..……………….……………….b 0
  • 22. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 22 Normalized Numbers
  • 23. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 23 Positive and Negative Zeros 0 00000000 00000000000000000000000 Exponent Fraction  Positive zero 1 00000000 00000000000000000000000 Exponent Fraction  Negative zero
  • 24. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 24 Denormalized Numbers 22 031 Negative Overflow Positive Overflow Expressible negative numbers Expressible positive numbers 0-2-126 2-126 Positive underflowNegative underflow (2 – 2-23)×2+127- (2 – 2-23)×2+127 Positive zeroNegative zero + ∞– ∞ ±1.0000 0000 0000 0000 0000 000 x 2-126 ±1.1111 1111 1111 1111 1111 111 x 2+127
  • 25. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 25 Positive and Negative Infinities 22 031 0 1111111100000000000000000000000 Exponent Fraction + ∞ (+ infinity) 1 1111111100000000000000000000000 Exponent Fraction - ∞ (- infinity)
  • 26. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com Double Precision Floating-Point Representation
  • 27. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 27 Double Precision Representation (64 bits) S E: 11-bit Exponent F: 52-bit Fraction + bits 0-19bits 20-30 bit 63 Continuation of 52-bit Fraction bits 0-31 Note: Extended Precision: 80 bits wide  Double-precision values represent numbers, infinities and NaNs analogous to single-precision values  If 0 < exponent < 0x7FF, the value is a normalized number and is equal to:  −1S × 2exponent−1023 × (1.fraction)  Range of values of double precision is from 2.225 x 10-308 to 1.798 x 10308 Note: Half Precision: 16 bits wide IEEE 754 - 2008
  • 28. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 28 Video Lecture on Floating Point Representation  You can listen to my lecture through this link below too: ◦ Video Lecture on Floating Point Representation by Mouli
  • 29. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 29 Session 6: Summary  Number Representations ◦ Scientific Notation ◦ Normalized numbers  Floating-point Representation ◦ IEEE 754 Format ◦ Single Precision (32 bits) – float type in C  Exponent and Significand  Biased Exponent  Range of floating point numbers ◦ Double Precision (64 bits) – double type in C ◦ Reference: Video Lecture on this topic
  • 30. Digital Design – © 2020 Mouli Sankaran Email: mouli.sankaran@yahoo.com 30 References Ref 1 Ref 2