Computer Science
How will you convert a Decimal number to a Binary number
Number System
25 Likes
Answer
- Divide a decimal number by 2 and obtain quotient and remainder. The remainder will be the least significant bit (LSB) of the binary number.
- Divide quotient by 2 and again obtain the next quotient and remainder.
- Repeat the above step unless quotient becomes 0.
- The last remainder will be the most significant bit (MSB) of the binary number.
- Arrange all the remainders from MSB to LSB. It will be the binary equivalent of the given decimal number.
Answered By
13 Likes