Professional Documents
Culture Documents
Data Representation: Numeric and Alphanumeric
Data Representation: Numeric and Alphanumeric
3 7 2 4 0 0000
0011 0111 0010 0100 1 0001
2 0010
2 1. 0 5 00100001.000001012 3 0011
2 1 . 0 5 4 0100
0010 0001 . 0000 0101 5 0101
6 0110
09.726 1001.0111001001102
7 0111
9 . 7 2 6
8 1000
1001 . 0111 0010 0110
9 1001
NUMERIC REPRESENTATION
DECIMAL DIGIT REPRESENTATION
In the most significant 4 bits, called the zoned bits, 1111 is stored.
19 11110001 1111
The 4 bits that represent the sign is stored in the zoned bits of the least
significant digit (Positive and Zero is represented by 1100 while negative
is 1101)
19 11001001 1100 + SIGN
-19 11011001 1101 - SIGN
EXAMPLE:
1028 111100011111000011110010110010002
1 0 2 8
11110001 11110000 11110010 11001000
7 2 4 0 0000
11110111 11110010 11010100 1 0001
2 0010
-593 1111010111111001110100112
3 0011
5 9 3 4 0100
11110101 11111001 11010011 5 0101
6 0110
1. 6 2 11110001.11110110110000102
7 0111
1 . 6 2
8 1000
11110001 11110110 11000010 9 1001
NUMERIC REPRESENTATION
DECIMAL DIGIT REPRESENTATION
7 2 4 - 0 0000
0111 0010 0100 1101 1 0001
2 0010
-6593 0000011001011001001111012
3 0011
6 5 9 3 - 4 0100
0000 0110 0101 1001 0011 1101
5 0101
6 0110
162 00010110001011002
1 6 2 + 7 0111
0001 0110 0010 1100 8 1000
9 1001
NUMERIC REPRESENTATION
BINARY DIGIT REPRESENTATION
IUnpacked
I I I
P
P
Packed
NUMERIC REPRESENTATION
BINARY DIGIT REPRESENTATION
12810 = 100000002
NUMERIC REPRESENTATION
BINARY DIGIT REPRESENTATION
FIXED POINT
A fixed point just means that there are a fixed number of digits after the
decimal point.
Example:
Fixed Point Representation using 4 integer bits and 4 fraction bits:
10.1012 = 0010.10102
Fixed Point Representation using 2 integer bits and 4 fraction bits:
111.012 = 11.01002
NUMERIC REPRESENTATION
BINARY DIGIT REPRESENTATION
FLOATING POINT
Used to represent real number data type.
Represents either extremely large or small size data.
Example:
Write 27310 in scientific notation:
• Move the decimal point to the left until you have a number greater
than or equal to 1 and less than 10 and count the number of decimal
places you moved, it represent the exponent of the base/radix.
• 27310 = 2.73 x102
Write 100000.0012 in scientific notation:
• Move the decimal point to the left until you have a number greater
than or equal to 1 and less than 10 and count the number of decimal
places you moved, it represent the exponent of the base/radix.
• 100000.0012 = 1.00000001 x25
FLOATING POINT
M x RE
Decimal
• M = Mantissa 1.101000111 x 109
• R = Radix Binary
• E = Exponent
1.101000111 x 29
Floating Point Representation using 32 bits :
• 1 sign bit
• 8 exponent bits
• 23 bits for the mantissa
1 bit 8 bits 23 bits
SIGN EXPONENT MANT ISSA
Radix is 2 Get all the bits after the
+=0 decimal point
127 + Exponent
- =1
Get the binary Add zeroes ‘till you reach
equivalent 23 bits.
EXAMPLE:
FLOATING POINT
22810
GET THE BINARY EQUIVALENT OF THE DECIMAL NUMBER
AND THEN CONVERT TO SCIENTIFIC NOTATION
22810 = 111001002
= 1.1100100 X 27
+ 127 + 7 1100100
0 10000110 11001000000000000000000
-411.82510
GET THE BINARY EQUIVALENT OF THE DECIMAL NUMBER
AND THEN CONVERT TO SCIENTIFIC NOTATION
- 411.82510 = 110011011.1101002
= 1.10011011110100 X 28
- 127 + 8 10011011110100
1 10000111 10011011110100000000000
192.8610
GET THE BINARY EQUIVALENT OF THE DECIMAL NUMBER
AND THEN CONVERT TO SCIENTIFIC NOTATION
192.8610 = 11000000.110111000010100011112
= 1.100000011011100001010001111 X 27
+ 127 + 7 100000011011100001010001111
0 10000110 10000001101110000101000
-513.9510
GET THE BINARY EQUIVALENT OF THE DECIMAL NUMBER
AND THEN CONVERT TO SCIENTIFIC NOTATION
-513.9510 = 1000000001.111102
= 1.00000000111110 X 29
- 127 + 9 00000000111110
1 10000001 00000000111110000000000
-513.9510
GET THE BINARY EQUIVALENT OF THE DECIMAL NUMBER
AND THEN CONVERT TO SCIENTIFIC NOTATION
-513.9510 = 1000000001.111102
= 1.00000000111110 X 29
- 127 + 9 00000000111110
1 10000001 00000000111110000000000
Even Parity
u
75
1 111 0101
NUMERIC REPRESENTATION
BINARY DIGIT REPRESENTATION
Even Parity