Correct Answer - Option 4 : 10010111.11
Concept:
Decimal to Binary:
To convert the decimal number into binary follow the below steps:
- Take the decimal number as a dividend.
- Divide this number by 2 (2 is the base of binary so divisor here).
- Store the remainder in an array (it will be either 0 or 1 because of divisor 2).
- Repeat the above two steps until the number is greater than zero.
- Print the array in reverse order (which will be the equivalent binary number of a given decimal number).
Calculation:
Given number is 151.75
Converting the 151 into binary
Step 1: Divide (151)10 successively by 2 until the quotient is 0:
151/2 = 75, remainder is 1
75/2 = 37, remainder is 1
37/2 = 18, remainder is 1
18/2 = 9, remainder is 0
9/2 = 4, remainder is 1
4/2 = 2, remainder is 0
2/2 = 1, remainder is 0
1/2 = 0, remainder is 1
Step 2: Read from the bottom (MSB) to top (LSB) as 10010111. This is the binary equivalent of decimal number 151 (Answer).
Converting the 0.75 into binary we get 0.11
Now the total conversion is:
(151.75)10 = (10010111.11)2