Decimal Fraction to binary conversion - MATLAB Cody - MATLAB Central

Problem 45326. Decimal Fraction to binary conversion

Difficulty:Rate

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

57.14% Correct | 42.86% Incorrect
Last Solution submitted on Sep 02, 2022

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
2
3

Problem Recent Solvers8

Suggested Problems

More from this Author174

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!