Computer Organization and Assembly Language: Lecture 7 & 8 Floating Point Representation Binary Coded Decimal
Computer Organization and Assembly Language: Lecture 7 & 8 Floating Point Representation Binary Coded Decimal
Lecture 7 & 8
Floating Point Representation
Binary Coded Decimal
Course Instructor: Engr. Aisha Danish
Real Numbers
Numbers with fractions
Could be done in pure binary
1001.1010 = 24 + 20 +2-1 + 2-3 =9.625
Where is the binary point?
Fixed?
Very limited
Moving?
How do you show where it is?
Floating point
In computing, floating point describes a method of
representing an approximation of a real number in a way that
can support a wide range of values
The numbers are, in general, represented approximately to a
fixed number of significant digits (the significand) and scaled
using an exponent
The term floating point refers to the fact that a number's
radix point (decimal point, or, more commonly in computers,
binary point) can "float"; that is, it can be placed anywhere
relative to the significant digits of the number
Floating point can be thought of as a computer realization of
scientific notation
How floating-point numbers work?
close to zero).
Such a format satisfies all the requirements:
It can represent numbers at widely different magnitudes (limited
Decimal Number 8 7 1
QUIZ
Decimal Number 3 5 0
BCD 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
Note: 1010, 1011, 1100, 1101, 1110, and 1111 are INVALID CODE!