binary-helper 0.2.3

A simple binary conversion crate
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 4 items with examples
  • Size
  • Source code size: 4.83 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 261.28 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • EBSmash

Binary Helper

This crate serves 2 purposes:

1: converting a binary number to a base 10 number

2: converting a base 10 number to a binary number

Example

fn is_10_binary_check(x) -> String {
    let result = dec2binary(x,3);
    if result == "0001010"{
        "X is 10 (0001010 in binary)!".to_string()
    }
}