Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
4 answers
2k views

Convert Integer to Binary String

This code takes a user input number which is a positive integer, and outputs a string representation of the number in binary. For example, input 2 outputs ...
nexus_2006's user avatar
3 votes
1 answer
683 views

Integer to binary using an old-school way

I know I could achieve this using System.out.println(Integer.toBinaryString(num)); in Java. However, I wanted to do it this way. ...
user avatar