7 kyu
Convert Integer to Binary
839 of 2,037DivyanshBatham
Description:
Convert integers to binary as simple as that. You would be given an integer as a argument and you have to return its binary form. To get an idea about how to convert a decimal number into a binary number, visit here.
Notes: negative numbers should be handled as two's complement; assume all numbers are integers stored using 4 bytes (or 32 bits) in any language.
Your output should ignore leading 0s.
Examples (input --> output):
3 --> "11"
-3 -->"11111111111111111111111111111101"
Be Ready for Large Numbers. Happy Coding ^_^
Binary
Fundamentals
Similar Kata:
Stats:
Created | May 23, 2015 |
Published | May 23, 2015 |
Warriors Trained | 4732 |
Total Skips | 324 |
Total Code Submissions | 9352 |
Total Times Completed | 2037 |
JavaScript Completions | 839 |
Ruby Completions | 187 |
Python Completions | 822 |
C# Completions | 227 |
C Completions | 55 |
COBOL Completions | 3 |
Total Stars | 77 |
% of votes with a positive feedback rating | 89% of 352 |
Total "Very Satisfied" Votes | 287 |
Total "Somewhat Satisfied" Votes | 51 |
Total "Not Satisfied" Votes | 14 |
Total Rank Assessments | 13 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |