chapter five (1)
chapter five (1)
Conversion from binary to hexadecimal is similar except that the binary bits are divided into
groups of four starting from right to left and adding leading 0’s if necessary for the last
group.
The corresponding hexadecimal digit is then assigned to each group of bits
and the string of digits so obtained gives the hexadecimal equivalent of the binary number.
Complements
Complements are used in digital computers for simplifying the
subtraction operation and negative number representation.
Two types of complements for each base-r system
- r’s complement and r-1’s complement
- For binary numbers, when r= 2, the complements are 2’s
complement or 1’s complement
- For decimal numbers, r = 10, 10’s complement or 9’s complement
01010100 01010100
– 01000011 + 10111101
00010001
• The carry of 1 which will be discarded indicates that
no correction of the result is required. Hence the
answer is 00010001
• Find 010000112 – 010101002
01000011 01000011
– 01010100 + 10101100
11101111
Floating point
Fixed point
Normalized and UNNormalized
• A floating point number is said to be normalized if the number
after the radix point is a non-zero that is, it is not a ‘0’ value.
• Unnormalized floating number is when the number after the
radix point is ‘0’.
• Example:
normalized
unnormalized
unnormalized
normalized
Normalization Process
• Normalization is the process of deleting the zeroes until a non-zero value is detected.
■ A rule of thumb:
– moving the radix point to the right subtract exponent
– moving the radix point to the left add exponent