signed , unsigned and fractional binary numbers
TRANSCRIPT
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 1/12
R E P O R T O F :
E Z E K I E L A . D E L E O N
B S E C E – 0 3
Signed , Unsigned and
Fractional Binary Numbers
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 2/12
Signed and Unsigned Binary Numbers
The value of a decimal number is based on threefactors.
The type of symbol used
The position of the symbol with respect to a fixedreference (decimal point).
The use of zero.
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 3/12
Signed and Unsigned Binary Numbers
Example:
Based on the three factors listed earlier, let's look at what the decimal number 702 represents.
7 0 2 .
The digit "2" in the ones positional
value column represent the absolute value of 2.
Decimal
OnesTensHundreds
The "0" in the tens positional value column
means there are no tens, so the absolute value is 0.
The digit "7" in the hundreds
positional column means there areseven hundreds.
therefore, the absolute value of all
three digits is 702.
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 4/12
Signed and Unsigned Binary Numbers
An Unsigned binary number, this form of binary representation is known as unsigned integers
because it can only represent integers that are positive.
When the numeric representation is also allowed toinclude negative integers, its is known as signed integers. The positive values are stored as simple
binary numbers, but negative numbers are stored intwo complement form.
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 5/12
Things to remember:
For signed integers that use two’scomplement notation, the MSB isassigned the role of indicating the signof the number. An MSB of 1 means that
the number is negative; an MSB of 0means that the number is positive (orzero).
Signed and Unsigned Binary Numbers
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 6/12
Signed and Unsigned Binary Numbers
The MSB in this case is approximately termed thesign bit.
The procedure for determining the
decimal equivalent of a two’scomplement binary number is exactly the same as the one we have used for
unsigned integer, except that the sign of the MSB is negative.
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 7/12
Signed and Unsigned Binary Numbers
b3 b2 b1 b0
MSB LSB
1 0 0 1
MSB LSB
= b 3∙2 3 + b2 ∙22 + b1∙21 + b0∙20
= 1∙2 3 + 0 ∙22 + 0∙21 + 1∙20 = 8 + 1 = 9
A 4- bit binary number where b0 is
the least significant bit (LSB) and b 3 isthe most significant
bit (MSB)
-23
22
21
20
Sign bit:0 = positive number1 = negative number
= b 3∙( -2 3 )+ b2 ∙22 + b1∙21 + b0∙20
= 1∙( -2 3 ) + b2 ∙22 + b1∙21 + b0∙20
= -8 + 1 = -7
Calculating the decimal equivalent of a 4- bit binary number in unsigned integerformat
Calculating the decimal equivalent of a 4-bitbinary number in signed integer format usingtwo’s complement. Observe the sign of the MSB is
negative
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 8/12
Signed and Unsigned Binary Numbers
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 9/12
Signed and Unsigned Binary Numbers
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 10/12
Fractional Binary Numbers
In Fractional Binary numbers, we must move the binary point toward the left so that some (or all) of the bits are to the right of the binary point.
b7 b6 b 5 b4 b 3 b2 b1 b0
. Assumedlocation of binary point
Signed integers: -27 26 25 24 23 22 21 20
Unsigned integers: -27
26
25
24
23
22
21
20
Location of binary point for an 8- bit binary number in two’s complementsigned integer and unsigned integer formats.
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 11/12
Fractional Binary Numbers
.Location of binary point
b7 b6 b 5 b4 b 3 b2 b1 b0
MSB LSB
b7 b6 b 5 b4 b 3 b2 b1 b0
MSB LSB
.Location of binary point
Sign bit
Location of binary point for an 8-bit binary number. The upper part shows the unsignedfraction format. The lower part shows the
signed fraction format.
8/2/2019 Signed , Unsigned and Fractional Binary Numbers
http://slidepdf.com/reader/full/signed-unsigned-and-fractional-binary-numbers 12/12
Fractional Binary Numbers
.Location of binary point(unsigned fraction)
b7 b6 b 5 b4 b 3 b2 b1 b0
MSB LSB
b7 b6 b 5 b4 b 3 b2 b1 b0
MSB LSB
.Location of binary point(signed fraction)
2-1 2-2 2-3 2-4 2-5 2-6 2-7 2-8
0.5 0.25 0.125 0.0068125 0.00390625
0.5 0.250.015625 0.0078125
-20 2-1 2-2 2-3 2-4 2-5 2-6 2-7
1
To determine thedecimal equivalent of a binary fraction,
multipl the binary fraction, multiply the binary digit that is n places to the right of the decimal point by
2
-n
, or 1/2
n
. Theupper part shows theunsigned fraction.The lower part showsthe signed fractionformat.