Problem 45326. Decimal Fraction to binary conversion
Given an fraction decimal number n, convert it to its equivalent binary number.
If it is an infinite binary fraction, keep it upto k precision point.
- n=55.125
- out='110111.001'
Solution Stats
Problem Comments
-
2 Comments
David Hill
on 14 Feb 2020
Similar to my Cody problem.
https://www.mathworks.com/matlabcentral/cody/problems/44971-convert-base-10-to-base-x-2-16
Asif Newaz
on 15 Feb 2020
sorry..didn't see that
Solution Comments
Show commentsProblem Recent Solvers8
Suggested Problems
-
Sum all integers from 1 to 2^n
16768 Solvers
-
Project Euler: Problem 4, Palindromic numbers
1180 Solvers
-
Find the elements of a matrix according to a defined property.
90 Solvers
-
Rotate input square matrix 90 degrees CCW without rot90
656 Solvers
-
551 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!