Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs

Dashboard
Notifications
Mark all as read
Sandbox

Make my value binary [released]

+1
−0

Challenge

What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an int then turn it into it's binary value.

Test Cases

n = 0
Output: 0

n = 1
Output: 1

n = 5
Output: 101

n = 12
Output: 1100

n = 31
Output: 11111

n = 4096
Output: 1000000000000
Why does this post require moderator attention?
You might want to add some details to your flag.

7 comment threads

Built-ins (2 comments)
what about native language formats for binary? such as `0b` prefix for python and such (3 comments)
Specify decimal base (1 comment)
This is not encryption (1 comment)
What about negative integers? (3 comments)
Show more

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!

Like what we're doing? Support us! Donate