Instruction and Instruction Code
Registers - Group of Flip-Flops
This method is employed to convert the fraction part of the decimal system to other systems.
Convert the decimal number 41.125 into binary. Here, we first convert the integer part 41 into binary by using remainder method. It is shown as follows:
41 divide by 2 remainder 1 (Quotient 20)
20 divide by 2 remainder 0 (Quotient 10)
10 divide by 2 remainder 0 (Quotient 5)
5 divide by 2 remainder 1 (Quotient 2)
2 divide by 2 remainder 0 (Quotient 1)
1 divide by 2 remainder 1 (Quotient 0)
Now fraction part 0.125 can be converted as follows:
Fraction 0.125*2=0.25 Interger Part=0
Fraction 0.25*2=0.5 Interger Part=0
Fraction 0.5*2=1 Interger Part=1
Fraction 0.0
Hence binary equivalent of .125 is 001. Therefore, the binary equivalent of (41.125)10 is (101001.001)2
First of all the number is split into two parts i.e. integer part (41) and fraction part (125). The integer part is converted by dividing 41 by r = 2 to give an integer quotient of 20 and a reminder of 1. The quotient is again divided by 2 to give a new quotient and remainder. This process of successive division is repeated until the integer quotient becomes 0, the first remainder giving the low order bit of the converted binary number.
Hence (41)10=(101001)2
Conversion of the fraction part is done by multiplying it by r = 2 to give an integer and a fraction. The new fraction (without the integer) is multiplied again by 2 to give a new integer and a new fraction. This process of successive multiplication is repeated until the fraction part becomes zero or until the number of digits obtained gives the required accuracy, the first integer computed being the digit to be placed next to the binary point. So the total required conversion is achieved by combining the two parts.
In digital computers these conversions from decimal to binary, octal and hexadecimal representation are of great significance. Since 23 = 8 and 24 = 16. Each octal digit corresponds to three binary digits and each hexadecimal digit corresponds to four binary digits. A binary number is split into the group of three bits from right to left, each for converting into octal number. The corresponding octal digit is then assigned to each group of bits and the string of digits so obtained gives the octal equivalent of the binary number.
Since a binary number consists of a string of 1s and 0s, the 16-bit register can be used to store any binary number from 0 to 216-1. Conversion from binary to hexadecimal is similar except that the bits are divided into groups of four.
